Backtrack 3 on Acer Aspire One

Introduction

After getting my netbook what to do next? Hmmm maybe taking advance of its great Atheros card to "play" for a while?? alright!! In this post I will write tips and tricks and howtos to take advance of the Backtrack security distro http://www.remote-exploit.org/backtrack.html for fun.


Installation on a Hard Drive

You can run Backtrack3 from a pendrive as a live cd system without problems but you can also copy it to your hard drive and keep the changes after every reboot.

To do so just follow this howto which I find great: http://kin.calvin.free.fr/blog/?p=16. In my case I kept the boot loader that comes with the Linpus distro installed originally. As you can see in my post about this netbook, Grub has a weird behaviour when you want to boot more than one system (check AspireOnePost).

Having this in mind go to the Grub configuration file that should be on /boot/grub/grub.conf and add the following lines after the Linpus Linux booting parameters, I will also show the parameters for booting Windows in case you also want to install it. Take care with the partition numbers as they dont have to be the same as mine.

default=0
timeout=5
splashimage=(hd0,0)/boot/grub/cbg2.xpm.gz
hiddenmenu

title Linpus Linux
        rootnoverify (hd0,0)
        kernel /boot/bzImage ro root=LABEL=linpus vga=0x311 splash=quiet loglevel=1 console=tty1 nolapic_timer
        initrd /boot/initrd-splash.img

title Backtrack 3
        rootnoverify (hd0,1)
        kernel /boot/vmlinuz ro root=/dev/sda2 vga=0x0F05

title Windous XP
        root (hd0,2)
        makeactive
        chainloader +1

Keep an eye on the grub syntax ((hd0,0) refers to the first partition on the first disk). Thus you can see how Backtrack was installed on the second partition.


Installing Nessus

Fullfilling the requirement that you are a home user you can use the Vulnerability Scanner Nessus by doing the following:

rpm2tgz Nessus-3.2.x-fc8.i386.rpm
rpm2tgz NessusClient-3.2.x-fc8.i386.rpm

pkgtool

cd /opt/
export PATH=$PATH:/opt/nessus/sbin:/opt/nessus/bin:
cp /usr/lib/libssl.so /lib
cp /usr/lib/libcrypto.so /lib
cp /opt/nessus/lib/libnessus.so.3 /lib
cp /opt/nessus/lib/libnessusrx.so.0 /lib
cp /opt/nessus/lib/libpcap-nessus.so.3 /lib
cd /lib
ln libssl.so libssl.so.6
ln libcrypto.so libcrypto.so.6

echo "/opt/nessus/lib" >> /etc/ld.so.conf

ldconfig

/opt/nessus/sbin/nessus-mkcert /opt/nessus/sbin/nessus-adduser

cd /opt/nessus/etc/nessus
nessus-fetch  –register XXX-YYY-ZZZ-VVV

/opt/nessus/sbin/nessusd

The client should be located on your Internet applications menu or in this path:

/opt/nessus/bin/NessusClient


Playing with Wireless

First steps

Aspire one comes with a nice Atheros wireless card and Backtrack3 has the drivers needed to put the card in monitor mode (sniff) or to reinject packets. To use all this funcionality you should get used to wlanconfig,airmon-ng, aircrack-ng and aireplay-ng tools.


Starting kismet

First you have to edit its config file and modify the follogin line:

vi /usr/local/etc/kismet.conf
source=madwifi_ag,wifi0,madwifi-ng
#afterwards just launch kismet:
kismet

Kismet will create a dedicated new interface, If you are capturing packets on certain channel with another interface kismet will make trouble and start channel hopping on the other interfaces in use, so take care when running kismet and for example airodump-ng.


Create a new interface with monitor mode enabled

airmon-ng stop ath0
airmon-ng start wifi0

Capturing packets focusing on one AP

airodump-ng --bssid <victim_router_mac> -c <channel_used_by_victim_router> -w <file> <wireless_iface>


Send disasociation frames to a specific client (connected)

aireplay-ng -0 5 -e <ESSID> -a <router_mac> -c <connected_client_mac> <wifi_iface>


Replaying arp packets

In order for the replay to be effective you have to be associated with de ap, you can achieve this by issuing, where fake mac is the mac of an already connected user. Otherwise if you are replaying packets of a non associated client the AP will discard them.

aireplay-ng -1 30 -e '<ESSID>' -a <BSSID> -h <Fake MAC> ath0

Some APs like this format of association

aireplay-ng -1 6000 -o 1 -q 10 -e '<ESSID>' -a <BSSID> -h <Fake MAC> ath0

Where:


Debuggin network traces with tcpdump

tcpdump -n -e -s0 -vvv -i <iface>

11:04:34.360700 314us BSSID:00:14:6c:7e:40:80 DA:00:0f:b5:46:11:19 SA:00:14:6c:7e:
40:80 DeAuthentication: Class 3 frame received from nonassociated station


Connect to a Wep protected network

iwconfig ath0 key <s:ASCII string of key> essid <essid>
dhclient ath0


Startup a fake access point to share your internet access

Modify it for your needs (networks, essid, ips, gw, etc).

IPT="/usr/sbin/iptables"
WAN="eth0"
LAN="ath0"

#wifi stuff
echo "destroying atheros ifaces"
wlanconfig ath1 destroy
wlanconfig ath0 destroy
echo "creating ath0 as a master device"
wlanconfig ath0 create wlandev wifi0 wlanmode master
sleep 2
iwconfig ath0 essid HOME
echo "configuring IPs and default route"
ifconfig ath0 10.0.0.1 netmask 255.255.255.0 up
ifconfig eth0 192.168.1.111 netmask 255.255.255.0 up
route add default gw 192.168.1.1
echo "starting dhcp"
/etc/rc.d/rc.dhcpd start
echo "enabling forwarding"
echo 1 > /proc/sys/net/ipv4/ip_forward
echo "stablishing IPtables nat rules"
$IPT -t nat -A POSTROUTING -o $WAN -j MASQUERADE

The dhcp server config I used is the following

bt ~ # cat /etc/dhcpd.conf
option domain-name-servers 4.2.2.2;

default-lease-time 60;
max-lease-time 72;

ddns-update-style none;

authoritative;

log-facility local7;

subnet 10.0.0.0 netmask 255.255.255.0 {
  range 10.0.0.100 10.0.0.254;
  option routers 10.0.0.1;
  option domain-name-servers 4.2.2.2;
}

As you can see I used the local7 facility that I will dump to a separate file I will monitor to check when I have dear guests:

bt ~ # cat /etc/syslog.conf
# /etc/syslog.conf
# For info about the format of this file, see "man syslog.conf"
# and /usr
...
...
....

#
#DHCP LOGS
#
local7.*                                                -/var/log/dhcp.log


Other stuff

To lock the card to a specific mode, use:

    * iwpriv ath0 mode 11a To lock to 11a only.
    * iwpriv ath0 mode 11b To lock to 11b only.
    * iwpriv ath0 mode 11g To lock to 11g only.
    * iwpriv ath0 mode 0 (default) autoselect mode. 

Changing Authentication Mode.

Use:

    * iwpriv ath0 authmode 1 To use open authentication.
    * iwpriv ath0 authmode 2 To use shared key authentication.
    * iwpriv ath0 authmode 3 To use 802.1x authentication. 

Manipulating the MAC white/black list

Use:

    * iwpriv ath0 maccmd 3 To clear the MAC list.
    * iwpriv ath0 maccmd 1 To make the list a whitelist.
    * iwpriv ath0 maccmd 2 To make the list a blacklist.
    * iwpriv ath0 addmac 00:11:22:33:44:55 To add a mac address to the list.
    * iwpriv ath0 delmac 00:11:22:33:44:55 To delete a mac from the list.
    * iwpriv ath0 kickmac 00:11:22:33:44:55 To send a disassociation frame to an associated station. 

BacktrackonAspireOnePost (last edited 2009-10-31 20:26:47 by eslimasec)

Locations of visitors to this page