Archiwum

Archive for the ‘Back Track 5’ Category

VMware – Metasploit,Back Track 5 And PostgreSQL.

30 kwietnia, 2012 Dodaj komentarz

Back Track 5 And PostgreSQL.

PostgreSQL – Create New User  „bt”


root@bt:~# sudo su postgres

sh-4.1$ createuser bt -P

could not change directory to "/root"

Enter password for new role:

Enter it again:

Shall the new role be a superuser? (y/n) n

Shall the new role be allowed to create databases? (y/n) n

Shall the new role be allowed to create more new roles? (y/n) n

sh-4.1$ exit

exit

root@bt:~#

Create Database msf3


root@bt:~# sudo su postgres

sh-4.1$ createdb --owner=bt msf3

could not change directory to "/root"

sh-4.1$ ls

ls: cannot open directory .: Permission denied

sh-4.1$ psql -l

                                List of databases

Name    |  Owner   | Encoding |  Collation  |    Ctype    |   Access privileges

———–+———-+———-+————-+————-+———————–

msf3      | bt       | UTF8     | en_US.UTF-8 | en_US.UTF-8 |

postgres  | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 |

template0 | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c/postgres : postgres=CTc/postgres

template1 | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c/postgres  : postgres=CTc/postgres

(4 rows)

MSFConsole

msf > db_status

[*] postgresql selected, no connection

msf > db_connect bt:password@127.0.0.1:5432/msf3

msf > db_status

[*] postgresql connected to msf3

Update Back Track 5

18 marca, 2012 Dodaj komentarz

Update and upgrade your BT5 (R1) installation

apt-get update
apt-get dist-upgrade
apt-get install beef
reboot

Verify that you are running a 3.2.6 kernel:

name -an
Linux bt 3.2.6 #1 SMP Fri Feb 17 10:40:05 EST 2012 i686 GNU/Linux

Apt Commands

apt-get install Downloads and all of its dependencies, and installs or upgrades them.
apt-get remove [–purge] Removes and any packages that depend on it. –purge specifies that packages should be purged.
apt-get update Updates packages listings from the repo, should be run at least once a week.
apt-get upgrade Upgrades all currently installed packages with those updates available from the repo. should be run once a week.
apt-get dist-upgrade [-u] Similar to apt-get upgrade, except that dist-upgrade will install or remove packages to satisfy dependencies.
apt-cache search Searches packages and descriptions for .
apt-cache show Shows the full description of .
apt-cache showpkg > Shows a lot more detail about , and its relationships to other packages.
man apt Will give you more info on these commands as well as many that are in less common usage.

dpkg commands

dpkg -i Installs a package file; one that you downloaded manually, for example.
dpkg -c Lists the contents of a .deb file.
dpkg -I Extracts package information from a .deb file.
dpkg -r Removes an installed package named
dpkg -P Purges an installed package named . The difference between remove and purge is that while remove only deletes data and executables, purge also deletes all configuration files in addition.
dpkg -L Gives a listing of all the files installed by . See also dpkg -c for checking the contents of a .deb file.
dpkg -s Shows information on the installed package . See also apt-cache show for viewing package information in the Debian archive and dpkg -I for viewing package information extracted from a .deb file.
dpkg-reconfigure Reconfigures an installed package
man dpkg Will give you more info on these commands as well as many that are in less common usage.
Kategorie:Back Track 5 Tagi:

Install the Metasploit Framework on VMware – BackTrack 5 Linux

8 marca, 2012 Dodaj komentarz

Install the Metasploit Framework on VMware – BackTrack 5 Linux

BackTrack includes the Metasploit Framework, but not always the latest version. To install the latest version of Metasploit Framework in BackTrack:

$ sudo bash
 cd /pentest/svn
 rm -rf framework3
 svn co https://www.metasploit.com/svn/framework3/trunk framework3

In order to use the raw socket modules, the pcaprub extension must be installed:

 cd /pentest/svn/framework3/external/pcaprub
 ruby extconf.rb
 make && make install

In order to use the WiFi modues, the lorcon2 extension must be installed:

 cd /pentest/svn
 svn co https://802.11ninja.net/svn/lorcon/trunk lorcon2
 cd lorcon2
 ./configure --prefix=/usr && make && make install
 cd /pentest/svn/framework3/external/ruby-lorcon2
 ruby extconf.rb
 make && make install

Once a fresh Subversion snapshot has been installed, it can be updated with the following command:

 svn update /pentest/svn/framework3/