Showing posts with label basics. Show all posts
Showing posts with label basics. Show all posts

Wednesday, January 16, 2013

Backtrack basics 13: Effective search with locate

The quickest way to find a file in BT (and usually Linux), is using the "locate" command, which will search in a small database (mlocate.db in case of BT). The database is updated regularly by the fork background process, however we can update it as well, cause that might be not fast enough.

Here is the usage:

locate file.txt - search for file.txt (basically this can be any string, and will search it in the full path)
updatedb - update database

We can see in the example below the behavior described above.


Thursday, February 16, 2012

Backtrack basics 12. - Connecting to WPA2 wireless network

Here is a short description, about how to connect to WPA2 protected wireless networks with Backtrack 5. First edit the wpa_supplicant.conf file, where we can set the WiFi parameters:

wpa_supplicant.conf:


ctrl_interface=/var/run/wpa_supplicant


network={
ssid="ssid_name"
psk="pre_shared_key"
key_mgmt=WPA-PSK
proto=WPA2
pairwise=CCMP
group=CCMP
}

Then run the following commands:

root@bt:/etc/wpa_supplicant# ifconfig wlan0 up


root@bt:/etc/wpa_supplicant# wpa_supplicant -B -D wext -i wlan0 -c /etc/wpa_supplicant.conf


root@bt:/etc/wpa_supplicant# dhclient wlan0

Monday, January 16, 2012

Backtrack basics 11. - Installing Backtrack 5 under Virtualbox

I installed Backtrack5 R1 64bit GNOME version, here are the steps:


1) Make a new VirtualPC, select Ubuntu 64bit version, and set the other parameters (RAM, HDD - min 8GB, network)
2) Select the downloaded ISO file into the CD drive.
3) Boot Backtrack from CD
4) Start the GUI (startx)
5) Click the install.sh icon on the desktop
6) Follow the installation wizard (Step 7) - at 99% it will linger for a while, but it does not freeze, so wait patiently
7) Reboot the system, and if you want, remove the CD
8) Login (root / toor is the default)
9) run "fix-splash" script
10) Start the GUI (startx)
11) Delete the install.sh icon
12) If you want, you can install the VirtualBox apps


http://www.backtrack-linux.org/downloads/
https://www.virtualbox.org/wiki/Downloads

Thursday, December 1, 2011

Backtrack basics 11. - TFTP service

Backtrack 5 doesn't have TFTP by default as it was in BT4, we need to install it:

root@bt# apt-get install tftpd

Starting the service:

root@bt:~# in.tftpd /srv/tftp/

root@bt:~# netstat -a | grep tftp
udp 0 0 *:tftp *:*


After that we can start to use it.

#update

It's better if we install the "atftpd" package, this TFTP server has more options, for example we can run it as a separate thread, and not as part of the "inetd" process. The TFTP folder should be readable / writable to everyone.

The tool's configuration file can be found in "/etc/inetd.conf".

root@bt# apt-get install atftpd

Starting the service:

root@bt:~# in.tftpd --daemon /tftpboot/

root@bt:~# netstat -a | grep tftp
udp 0 0 *:tftp *:*

Monday, November 21, 2011

Backtrack basics 9. - Using wireless if running as a VM

I'm sure many people wondered, including me, how to do wireless in VMware, because the wifi network card can not be shared or attached to the virtual machine. The solution is an USB wireless network card, because VMware can pass any USB device to a virtual machine, thus solving the problem.

Just plug in your USB device, and then at the lower right corner of the VMware window, select whether you want to connect it to the VM, in this case to Backtrack.


If Backtrack support the wifi card, it will appear as wlan0 interface. Here are two lists about the supported wireless cards:

http://www.aircrack-ng.org/doku.php?id=compatibility_drivers

http://www.backtrack-linux.org/wiki/index.php/Wireless_Drivers

Sunday, October 30, 2011

macchanger

macchanger can change the MAC address on a network interface, it works, when the interface is down:

macchanger -m 12:22:33:44:55:66 wlan0


We can set the multicast bit on the MAC address to 1 with this tool, which is actually make sense.


Example:
Good: 12:22:33:44:55:66
Bad: 11:22:33:44:55:66

Saturday, October 29, 2011

Backtrack basics 8. - connecting to WiFi network with iwconfig

With the use of iwconfig we can connect to open and WEP protected wireless networks from the command line.

Open networks:

iwconfig wlan0 essid WLAN_test

WEP protected networks:

iwconfig wlan0 essid WLAN_test key AAAABBBBCC

Where wlan0 is the name of the wireless interface, WLAN_test is the SSID and AAAABBBBCC is the WEP key.

Realtek RTL8187L - SIOCSIFFLAGS: Unknown error 132

WiFi NIC cards, which has Realtek RTL8187L chipset inside (eg Netgear WG111v3) often produce the following error when we try to turn it OFF and then ON:  "SIOCSIFFLAGS: Unknown error 132". This is a bug. The solution is running the following small script:

rmmod rtl8187
rfkill block all
rfkill unblock all
modprobe rtl8187
rfkill unblock all
ifconfig wlan0 up

Monday, April 25, 2011

Backtrack basics: 7. Starting SSH service

If we want to login remotely to our machine, we can use ssh. For using SSH tunnels we will need this service as well. First we need to generate the public and private keys to be used with the connection:

sshd-generate


If this is done, we can start the SSH service:

/etc/init.d/ssh start


The we can login and verify if it runs:

netstat -antp

Tuesday, March 22, 2011

Backtrack basics: 6. Setting static IP address

We can set the IP, default gateway and DNS server with the following 3 commands:

ifconfig eth0 192.168.1.55/24
route add default gw 192.168.1.1
echo nameserver 192.168.1.1 > /etc/resolv.conf

Sunday, March 20, 2011

Backtrack basics: 5. Changing desktop

In Backtrack 4 we can choose between two desktops: kde és fluxbox. Two switch between the two we can use the dragon utility:


The command to change to fluxbox::

dragon >> desktop fluxbox

After being set we can start the GUI as usually. Personally I like the kde more.

Saturday, March 19, 2011

Backtrack basics: 4. Turning OFF

If we would like to properly terminate our Backtrack, we can do that with the "poweroff" command:

Thursday, March 17, 2011

Backtrack basics: 2. Dynamic IP address

By default Backtrack starts with no networking enables. We have two options to set IP: dynamic or static. Dynamic can be set with (starting a DHCP client):
dhclient eth0
eth0 is the network card.

Wednesday, March 16, 2011

Backtrack basics: 1. Logging in

Beside the tools I will write sometimes about some basic usage as well. The first is the login.

username: root
password: toor


Changing password: "passwd" command.