Ethical Hacking: Enumerating and Fingerprinting Systems and Applications

Details about the HTTP Protocol

Web applications use many different protocols, the most prevalent of which is HTTP. This book assumes that you have a basic understanding of Internet protocols and their use, but this chapter takes a deep dive into the components of protocols like HTTP that you will find in nearly all web applications.

The HTTP Protocol

Let’s look at a few facts and definitions before we proceed to details about HTTP:

  • The HTTP 1.1 protocol is defined in RFC 7230RFC 7231RFC 7232RFC 7233RFC 7234, and RFC 7235.
  • HTTP/2 (HTTP version 2.0) is defined in RFC 7540.
  • In the examples in this lab, when we refer to an HTTP server, we basically mean a web server.
  • When we refer to HTTP clients, we are talking about browsers, proxies, API clients, and other custom HTTP client programs.
  • HTTP is a very simple protocol, which is both a good thing and a bad thing.
  • In most cases, HTTP is categorized as a stateless protocol that does not rely on a persistent connection for communication logic.
  • An HTTP transaction consists of a single request from a client to a server, followed by a single response from the server back to the client.
  • HTTP is different from stateful protocols, such as FTP, SMTP, IMAP, and POP. When a protocol is stateful, sequences of related commands are treated as a single interaction.
  • A server must maintain the state of its interaction with the client throughout the transmission of successive commands, until the interaction is terminated.
  • A sequence of transmitted and executed commands is often called a session.

What about HTTPS?

Hypertext Transfer Protocol Secure (HTTPS) is an extension of HTTP. HTTPS is the preferred method of communication for web applications and application programming interfaces (APIs), since the communication protocol is encrypted using Transport Layer Security (TLS) or, formerly, Secure Sockets Layer (SSL). The protocol is therefore also referred to as HTTP over TLS, or HTTP over SSL.

HTTP Proxies

HTTP proxies act as both servers and clients. Proxies make requests to web servers on behalf of other clients. They enable HTTP transfers across firewalls and can also provide support for caching of HTTP messages. Proxies can perform other roles in complex environments, including Network Address Translation (NAT) and filtering of HTTP requests.

There is another type of a “web proxy”. There are tools such as Burp Suite and the OWASP Zed Attack Proxy (ZAP) that allow you to intercept communications between a web browser or a client and a web server. Burp Suite and the OWASP ZAP are the most popular tools among pen testers, security researchers, and bug hunters that offer proxy capabilities.

Request and Response Model

HTTP is an application-level protocol in the TCP/IP protocol suite, and it uses TCP as the underlying transport layer protocol for transmitting messages. HTTP uses a request/response model, which basically means that an HTTP client program sends an HTTP request message to a server, and then the server returns an HTTP response message.

HTTP Methods

As an ethical hacker, you must be familiar with the different HTTP methods. The following are the different HTTP methods:

  • GET: Retrieves information from the server
  • HEAD: Basically the same as GET but returns only HTTP headers and no document body
  • POST: Sends data to the server (typically using HTML forms, API requests, and so on)
  • TRACE: Does a message loopback test along the path to the target resource
  • PUT: Uploads a representation of the specified URI
  • DELETE: Deletes the specified resource
  • OPTIONS: Returns the HTTP methods that the server supports
  • CONNECT: Converts the request connection to a transparent TCP/IP tunnel

Let’s use the curl tool to display the header information of an HTTP GET request to a web application running on a system with the IP address 10.6.6.8, as well as the response coming back from the web server.

curl -Ivs http://10.6.6.8

You should see the details about the GET Request and the response back from the web server/web application, similar to the output below:

$ curl -Ivs http://10.6.6.8
*   Trying 10.6.6.8:80...
* TCP_NODELAY set
* Connected to 10.6.6.8 (10.6.6.8) port 80 (#0)
> HEAD / HTTP/1.1
> Host: 10.6.6.8
> User-Agent: curl/7.68.0
> Accept: */*
> 
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
HTTP/1.1 200 OK
< Date: <today's date and time>
Date: <today's date and time>
< Server: Apache/2.4.10 (Debian)
Server: Apache/2.4.10 (Debian)
< Content-Type: text/html; charset=UTF-8
Content-Type: text/html; charset=UTF-8

Status Codes

The web server response includes a three-digit status code and a brief human-readable explanation of the status code. Below that you can see the text data (which is the HTML code coming back from the server and displaying the website contents).

Tip: It is important that you become familiar with HTTP message status codes. W3Schools provides a very good explanation at their website

The HTTP status code messages can be in the following ranges:

  • Messages in the 100 range are informational.
  • Messages in the 200 range are related to successful transactions.
  • Messages in the 300 range are related to HTTP redirections.
  • Messages in the 400 range are related to client errors.
  • Messages in the 500 range are related to server errors.

Web Sessions

A web session is a sequence of HTTP request and response transactions between a web client and a server. These transactions include pre-authentication tasks, the authentication process, session management, access control, and session finalization. Numerous web applications keep track of information about each user for the duration of a web transactions. Several web applications have the ability to establish variables such as access rights and localization settings. These variables apply to each and every interaction a user has with the web application for the duration of the session.

Web applications can create sessions to keep track of anonymous users after the very first user request. For example, an application can remember the user language preference every time it visits the site or application front end. In addition, a web application uses a session after the user has authenticated. This allows the application to identify the user on any subsequent requests and also to be able to apply security access controls and to increase the usability of the application. In short, web applications can provide session capabilities both before and after authentication.

After an authenticated session has been established, the session ID (or token) is temporarily equivalent to the strongest authentication method used by the application, such as usernames and passwords, one-time passwords, and client-based digital certificates.

TIP: A good resource that provides a lot of information about application authentication is [the OWASP Authentication Cheat Sheet](https://cheatsheetseries.owasp.org/cheatsheets/Authentication_Cheat_Sheet.html].

In order to keep the authenticated state and track user progress, applications provide users with session IDs, or tokens. A token is assigned at session creation time, and it is shared and exchanged by the user and the web application for the duration of the session. The session ID is a name/value pair.

The session ID names used by the most common web application development frameworks can be easily fingerprinted. For instance, you can easily fingerprint PHPSESSID (PHP), JSESSIONID (J2EE), CFID and CFTOKEN (ColdFusion), ASP.NET_SessionId (ASP .NET), and many others. In addition, the session ID name may indicate what framework and programming languages are used by the web application.

It is recommended to change the default session ID name of the web development framework to a generic name, such as id.

The session ID must be long enough to prevent brute-force attacks. Sometimes developers set it to just a few bits, though it must be at least 128 bits (16 bytes).

It is very important that a session ID be unique and unpredictable. You should use a good deterministic random bit generator (DRBG) to create a session ID value that provides at least 256 bits of entropy.

There are multiple mechanisms available in HTTP to maintain session state within web applications, including cookies (in the standard HTTP header), the URL parameters and rewriting defined in RFC 3986, and URL arguments on GET requests. In addition, developers use body arguments on POST requests, such as hidden form fields (HTML forms) or proprietary HTTP headers. However, one of the most widely used session ID exchange mechanisms is cookies, which offer advanced capabilities not available in other methods. Including the session ID in the URL can lead to the manipulation of the ID or session fixation attacks. It is therefore important to keep the session ID out of the URL.

Web development frameworks such as ASP .NET, PHP, and Ruby on Rails provide their own session management features and associated implementations. It is recommended to use these built-in frameworks rather than build your own from scratch, since they have been tested by many people. When you perform pen testing, you are likely to find people trying to create their own frameworks. In addition, JSON Web Token (JWT) can be used for authentication in modern applications.

This may seem pretty obvious, but you have to remember to encrypt an entire web session, not only for the authentication process where the user credentials are exchanged but also to ensure that the session ID is exchanged only through an encrypted channel. The use of an encrypted communication channel also protects the session against some session fixation attacks, in which the attacker is able to intercept and manipulate the web traffic to inject (or fix) the session ID on the victim’s web browser.

Session management mechanisms based on cookies can make use of two types of cookies: non-persistent (or session) cookies and persistent cookies. If a cookie has a Max-Age or Expires attribute, it is considered a persistent cookie and is stored on a disk by the web browser until the expiration time. Common web applications and clients prioritize the Max-Age attribute over the Expires attribute.

Modern applications typically track users after authentication by using non-persistent cookies. This forces the session information to be deleted from the client if the current web browser instance is closed. This is why it is important to use nonpersistent cookies: so the session ID does not remain on the web client cache for long periods of time.

Session IDs must be carefully validated and verified by an application. Depending on the session management mechanism that is used, the session ID will be received in a GET or POST parameter, in the URL, or in an HTTP header using cookies.

If web applications do not validate and filter out invalid session ID values, they can potentially be used to exploit other web vulnerabilities, such as SQL injection if the session IDs are stored on a relational database or persistent cross-site scripting (XSS) if the session IDs are stored and reflected back afterward by the web application.

ntroducing Banner Grabbing and Enumeration

Banner grabbing is referred to the act when you gain information about a system and services running on its open ports. So, what’s a banner? A banner is a text displayed by the targeted system that contains information about the software type, technology, and version running in the system.

Performing Banner Grabbing

In the Introducing Network and Port Scanning using Nmap and the Advanced Nmap Scanning and the Nmap Scripting Engine scenarios, you learned that you can use Nmap to perform active reconnaissance by scanning systems and getting software banner information, such as name and version.

As a refresher, install Nmap and perform a network discovery scan on the 10.6.6.0/24 network to find the two target systems available in this lab:

sudo apt update; sudo apt install nmap -y

You can perform a network discovery scan by using the -sn option, as demonstrated below:

nmap -sn 10.6.6.0/24

You should reveal the systems with the IP address 10.6.6.8 and 10.6.6.10.

You can perform an aggresive scan to find information about the two systems with the following commands:

nmap -A 10.6.6.8

and

nmap -A 10.6.6.10

  • What ports were you able to find open in bboth systems?
  • Can you determine the web server name and type of both systems?

HINT: A Nmap cheat sheet provided by H4cker.org can be viewed by visiting, or simply using curl and accessing https://h4cker.org/cheat/nmapcurl https://h4cker.org/cheat/nmap

Guess what? You can even use the Linux curl or wget utilities to perform basic banner grabbing of web applications, as demonstrated below:

curl -Ivs http://10.6.6.8

You should be able to obtain information about the underlying web server software (Apache version 2.4.10).

Let’s now use wget to obtain the web server type and version of the system running on 10.6.6.10:

wget -q -S http://10.6.6.10

The system is running nginx version 1.14.2.

You can even use the telnet command to perform banner grabbing, as demonstrated below:

telnet 10.6.6.8 80

Enumeration and Banner Grabbing with WhatWeb

Whatweb is a tool that can be used to disclose the web server information such as the IP address, version, webpage title, and running operating system.

You can install whatweb with the following command:

sudo apt update && apt install whatweb -y

Whatweb supports numerous options to perform reconnaissance. Access the help and command syntax by executing the following command:

whatweb -h

Notice that you can specify different aggression level controls (the default is Stealthy):

AGGRESSION:
The aggression level controls the trade-off between speed/stealth and
reliability.
  --aggression, -a=LEVEL        Set the aggression level. Default: 1.
  1. Stealthy                   Makes one HTTP request per target and also
                                follows redirects.
  3. Aggressive                 If a level 1 plugin is matched, additional
                                requests will be made.
  4. Heavy                      Makes a lot of HTTP requests per target. URLs
                                from all plugins are attempted.

Let’s perform an “aggresive” enumeration of the web application running on 10.6.6.8:

whatweb --aggression 3 10.6.6.8

Recon with DMitry

The Deepmagic Information Gathering Tool (DMitry) can be used to perform enumeration, banner grabbing, and other recon activities. You can install with the following command:

sudo apt update && apt install dmitry -y

Once installed, access the command syntax help using:

dmitry -h

Let’s perform basic enumeration and banner grabbing of the web application and system running on 10.6.6.10.

dmitry -b 10.6.6.10

  • Where you able to find the FTP server type and version?
  • What is the OpenSSH version used by the targeted system?

ntroduction to Vulnerability Scanning

The following interactive scenarios include information about different scanning technologies and solutions such as Nmap and the web application scanner called Nikto:

Nmap provides a user with a powerful toolset of features, that allows the user to create scripts to complete custom tasks. Scripts are created using the LUA scripting language and end with the .nse file extension. There are well over 300+ examples to choose from, and many are installed with Nmap. The Nmap documentation provides a complete comprehensive list of scripts that ship with Nmap when installing.

OWASP Zed Attack Proxy

You can use the OWASP Zed Attack Proxy (ZAP) to perform comprehensive vulnerability scanning of web applications. The OWASP ZAP full scan is a script that is available in the ZAP Docker images.

You can obtain the OWASP ZAP Docker container stable release by executing the following command:

docker pull owasp/zap2docker-stable

In this lab, we will use the stable release. However, for your reference only, you can obtain the the latest weekly release by executing the following command:

docker pull owasp/zap2docker-weekly

You can obtain the the live release (built whenever the zaproxy project is changed):

docker pull owasp/zap2docker-live

You can obtain the the bare release using the following command:

docker pull owasp/zap2docker-bare

NOTE: The bare release is a very small Docker image that contains only the necessary required dependencies to run OWASP ZAP. This makes it ideal for continuous integration (CI) environments.

The Dockerfiles can be found from the OWASP ZAP GitHub repository.

In the following step, you will learn how to launch a full scan using the OWASP ZAP.

Web Server Vulnerability Identification

The OWASP ZAP runs the ZAP spider against the specified target followed by an optional ajax spider scan and then a full active scan before reporting the results. In other words, the script performs actual ‘attacks’ and can potentially run for a long period of time.

Execute the following command to perform a full scan:

docker run -t owasp/zap2docker-stable zap-full-scan.py -t http://10.6.6.8

By default, the OWASP ZAP reports all alerts as WARNings but you can specify a config file which can change any rules to FAIL or IGNORE. The configuration works in a very similar way as the Baseline Scan so see the Baseline page for more details.

NetBIOS Enumeration

On the Introducing Network and Port Scanning using Nmap and the Advanced Nmap Scanning and the Nmap Scripting Engine scenarios you learned details about the Nmap scanner.

The following is a good trick to enumerate any devices that are running NetBIOS in a given subnet.

First, install Nmap: apt update && apt install nmap -y

Then perform the following scan to find any systems that are running the default NetBIOS ports (139 and 445):

nmap -v -p 139,445 -oG netbios.txt 10.6.6.0/24

The output of the scan is also saved in a file called netbios.txt. Open the file to analyze the results of the scan: cat netbios.txt

Additional Enumeration using the Nmap Scripting Engine

Now that you know that the system with IP address 10.6.6.10 is running NetBIOS, you can perform additional enumeration using the following command:

nmap -p 139,445 -sC 10.6.6.10

The -sC options launches the most common Nmap Scritpting Engine (NSE) scripts against the services running (i.e., open ports) in the target system. You can search for all the smb related NSE scripts by executing the following command:

ls /usr/share/nmap/scripts/ | grep smb

Let’s try to enumerate the system’s shares using the following command:

nmap --script smb-enum-shares.nse 10.6.6.10

Using Metasploit

Metasploit is a very popular exploitation framework used by bug hunters and penetration testers. It includes several auxiliary modules that can be used to enumerate systems and applications.

We will not install Metasploit in this lab. However, the following are the Metasploit commands for performing SMB enumeration using the Metasploit auxiliary module.

Enumerating the SMB version

The following is an example on how to enumerate the SMB version used in a Samba installation using Metasploit.

msf > use auxiliary/scanner/smb/smb_version
msf auxiliary(scanner/smb/smb_version) > set RHOSTS 10.6.6.10
RHOSTS => 10.6.6.10
msf auxiliary(scanner/smb/smb_version) > run
[*] 10.6.6.10:139    - Host could not be identified: Unix (Samba 2.2.1a)

SMB Brute Force

The following Metasploit auxiliary module can be used to perform an SMB Brute Force attack:

msf> use auxiliary/scanner/smb/smb_login

Existing users

msf auxiliary(scanner/smb/smb_lookupsid) > use auxiliary/scanner/smb/smb_lookupsid
msf auxiliary(scanner/smb/smb_lookupsid) > set RHOSTS 10.6.6.10
RHOSTS => 10.6.6.10
msf auxiliary(scanner/smb/smb_lookupsid) > run
[*] 10.6.6.10:139    - PIPE(LSARPC) LOCAL(MYGROUP - 5-21-4157223341-3243572438-1405127623) DOMAIN(MYGROUP - )
[*] 10.6.6.10:139    - TYPE=0 NAME=Administrator rid=500

Enumerating Samba Implementations
Samba enables Linux hosts to communicate with systems running Windows in a network. Samba is open source software originally developed for file and print share for all clients using the SMB protocol. However, it has evolved and added more capabilities. Attackers have abused many Samba and SMB implementations to perform different attacks. The following are some additional tips on how to enumerate Samba implementations.

Accessing the Attacking System
In this step, we will use an attacking system running the Parrot Security OS in a Docker container. Type the following command to access the container:

docker exec -it attacker bash

Your prompt should change to the following:

┌─[root@attacker]─[/]
└──╼ #
Note: The container should've been launched automatically when you started this lab. If you have trouble accessing the container, verify that is running by using the docker ps command. Alternatively, you can manually launch all the containers needed by this lab by executing bash setup.sh.

Enumerating Samba Implementations using enum4Linux and enum4linux-ng
In the previous step you learned how to use Nmap and Metasploit to perform SMB enumeration. There are other tools that can be used to perform further enumeration. One of the most popular tools is enum4linux and a new alternative called enum4linux-ng.

In this lab we will use enum4linux-ng. Complete the following steps to install and run enum4linux-ng:

Step 1. From the attacker system, clone the GitHub repository:

git clone https://github.com/cddmp/enum4linux-ng

Step 2. enum4linux-ng was created using Python. Install the Python 3 pip to install the required dependencies:

apt update && apt install -y python3-pip

Step 3. Access the enum4linux-ng directory:

cd enum4linux-ng

Step 4. Install the required dependencies using pip3: pip3 install -r requirements.txt

Step 5. You should now be able to run enum4linux-ng and access the help menu: #python3 enum4linux-ng.py  -h

The output should be similar to the text below:

ENUM4LINUX - next generation

usage: enum4linux-ng.py [-h] [-A] [-As] [-U] [-G] [-Gm] [-S] [-C] [-P] [-O] [-L] [-I] [-R] [-N] [-w WORKGROUP] [-u USER] [-p PW] [-d] [-k USERS] [-r RANGES] [-s SHARES_FILE]
                        [-t TIMEOUT] [-v] [--keep] [-oJ OUT_JSON_FILE | -oY OUT_YAML_FILE | -oA OUT_FILE]
                        host

This tool is a rewrite of Mark Lowe's enum4linux.pl, a tool for enumerating information from Windows and Samba systems. It is mainly a wrapper around the Samba tools nmblookup, net,
rpcclient and smbclient. Other than the original tool it allows to export enumeration results as YAML or JSON file, so that it can be further processed with other tools. The tool
tries to do a 'smart' enumeration. It first checks whether SMB or LDAP is accessible on the target. Depending on the result of this check, it will dynamically skip checks (e.g. LDAP
checks if LDAP is not running). If SMB is accessible, it will always check whether a session can be set up or not. If no session can be set up, the tool will stop enumeration. The
enumeration process can be interupted with CTRL+C. If the options -oJ or -oY are provided, the tool will write out the current enumeration state to the JSON or YAML file, once it
receives SIGINT triggered by CTRL+C. The tool was made for security professionals and CTF players. Illegal use is prohibited.

positional arguments:
  host

optional arguments:
  -h, --help         show this help message and exit
  -A                 Do all simple enumeration including nmblookup (-U -G -S -P -O -N -I -L). This option is enabled if you don't provide any other option.
  -As                Do all simple short enumeration without NetBIOS names lookup (-U -G -S -P -O -I -L)
  -U                 Get users via RPC
  -G                 Get groups via RPC
  -Gm                Get groups with group members via RPC
  -S                 Get shares via RPC
  -C                 Get services via RPC
  -P                 Get password policy information via RPC
  -O                 Get OS information via RPC
  -L                 Get additional domain info via LDAP/LDAPS (for DCs only)
  -I                 Get printer information via RPC
  -R                 Enumerate users via RID cycling
  -N                 Do an NetBIOS names lookup (similar to nbtstat) and try to retrieve workgroup from output
  -w WORKGROUP       Specify workgroup/domain manually (usually found automatically)
  -u USER            Specify username to use (default "")
  -p PW              Specify password to use (default "")
  -d                 Get detailed information for users and groups, applies to -U, -G and -R
  -k USERS           User(s) that exists on remote system (default: administrator,guest,krbtgt,domain admins,root,bin,none). Used to get sid with "lookupsid known_username"
  -r RANGES          RID ranges to enumerate (default: 500-550,1000-1050)
  -s SHARES_FILE     Brute force guessing for shares
  -t TIMEOUT         Sets connection timeout in seconds (default: 5s)
  -v                 Verbose, show full samba tools commands being run (net, rpcclient, etc.)
  --keep             Don't delete the Samba configuration file created during tool run after enumeration (useful with -v)
  -oJ OUT_JSON_FILE  Writes output to JSON file (extension is added automatically)
  -oY OUT_YAML_FILE  Writes output to YAML file (extension is added automatically)
  -oA OUT_FILE       Writes output to YAML and JSON file (extensions are added automatically)
Step 6. Run the following command to enumerate information about the intentionally vulnerable system (10.6.6.10): python3 enum4linux-ng.py -As 10.6.6.10

The output should be similar to the text below. Notice that the tool was able to enumerate two users, SMB shares, and other information of the target system.

ENUM4LINUX - next generation

 ==========================
|    Target Information    |
 ==========================
[*] Target ........... 10.6.6.10
[*] Username ......... ''
[*] Random Username .. 'nmknyyro'
[*] Password ......... ''
[*] Timeout .......... 5 second(s)

 =================================
|    Service Scan on 10.6.6.10    |
 =================================
[*] Checking LDAP
[-] Could not connect to LDAP on 389/tcp: connection refused
[*] Checking LDAPS
[-] Could not connect to LDAPS on 636/tcp: connection refused
[*] Checking SMB
[+] SMB is accessible on 445/tcp
[*] Checking SMB over NetBIOS
[+] SMB over NetBIOS is accessible on 139/tcp

 ======================================
|    SMB Dialect Check on 10.6.6.10    |
 ======================================
[*] Trying on 445/tcp
[+] Supported dialects and settings:
SMB 1.0: true
SMB 2.02: true
SMB 2.1: true
SMB 3.0: true
SMB1 only: false
Preferred dialect: SMB 3.0
SMB signing required: false

 ======================================
|    RPC Session Check on 10.6.6.10    |
 ======================================
[*] Check for null session
[+] Server allows session using username '', password ''
[*] Check for random user session
[-] Could not establish random user session: STATUS_LOGON_FAILURE

 ================================================
|    Domain Information via RPC for 10.6.6.10    |
 ================================================
[+] Domain: WORKGROUP
[+] SID: NULL SID
[+] Host is part of a workgroup (not a domain)

 ========================================================
|    Domain Information via SMB session for 10.6.6.10    |
 ========================================================
[*] Enumerating via unauthenticated SMB session on 445/tcp
[+] Found domain information via SMB
NetBIOS computer name: GRAVEMIND
NetBIOS domain name: ''
DNS domain: ''
FQDN: gravemind

 ============================================
|    OS Information via RPC for 10.6.6.10    |
 ============================================
[*] Enumerating via unauthenticated SMB session on 445/tcp
[+] Found OS information via SMB
[*] Enumerating via 'srvinfo'
[+] Found OS information via 'srvinfo'
[+] After merging OS information we have the following result:
OS: Linux/Unix (Samba 4.9.5-Debian)
OS version: '6.1'
OS release: ''
OS build: '0'
Native OS: Windows 6.1
Native LAN manager: Samba 4.9.5-Debian
Platform id: '500'
Server type: '0x809a03'
Server type string: Wk Sv PrQ Unx NT SNT Samba 4.9.5-Debian

 ==================================
|    Users via RPC on 10.6.6.10    |
 ==================================
[*] Enumerating users via 'querydispinfo'
[+] Found 2 users via 'querydispinfo'
[*] Enumerating users via 'enumdomusers'
[+] Found 2 users via 'enumdomusers'
[+] After merging user results we have 2 users total:
'1000':
  username: masterchief
  name: ''
  acb: '0x00000015'
  description: ''
'1001':
  username: arbiter
  name: ''
  acb: '0x00000015'
  description: ''

 ===================================
|    Groups via RPC on 10.6.6.10    |
 ===================================
[*] Enumerating local groups
[+] Found 0 group(s) via 'enumalsgroups domain'
[*] Enumerating builtin groups
[+] Found 0 group(s) via 'enumalsgroups builtin'
[*] Enumerating domain groups
[+] Found 0 group(s) via 'enumdomgroups'

 ===================================
|    Shares via RPC on 10.6.6.10    |
 ===================================
[*] Enumerating shares
[+] Found 4 share(s):
IPC$:
  comment: IPC Service (Samba 4.9.5-Debian)
  type: IPC
homes:
  comment: All home directories
  type: Disk
print$:
  comment: Printer Drivers
  type: Disk
workfiles:
  comment: Confidential Workfiles
  type: Disk
[*] Testing share IPC$
[-] Could not check share: STATUS_OBJECT_NAME_NOT_FOUND
[*] Testing share homes
[-] Share doesn't exist
[*] Testing share print$
[+] Mapping: OK, Listing: OK
[*] Testing share workfiles
[+] Mapping: OK, Listing: OK

 ======================================
|    Policies via RPC for 10.6.6.10    |
 ======================================
[*] Trying port 445/tcp
[+] Found policy:
domain_password_information:
  pw_history_length: None
  min_pw_length: 5
  min_pw_age: none
  max_pw_age: 49710 days 6 hours 21 minutes
  pw_properties:
  - DOMAIN_PASSWORD_COMPLEX: false
  - DOMAIN_PASSWORD_NO_ANON_CHANGE: false
  - DOMAIN_PASSWORD_NO_CLEAR_CHANGE: false
  - DOMAIN_PASSWORD_LOCKOUT_ADMINS: false
  - DOMAIN_PASSWORD_PASSWORD_STORE_CLEARTEXT: false
  - DOMAIN_PASSWORD_REFUSE_PASSWORD_CHANGE: false
domain_lockout_information:
  lockout_observation_window: 30 minutes
  lockout_duration: 30 minutes
  lockout_threshold: None
domain_logoff_information:
  force_logoff_time: 49710 days 6 hours 21 minutes

 ======================================
|    Printers via RPC for 10.6.6.10    |
 ======================================
[+] No printers returned (this is not an error)

Completed after 12.35 seconds
TIP: This chapter provides additional details about how to perform information gathering and vulnerability identification

Ethical Hacking: Active Recon – Fuzzing Web Applications Using the FFUF Fuzzer

Introducing Web Application Reconnaissance and Fuzzing

Web application reconnaissance is the explorative and information-gathering phase that generally occurs prior to hacking a web application. Web application reconnaissance is typically performed by penetration testers and bug bounty hunters, but can also be an effective way for software developers and engineers to find vulnerabilities and misconfigurations in a web application. The goal is to fix these security issues before a malicious threat actor finds them.

As you progress through this lab, you will learn how to build up a map and attack plan that represents the structure, organization, and functionality of a web application. With time, you will develop your own techniques and your own methods of recording and organizing the information you find as you become more proficient at web application reconnaissance.

Components of a Modern Web Application

The tools, frameworks, and architectures available for building web applications have advanced significantly in the last few years. Historically, web applications were built using server-side frameworks that rendered an HTML/JS/CSS page that would then be sent to the client. When the web client needed an update, it would simply request another page from the server to be rendered and “piped” over HTTP. Web applications then began to use HTTP more frequently with the rise of Ajax (asynchronous JavaScript and XML), allowing network requests to be made from within a page session via JavaScript.

Fast-forward several years and today many applications are represented as two or more microservices communicating via a network protocol, versus a single monolithic application. This is one major architectural difference between the web applications of today and the web applications of years ago. Modern web applications are comprised of several microservices connected with one or more Representational State Transfer (REST) APIs.

Many client (UI) applications run in the browser in somewhat similar ways to a traditional desktop application. These client applications manage their own life cycle loops, request their own data, and do not require a page reload after the initial bootstrap is complete.

The average modern-day web application often uses one or more of the following technologies:

  • REST APIs
  • JSON or XML
  • JavaScript
  • SPA framework (React, Vue, EmberJS, AngularJS)
  • An authentication and authorization system
  • One or more web servers (typically on a Linux server)
  • One or more web server software packages (ExpressJS, Apache, NginX)
  • One or more databases (MySQL, MongoDB, etc.)
  • A local data store on the client (cookies, web storage, IndexDB)

What is Web Application Reconnaissance?

In short, web application reconnaissance (recon) is the act of finding interesting directories, files, frameworks, API endpoints, and any other underlying construct of a web application.

What is Fuzzing?

Fuzz testing or Fuzzing is a testing technique that is used to find input validation vulnerabilities and other implementation bugs using malformed or semi-malformed data injection in an automated fashion. A “fuzzer” is a piece of software that is used to perform the aforementioned techniques to find input validation issues, but they can also be used for recon.

The following are the three generic categories of fuzzers:

  • generation-based: the fuzzer generates inputs from scratch.
  • mutation-based: the fuzzer leverages an existing corpus of seed inputs.
  • evolutionary: allows the fuzzer to use feedback from each test case to learn the format of the input over time.

Fuzzing Vectors and Wordlists

What is a wordlist? A wordlist is a text file containing a collection of words to use in different attacks including, but not limited to password cracking, recon, and fuzzing.

The following references are provided as input sources for fuzzing and related testing activities.

Introducing ffuf

ffuf or “Fuzz Faster U Fool” is a web application fuzzer written in Go. It is a very popular tool among penetration testers, ethical hackers, and bug hunters to perform web application reconnaissance.

In the next section, you will learn how to install ffuf.

Installing the ffuf Fuzzer

If you already have Go installed, the easiest option to install ffuf is to use the following command:

go get -u github.com/ffuf/ffuf

NOTE: We already have Go installed in the O’Reilly Katacoda environment.

ffuf should now be installed in the system. Execute the following command to see the installed version of ffuf:

ffuf -V

Accessing the Source Code

You can access the ffuf fuzzer source code at the following GitHub repository: https://github.com/ffuf/ffuf

Alternatively, you can install ffuf using the following steps:

  1. Clone the repository: git clone https://github.com/ffuf/ffuf
  2. Navigate to the ffuf directory: cd ffuf
  3. Execute go get && go build

Pre-built Binaries

You can also use any of the pre-built binaries from the ffuf GitHub repository release page

In the following section, you will learn how to find directories and files in a web application or website using ffuf.

Finding Directories and Files using ffuf

The following is the topology used in this lab.

┌──────────────┐
│              │
│  Attacker    ├───────┐
│              │       │
└──────────────┘       │
                       │
                       ├──── Gateway ───── Internet
┌──────────────┐       │     10.6.6.1
│              │.8     │
│   Victim     ├───────┘
│              │
└──────────────┘

The target web application (Victim) is running on a container named “unsc_infinity” configured with the IP address 10.6.6.8.

Use the docker ps --format "table {{.Names}}\t{{.Status}}" command to verify that the container is running.

Downloading the wordlist

As mentioned in Step 1ffuf uses wordlists to discover directories and files, as well as to fuzz a web application. Let’s download a common wordlist from https://hackingscenarios.com to enumerate directories in the target web application.

wget https://hackingscenarios.com/wordlists/dir_enum

Directory and File Enumeration

Use the following command to enumerate directories and files in the target web application.

ffuf -w dir_enum -u http://10.6.6.8/FUZZ

The -w option is used to specify the wordlist (dir_enum) and the -u option is used to specify the URL of the target application. You must include the FUZZ keyword wherever you would like the fuzzer to iterate through the words in the wordlists and find directories or files.

Once the ffuf fuzzer finished the discovery:

  • What directories and files were you able to discover?
  • Did you find the API?
  • What about the admin and login pages?

Recursion

The ffuf tool supports recursion to find additional files and directories under the discovered directories. For instance, you probably found the /admin directory. In order for you to find additional subdirectories, you will need to execute the following command:

ffuf -w dir_enum -u http://10.6.6.8/admin/FUZZ

Unfortunately, this doesn’t scale. During a penetration test or a bug hunting exercise, you may find dozens of directories. By using -recursion ffuf will try to find additional directories or files using the path of all discovered directories. You can also set the -recursion-depth to tell ffuf how many times to perform this action.

Run the following command to perform recursion:

ffuf -w dir_enum -u http://10.6.6.8/FUZZ -recursion

Additional Wordlists

In Step 1, you learned about additional sources where you can obtain wordlists for fuzzing, password cracking, and recon. One of the most comprehensive repositories of wordlists and payloads in SecLists.

  • Clone the repository with the following command: git clone --depth 1 https://github.com/danielmiessler/SecLists.git
  • Change to the SecLists directory: cd SecLists
  • Use ffuf with one or more of the wordlists included in the SecLists directory.
  • cd ~ back into the home directory to continue with the scenario.

In the next step, you will learn how to fuzz multiple locations.

Fuzzing Multiple Locations

The ffuf fuzzer only looks for a single location (where you put the word FUZZ) by default. However, you can fuzz multiple locations and even use multiple wordlists.

You can use the arguments W1W2, etc. to specify one or more wordlists in different URI locations, as demonstrated below:

ffuf -w ~/dir_enum:W1 -u http://10.6.6.8/W1

Execute the following command to use multiple wordlists:

ffuf -w /root/dir_enum:W1,/root/SecLists/Discovery/Web-Content/dirsearch.txt:W2 -u http://10.6.6.8/W1/W2

The first wordlist is the file you downloaded from https://hackingscenarios.com (/root/dir_enum) and the second is located in the /root/SecLists directory (the previously cloned repository).

Automating the scan of multiple domains or IP addresses

You can also create a wordlist with numerous domains or IP addresses of target applications and run ffuf as demonstrated below:

ffuf -u https://W2/W1 -w dir_enum:W1,domains.txt:W2

This tells ffuf to scan each of the domains in the domains.txt file using the wordlist dir_enum.

Saving the output to a JSON file

The -o option allows you to send the output to a JSON file (out.json in the example below).

ffuf -w dir_enum -u http://10.6.6.8/FUZZ -o out.json

Execute the following command to verify the new file:

cat out.json

In the next section, you will learn how to handle authentication in the web application.

Handling Authentication

Cookies

The -b option allows you to pass cookie data in the following format:

"NAME1=VALUE1; NAME2=VALUE2"

These options/values are not limited to authentication based cookies. Any elements of the cookie can also be fuzzed with a wordlist for additional discovery.

Header-Based Authentication

You can use the -H option to interact with applications that are using HTTP header-based authentication. This can be used to pass or fuzz any headers (not just for passing required elements for authentication).

Often, ethical hackers, pen testers, and bug bounty hunters use the -H flag when they are required to specify a custom header to allow the “blue team” (the incident response and InfoSec teams) to identify your traffic.

In the next section, you will learn different obfuscation and evasion techniques.

Obfuscation and Evasion Techniques

Ffuf uses 40 threads by defaults when you are executing a test. If you are just practicing your skills in a lab or participating in a “capture-the-flag” (CTF) event, you can configure ffuf to use even more threads. However, if you are doing a test in a production environment then you will likely be detected by the security operations team or incident response team (or even blocked). You should keep your thread count lower.

You can use the -t option to set the number of concurrent threads, as demonstrated below:

ffuf -t 2 -w dir_enum -u http://10.6.6.8/admin/FUZZ

You can also rate-limit the number of requests per second with the -rate option.

The -p option allows you to configure a “delay” (in seconds) between requests or a “range of random delay”. For example -p 0.1 or -p 0.1-2.0

In the next section, you will learn how to send the ffuf fuzzer results to a web proxy such as Burp Suite or the OWASP Zed Attack Proxy (ZAP).

Sending the Fuzzer Output to a Web Proxy

The -replay-proxy option allows you to send the paths of the directories found to a web proxy such as Burp Suite or the OWASP Zed Attack Proxy (ZAP).

Why is this useful? Well, the Burp Suite Community Edition does not allow automated scanning. Using the -replay-proxy option allows you to send all the successful results right into Burp Suite for further analysis.

We cannot run a web proxy such as Burp Suite or the OWASP Zed Attack Proxy (ZAP) in this lab. However, I am including the ffuf command options for your reference.

ffuf -w dir_enum -u http://10.6.6.8/FUZZ -replay-proxy http://127.0.0.1:8080

NOTE: By default, Burp Suite and the OWASP Zed Attack Proxy (ZAP) listen to proxy client transactions on port 8080.

Sending the results over a reverse SSH tunnel

You can also run a reverse SSH tunnel, so you can run your ffuf a remote system while sending the output to Burp Suite running on your local system.

Creating the SSH tunnel:

ssh -R 8888:localhost:8080 user@remotevps

Sending the output to the proxy over the SSH tunnel

ffuf -w dir_enum -u http://10.6.6.8/FUZZ -replay-proxy http://127.0.0.1:8888

Ethical Hacking: Capturing and Analyzing Packet Packets with TShark and tcpdump

Introduction to Tshark

Using the apt package manager on our Ubuntu host, we can install Tshark by running the command:

apt update; apt install -y tshark

You will receive a message asking if “non-superusers be able to capture packets”. It is good security practice to select no, unless you know what you are doing, or your users need access to the Tshark package.

After the prompt, the installation should continue and you will be brought back to the bash terminal prompt.

Verify Installation Completed

To verify that Tshark is installed, execute Tshark with the --version flag to output the version number.

tshark --version

Docker

The rest of the scenario will use Docker to simulate a vulnerable host on a network. The gravemind Docker container is obtained from Docker Hub. Multiple hosts will be set up for you using Docker.

Please verify that two gravemind instances are running using the following command:

docker ps

If no containers running, a setup script is provided in your home directory and can be executed by running: bash ~/gravemind_docker_network_setup.sh

These two containers have statically assigned IP Addresses:

  • Container 1: 10.0.0.5
  • Container 2: 10.0.0.6

Getting started with Tshark

When invoking Tshark, the program will indefinitely print out all captured packets on the first interface of your device. To start Tshark, run the tshark command.

You will see a list of packets similar to the following output:

root@katacoda:~# tshark -i br-5039c3895eb9
Running as user "root" and group "root". This could be dangerous.
Capturing on 'br-5039c3895eb9'
    1 0.000000000     10.0.0.1 → 10.0.0.5     ICMP 98 Echo (ping) request  id=0x0fd2, seq=1/256, ttl=64
    2 0.000030969     10.0.0.5 → 10.0.0.1     ICMP 98 Echo (ping) reply    id=0x0fd2, seq=1/256, ttl=64 (request in 1)
    3 1.018681059     10.0.0.1 → 10.0.0.5     ICMP 98 Echo (ping) request  id=0x0fd2, seq=2/512, ttl=64
    4 1.018709052     10.0.0.5 → 10.0.0.1     ICMP 98 Echo (ping) reply    id=0x0fd2, seq=2/512, ttl=64 (request in 3)
    5 2.046488928     10.0.0.1 → 10.0.0.5     ICMP 98 Echo (ping) request  id=0x0fd2, seq=3/768, ttl=64
    6 2.046515187     10.0.0.5 → 10.0.0.1     ICMP 98 Echo (ping) reply    id=0x0fd2, seq=3/768, ttl=64 (request in 5)
    7 3.066487395     10.0.0.1 → 10.0.0.5     ICMP 98 Echo (ping) request  id=0x0fd2, seq=4/1024, ttl=64
    8 3.066514907     10.0.0.5 → 10.0.0.1     ICMP 98 Echo (ping) reply    id=0x0fd2, seq=4/1024, ttl=64 (request in 7)
    9 5.146577501 02:42:d0:4e:95:8b → 02:42:0a:00:00:05 ARP 42 Who has 10.0.0.5? Tell 10.0.0.1
   10 5.146564837 02:42:0a:00:00:05 → 02:42:d0:4e:95:8b ARP 42 Who has 10.0.0.1? Tell 10.0.0.5
   11 5.146662842 02:42:d0:4e:95:8b → 02:42:0a:00:00:05 ARP 42 10.0.0.1 is at 02:42:d0:4e:95:8b
   12 5.146667771 02:42:0a:00:00:05 → 02:42:d0:4e:95:8b ARP 42 10.0.0.5 is at 02:42:0a:00:00:05

Note: Packets will be different than the above output depending on the generated network traffic ongoing on the host.

To stop Tshark at any time, use the keybinding ^C.

Selecting an interface to listen through.

In many cases, hosts will have more than one interface connected at a time. For example, on our Ubuntu host we can see the different interfaces present by using the command:

ip link

$ ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: ens3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
    link/ether 02:42:ac:11:00:24 brd ff:ff:ff:ff:ff:ff
3: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default 
    link/ether 02:42:0c:66:4e:d1 brd ff:ff:ff:ff:ff:ff
4: br-285319d5dca3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default 
    link/ether 02:42:90:8c:93:14 brd ff:ff:ff:ff:ff:ff
6: veth1786149@if5: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-285319d5dca3 state UP mode DEFAULT group default 
    link/ether 3a:08:87:64:fb:c8 brd ff:ff:ff:ff:ff:ff link-netnsid 1
8: vethfa857fe@if7: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-285319d5dca3 state UP mode DEFAULT group default 
    link/ether 82:4f:00:c9:80:53 brd ff:ff:ff:ff:ff:ff link-netnsid 0

Our gravemind containers are running on the 10.0.0.0/24 network. We can verify which interface this network is attached to by using the command:

ip route

$ ip route
default via 172.17.0.1 dev ens3 
10.0.0.0/24 dev br-285319d5dca3 proto kernel scope link src 10.0.0.1 
172.17.0.0/16 dev ens3 proto kernel scope link src 172.17.0.36 
172.18.0.0/24 dev docker0 proto kernel scope link src 172.18.0.1 linkdown

Above we can see that the 10.0.0.0/24 interface is connected through the br-XXXXXXXXXX network.

Tshark also provides the -D or --list-interfaces arguments that will list all scannable interfaces. To view all interfaces using Tshark run the command:

tshark -D

1. veth80cadfe
2. vethdaf12b0
3. ens3
4. br-45f4ba650740
5. lo (Loopback)
6. any
7. docker0
8. bluetooth-monitor
9. nflog
10. nfqueue
11. ciscodump (Cisco remote capture)
12. dpauxmon (DisplayPort AUX channel monitor capture)
13. randpkt (Random packet generator)
14. sdjournal (systemd Journal Export)
15. sshdump (SSH remote capture)
16. udpdump (UDP Listener remote capture)

To run Tshark on this interface, run the command:

tshark -i br-45f4ba650740

IMPORTANT: The docker bridge interface may be named differently so please use the interface name shown to you from within the ip route command. You can easily execute the following command to make sure that the correct bridge interface is selected: ip -brie a | grep br- | awk '{print $1}' | xargs tshark -i

Due to a ping command initiated at container setup, should see a series of ping requests populate the screen. The output will be similar to the following:

$ tshark -i br-285319d5dca3
Running as user "root" and group "root". This could be dangerous.
Capturing on 'br-285319d5dca3'
    1 0.000000000 02:42:0a:00:00:05 → 02:42:90:8c:93:14 ARP 42 Who has 10.0.0.1? Tell 10.0.0.5
    2 0.000054833 02:42:90:8c:93:14 → 02:42:0a:00:00:05 ARP 42 10.0.0.1 is at 02:42:90:8c:93:14
    3 0.000115543     10.0.0.1 → 10.0.0.5     ICMP 98 Echo (ping) request  id=0x0008, seq=205/52480, ttl=64
    4 0.000145285     10.0.0.5 → 10.0.0.1     ICMP 98 Echo (ping) reply    id=0x0008, seq=205/52480, ttl=64 (request in 3)
    5 1.024159304     10.0.0.1 → 10.0.0.5     ICMP 98 Echo (ping) request  id=0x0008, seq=206/52736, ttl=64
    6 1.024207545     10.0.0.5 → 10.0.0.1     ICMP 98 Echo (ping) reply    id=0x0008, seq=206/52736, ttl=64 (request in 5)
    7 2.048099767     10.0.0.1 → 10.0.0.5     ICMP 98 Echo (ping) request  id=0x0008, seq=207/52992, ttl=64
    8 2.048144338     10.0.0.5 → 10.0.0.1     ICMP 98 Echo (ping) reply    id=0x0008, seq=207/52992, ttl=64 (request in 7)

[ ... additional output omitted ... ]

Note: For the remainder of the scenario, you must substitute the br-XXXXXXXXXX for the interface found above.

Listing Tsharks available commands

If you are stuck or are curious about available commands, you can run the tshark --help command to receive the help menu

Tshark output and filtering

Tshark output can be filtered and saved to multiple file formats.

Writing a scan to a file

Raw packet output can be saved to a file, usually with the file extension .pacp, by using the -w FILENAME argument.

tshark -w FILENAME.pcap -i br-285319d5dca3

Note: Please enter the interface found when executing ip route

root@katacoda:~# tshark -i eth0 -w ~/output.txt
Running as user "root" and group "root". This could be dangerous.
Capturing on 'eth0'

Reading a scan from a .pcap file

In many instances, you may want to take the raw packet output from a file generated by the -w argument and parse through the information. You can read back the file using the -r FILENAME.pacp argument.

tshark -r FILENAME.pcap

root@katacoda:~# tshark -r output.txt 
Running as user "root" and group "root". This could be dangerous.
    1 0.000000000     10.0.0.1 → 10.0.0.5     ICMP 98 Echo (ping) request  id=0xf318, seq=1/256, ttl=64
    2 0.000036209     10.0.0.5 → 10.0.0.1     ICMP 98 Echo (ping) reply    id=0xf318, seq=1/256, ttl=64 (request in 1)
    3 1.029341860     10.0.0.1 → 10.0.0.5     ICMP 98 Echo (ping) request  id=0xf318, seq=2/512, ttl=64
    4 1.029376035     10.0.0.5 → 10.0.0.1     ICMP 98 Echo (ping) reply    id=0xf318, seq=2/512, ttl=64 (request in 3)
    5 2.053337195     10.0.0.1 → 10.0.0.5     ICMP 98 Echo (ping) request  id=0xf318, seq=3/768, ttl=64
    6 2.053366902     10.0.0.5 → 10.0.0.1     ICMP 98 Echo (ping) reply    id=0xf318, seq=3/768, ttl=64 (request in 5)
    7 3.077335500     10.0.0.1 → 10.0.0.5     ICMP 98 Echo (ping) request  id=0xf318, seq=4/1024, ttl=64

[ ... additional output omitted ... ]

Exporting a scan in JSON

Tshark provides the ability to output scans in JSON formatting by using the -T json argument.

tshark -T json -i br-285319d5dca3

root@katacoda:~# tshark -T json -i br-acafd867c66c | head -n 30 
Running as user "root" and group "root". This could be dangerous.
Capturing on 'br-acafd867c66c'
[
  {
    "_index": "packets-2021-08-21",
    "_type": "doc",
    "_score": null,
    "_source": {
      "layers": {
        "frame": {
          "frame.interface_id": "0",
          "frame.interface_id_tree": {
            "frame.interface_name": "br-acafd867c66c"
          },
          "frame.encap_type": "1",
          "frame.time": "Aug 21, 2021 03:31:27.912030025 UTC",
          "frame.offset_shift": "0.000000000",
          "frame.time_epoch": "1629516687.912030025",
          "frame.time_delta": "0.000000000",
          "frame.time_delta_displayed": "0.000000000",
          "frame.time_relative": "0.000000000",
          "frame.number": "1",
          "frame.len": "74",
          "frame.cap_len": "74",
          "frame.marked": "0",
          "frame.ignored": "0",
          "frame.protocols": "eth:ethertype:ip:tcp"
        },
        "eth": {
          "eth.dst": "02:42:0a:00:00:05",
          "eth.dst_tree": {
            "eth.dst_resolved": "02:42:0a:00:00:05",

This output can be appended to a file by redirecting the standard output to a file.

tshark -T json -i br-285319d5dca3 >> output.json

root@katacoda:~# head -n 20 output.json 
[
  {
    "_index": "packets-2021-08-21",
    "_type": "doc",
    "_score": null,
    "_source": {
      "layers": {
        "frame": {
          "frame.interface_id": "0",
          "frame.interface_id_tree": {
            "frame.interface_name": "br-285319d5dca3"
          },
          "frame.encap_type": "1",
          "frame.time": "Aug 21, 2021 02:49:33.974522255 UTC",
          "frame.offset_shift": "0.000000000",
          "frame.time_epoch": "1629514173.974522255",

After scanning we can view the file by using the cat command as shown below:

cat output.json

root@katacoda:~# cat output.json 
[
  {
    "_index": "packets-2021-08-21",
    "_type": "doc",
    "_score": null,
    "_source": {
      "layers": {
        "frame": {
          "frame.interface_id": "0",
          "frame.interface_id_tree": {
            "frame.interface_name": "br-285319d5dca3"
          },
          "frame.encap_type": "1",
          "frame.time": "Aug 21, 2021 02:47:21.169964855 UTC",
          "frame.offset_shift": "0.000000000",
          "frame.time_epoch": "1629514041.169964855",
          "frame.time_delta": "0.000000000",
          "frame.time_delta_displayed": "0.000000000",
          "frame.time_relative": "0.000000000",
          "frame.number": "1",

[ ... additional output omitted ... ]

Alternatively, we can use the tail -f output.json command to receive the output in real-time, indefinitely.

To exit out of the tail use the ^C keybinding.

Supported formats for the -T command include:

  -T pdml|ps|psml|json|jsonraw|ek|tabs|text|fields|?
                           format of text output (def: text)

Applying capture filtering to a scan

In many cases, a particular network interface we want to scan would be congested with a lot of noise. Sometimes we only want to view a specific port or protocol passing through. We can specify a filter to use during a scan by appending the -f "FILTER_EXPRESSION" argument, where the filter expression must be written as a single argument.

For example, if only wanted output for the HTTP protocol, we can use the following filter below:

tshark -f "port http" -i br-285319d5dca3

root@katacoda:~# tshark -f "port http" -i br-285319d5dca3
Running as user "root" and group "root". This could be dangerous.
Capturing on 'br-285319d5dca3'
    1 0.000000000     10.0.0.1 → 10.0.0.5     TCP 74 47522 → 80 [SYN] Seq=0 Win=64240 Len=0 MSS=1460 SACK_PERM=1 TSval=1762344937 TSecr=0 WS=128
    2 0.000036819     10.0.0.5 → 10.0.0.1     TCP 74 80 → 47522 [SYN, ACK] Seq=0 Ack=1 Win=65160 Len=0 MSS=1460 SACK_PERM=1 TSval=2863087775 TSecr=1762344937 WS=128
    3 0.000055143     10.0.0.1 → 10.0.0.5     TCP 66 47522 → 80 [ACK] Seq=1 Ack=1 Win=64256 Len=0 TSval=1762344937 TSecr=2863087775
    4 0.000102772     10.0.0.1 → 10.0.0.5     HTTP 138 GET / HTTP/1.1 
    5 0.000109554     10.0.0.5 → 10.0.0.1     TCP 66 80 → 47522 [ACK] Seq=1 Ack=73 Win=65152 Len=0 TSval=2863087775 TSecr=1762344937
    6 0.000253152     10.0.0.5 → 10.0.0.1     TCP 306 HTTP/1.1 200 OK  [TCP segment of a reassembled PDU]
    7 0.000285312     10.0.0.1 → 10.0.0.5     TCP 66 47522 → 80 [ACK] Seq=73 Ack=241 Win=64128 Len=0 TSval=1762344937 TSecr=2863087775

[ ... additional output omitted ... ]

The same can be done for the ICMP ping requests shown earlier by executing:

tshark -f "icmp[icmptype]==icmp-echo" -i br-285319d5dca3

root@katacoda:~# tshark -f "icmp[icmptype]==icmp-echo" -i br-285319d5dca3 Running as user "root" and group "root". This could be dangerous. Capturing on 'br-285319d5dca3' 1 0.000000000 10.0.0.1 → 10.0.0.5 ICMP 98 Echo (ping) request id=0xf318, seq=2906/23051, ttl=64 2 1.020019024 10.0.0.1 → 10.0.0.5 ICMP 98 Echo (ping) request id=0xf318, seq=2907/23307, ttl=64 3 2.044199094 10.0.0.1 → 10.0.0.5 ICMP 98 Echo (ping) request id=0xf318, seq=2908/23563, ttl=64 4 3.068206736 10.0.0.1 → 10.0.0.5 ICMP 98 Echo (ping) request id=0xf318, seq=2909/23819, ttl=64 5 4.092000483 10.0.0.1 → 10.0.0.5 ICMP 98 Echo (ping) request id=0xf318, seq=2910/24075, ttl=64

Introduction to tcpdump

tcpdump is lightweight and easily accessible. It is highly recommended to become familiar with both Tshark and tcpdump.

Installing tcpdump

Similar to Tshark, we can install tcpdump by using the apt package manager. This can be done by executing the following:

apt update; apt install -y tcpdump

After the download completes we can verify that tcpdump is installed by using the --version flag to output the version number.

tcpdump --version

Below is an example of the version output:

tcpdump version 4.9.3
libpcap version 1.10.0 (with TPACKET_V3)
OpenSSL 1.1.1  16 Feb 2021

Starting tcpdump

Tcpdump can be started by using the tcpdump command.

root@katacoda:~# tcpdump
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on br-acafd867c66c, link-type EN10MB (Ethernet), capture size 262144 bytes
03:05:52.209799 IP katacoda > 10.0.0.5: ICMP echo request, id 62232, seq 4551, length 64
03:05:52.209832 IP 10.0.0.5 > katacoda: ICMP echo reply, id 62232, seq 4551, length 64
03:05:52.531066 IP katacoda.54820 > 10.0.0.5.http: Flags [S], seq 1462452098, win 64240, options [mss 1460,sackOK,TS val 1764921019 ecr 0,nop,wscale 7], length 0
03:05:52.531114 IP 10.0.0.5.http > katacoda.54820: Flags [S.], seq 3112095514, ack 1462452099, win 65160, options [mss 1460,sackOK,TS val 2865663857 ecr 1764921019,nop,wscale 7], length 0
03:05:52.531133 IP katacoda.54820 > 10.0.0.5.http: Flags [.], ack 1, win 502, options [nop,nop,TS val 1764921019 ecr 2865663857], length 0
03:05:52.531184 IP katacoda.54820 > 10.0.0.5.http: Flags [P.], seq 1:73, ack 1, win 502, options [nop,nop,TS val 1764921019 ecr 2865663857], length 72: HTTP: GET / HTTP/1.1

Selecting an interface

First, we must list all available interfaces by using the -D argument, similar to Tshark.

tcpdump -D

root@katacoda:~# tcpdump -D
1.br-acafd867c66c [Up, Running]
2.veth4e0d04e [Up, Running]
3.vethc0fb4b7 [Up, Running]
4.eth0 [Up, Running]

Next, to have tcpdump run on a specific interface use the -i argument. From our example above, we can select the br-acafd867c66c interface as we know this interface is bound to our docker 10.0.0.0/24 network found by running ip route from earlier.

tcpdump -i br-XXXXXXXXXX

Note: The following sections of the scenario will require you to substitute the br-XXXXXXXXXX interface with the found interface name.

Help output

To list all possible arguments tcpdump can receive, use the -h argument.

tcpdump -h

Documentation

To read the complete documentation for tcpdump, please visit:

https://www.tcpdump.org/manpages/tcpdump.1.html

Tcpdump output and filtering

Writing a scan to a file

Similar to Tshark, we can write the raw packet output to a file, usually with the file extension .pacp, by using the -w FILENAME argument.

tcpdump -w FILENAME.pcap -i br-XXXXXXXX

Note: Please enter the interface found when executing ip route

root@katacoda:~# tcpdump -w FILENAME.pcap -i br-acafd867c66c
tcpdump: listening on br-acafd867c66c, link-type EN10MB (Ethernet), capture size 262144 bytes

Tcpdump will continue running indefinitely or until you run out of hard drive space. To stop the scan, execute the ^C keybinding.

Reading a scan from a .pcap file

In many instances, you may want to take the raw packet output from a file generated by the -w argument and parse through the information. You can read back the file using the -r FILENAME.pacp argument.

tcpdump -r FILENAME.pcap

root@katacoda:~# tcpdump -r FILENAME.pcap
reading from file FILENAME.pcap, link-type EN10MB (Ethernet)
03:20:56.401804 IP katacoda > 10.0.0.5: ICMP echo request, id 62232, seq 5434, length 64
03:20:56.401837 IP 10.0.0.5 > katacoda: ICMP echo reply, id 62232, seq 5434, length 64
03:20:56.930375 IP katacoda.57280 > 10.0.0.5.http: Flags [S], seq 1734658261, win 64240, options [mss 1460,sackOK,TS val 1765825418 ecr 0,nop,wscale 7], length 0
03:20:56.930411 IP 10.0.0.5.http > katacoda.57280: Flags [S.], seq 4109180634, ack 1734658262, win 65160, options [mss 1460,sackOK,TS val 2866568256 ecr 1765825418,nop,wscale 7], length 0
03:20:56.930447 IP katacoda.57280 > 10.0.0.5.http: Flags [.], ack 1, win 502, options [nop,nop,TS val 1765825418 ecr 2866568256], length 0
03:20:56.930508 IP katacoda.57280 > 10.0.0.5.http: Flags [P.], seq 1:73, ack 1, win 502, options [nop,nop,TS val 1765825418 ecr 2866568256], length 72: HTTP: GET / HTTP/1.1
03:20:56.930515 IP 10.0.0.5.http > katacoda.57280: Flags [.], ack 73, win 509, options [nop,nop,TS val 2866568256 ecr 1765825418], length 0
03:20:56.930639 IP 10.0.0.5.http > katacoda.57280: Flags [P.], seq 1:241, ack 73, win 509, options [nop,nop,TS val 2866568256 ecr 1765825418], length 240: HTTP: HTTP/1.1 200 OK

[ ... additional output omitted ... ]

Applying capture filtering to a scan

Tcpdump expects a filter to be written as the primary argument when executing the tcpdump command. If no filter is specified, tcpdump will output all captured packets to standard output.

As an example, to filter only icmp-echo and icmp-echoreply packets, we can use the following filter:

tcpdump -i br-XXXXXXXX 'icmp[icmptype] == icmp-echo or icmp[icmptype] == icmp-echoreply'

root@katacoda:~# tcpdump -i br-acafd867c66c 'icmp[icmptype] == icmp-echo or icmp[icmptype] == icmp-echoreply'
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on br-acafd867c66c, link-type EN10MB (Ethernet), capture size 262144 bytes
03:34:34.577925 IP katacoda > 10.0.0.5: ICMP echo request, id 62232, seq 6233, length 64
03:34:34.577960 IP 10.0.0.5 > katacoda: ICMP echo reply, id 62232, seq 6233, length 64
03:34:35.601816 IP katacoda > 10.0.0.5: ICMP echo request, id 62232, seq 6234, length 64
03:34:35.601847 IP 10.0.0.5 > katacoda: ICMP echo reply, id 62232, seq 6234, length 64

Or similarly to view all HTTP IPv4 packets, we can specify the port we want to monitor by using the filter:

tcpdump -i br-XXXXXXXX 'tcp port 80'

root@katacoda:~# tcpdump -i br-acafd867c66c 'tcp port 80' tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on br-acafd867c66c, link-type EN10MB (Ethernet), capture size 262144 bytes 03:47:19.444883 IP katacoda.33392 > 10.0.0.5.http: Flags [S], seq 223629244, win 64240, options [mss 1460,sackOK,TS val 1767407933 ecr 0,nop,wscale 7], length 0 03:47:19.444929 IP 10.0.0.5.http > katacoda.33392: Flags [S.], seq 777217578, ack 223629245, win 65160, options [mss 1460,sackOK,TS val 2868150771 ecr 1767407933,nop,wscale 7], length 0 03:47:19.444948 IP katacoda.33392 > 10.0.0.5.http: Flags [.], ack 1, win 502, options [nop,nop,TS val 1767407933 ecr 2868150771], length 0 03:47:19.446035 IP katacoda.33392 > 10.0.0.5.http: Flags [P.], seq 1:73, ack 1, win 502, options [nop,nop,TS val 1767407934 ecr 2868150771], length 72: HTTP: GET / HTTP/1.1 03:47:19.446052 IP 10.0.0.5.http > katacoda.33392: Flags [.], ack 73, win 509, options [nop,nop,TS val 2868150772 ecr 1767407934], length 0 03:47:19.446158 IP 10.0.0.5.http > katacoda.33392: Flags [P.], seq 1:241, ack 73, win 509, options [nop,nop,TS val 2868150772 ecr 1767407934], length 240: HTTP: HTTP/1.1 200 OK 03:47:19.446191 IP katacoda.33392 > 10.0.0.5.http: Flags [.], ack 241, win 501, options [nop,nop,TS val 1767407934 ecr 2868150772], length 0 03:47:19.446276 IP 10.0.0.5.http > katacoda.33392: Flags [P.], seq 241:7481, ack 73, win 509, options [nop,nop,TS val 2868150772 ecr 1767407934], length 7240: HTTP

Ethical Hacking: Web Application Vulnerability Scanning with Nikto

Introducing the Nikto Scanner

Nikto is an open-source tool that can be used to perform enumeration and vulnerability scanning of web applications and web servers.

Installing Nikto

Nikto comes installed by default in Kali LinuxParrot Security, and other penetration testing Linux distributions. However, you can easily install Nikto completing the following steps in a Debian/Ubuntu based distribution:

  1. Update packages information: sudo apt update
  2. Install Nikto using aptsudo apt install nikto -y
  3. You can execute the Nikto program and access the help information by running the following command: nikto -H

Alternatively, you can clone the Nikto repository and execute the Perl script, as demonstrated below:

  1. Clone the Nikto GitHub repository: git clone https://github.com/sullo/nikto
  2. Access the program directory: cd nikto/program
  3. Nikto is written in Perl. You must have Perl installed in your Linux system. You can execute the Nikto program and access the help information by running the following command: perl nikto.pl -H

In the following steps you will learn how to scan and enumerate a web application using Nikto.

Scanning and Enumerating a Web Application using Nikto

Let’s enumerate and scan a web appplication running in system configured with the IP address 10.0.0.5 using Nikto.

┌───────┐       ┌──────────┐
│       │       │  APP 1   │
│ NIKTO ├───────┤          │
│       │       │ 10.0.0.5 │
└───────┘       └──────────┘

To scan the web application, simply execute the following command: nikto -h http://10.0.0.5

You can display the scan status during an active scan by pressing the SPACE bar in your keyboard. You can also turn on and off different features by pressing any of the following keys:

  • v: Turns verbose mode on/off
  • d: Turns debug mode on/off
  • e: Turns error reporting on/off
  • p: Turns progress reporting on/off
  • r: Turns 3xx/redirect display on/off
  • c: Turns cookie display on/off
  • o: Turns 200/OK display on/off
  • a: Turns auth display on/off
  • q: Quit (gracefully)
  • N: Next host/post
  • P: Pauses the scan

NOTE: Nikto checks for user input every 10 requests. Subsequently, slow scans may take a moment to respond.

The following are the scan results that you should see in the screen after launching Nikto against the web application running on 10.0.0.5.

$ nikto -h http://10.0.0.5
---------------------------------------------------------------------------
+ Target IP:          10.0.0.5
+ Target Hostname:    10.0.0.5
+ Target Port:        80
---------------------------------------------------------------------------
+ Server: nginx/1.14.2
+ Server leaks inodes via ETags, header found with file /, fields: 0x6116b2e9 0x20ae 
+ The anti-clickjacking X-Frame-Options header is not present.
+ No CGI Directories found (use '-C all' to force check all possible dirs)
+ OSVDB-3092: /admin/: This might be interesting...
+ /admin/index.html: Admin login page/section found.
+ /wp-admin/: Admin login page/section found.
+ /wp-login/: Admin login page/section found.
+ 6544 items checked: 0 error(s) and 6 item(s) reported on remote host
+ End Time:           2021-08-13 18:22:30 (GMT0) (7 seconds)
---------------------------------------------------------------------------
+ 1 host(s) tested

Exporting Nikto Scan Results in Different Formats

You can save the output of the Nikto scan to a file using the -o option. Nikto can export the scan results in any of the following formats, by using the -Format option:

  • csv: Comma-separated-value
  • json: JSON Format
  • htm: HTML Format
  • nbe: Nessus NBE format
  • sql: Generic SQL (see docs for schema)
  • txt: Plain text
  • xml: XML Format

NOTE: If you don’t specify the output format, Nikto tries to detect the format based on the file extension. The schema for the table used in SQL output can be found in docs/nikto_schema.sql.

Exporting Results in Comma-Separated Files

Let’s scan the web application and save the scan results in a comma-separated-value (CSV) file executing the following command:

nikto -h http://10.0.0.5 -o scan.csv -Format csv

Verify the results of the scan by invoking the following command:

cat scan.csv

Exporting Results in XML

Now launch a similar scan and export the results in an XML file:

nikto -h http://10.0.0.5 -o scan.xml -Format xml

Verify the results of the scan by invoking the following command:

cat scan.xml

Exporting Results in an HTML Report

Let’s scan the web application and save the scan results in HTML report file executing the following command:

nikto -h http://10.0.0.5 -o scan.html -Format htm

Verify the results of the scan by invoking the following command:

cat scan.html

Using Different Evasion Techniques

You can try to evade security monitoring tools by using different encoding techniques using the -evasion option. Nikto supports the following encoding (evasion) techniques:

  • 1: Random URI encoding (non-UTF8)
  • 2: Directory self-reference (/./)
  • 3: Premature URL ending
  • 4: Prepend long random string
  • 5: Fake parameter
  • 6: TAB as request spacer
  • 7: Change the case of the URL
  • 8: Use Windows directory separator ()
  • A: Use a carriage return (0x0d) as a request spacer
  • B: Use binary value 0x0b as a request spacer

In the following example, a fake parameter is used as an evasion technique:

nikto -h http://10.0.0.5 -evasion 4

You should notice that the Nikto scan summary lists the encoding method:

Using Encoding: Fake parameter

Explore some of the other options on your own

Ethical Hacking: Advanced Nmap Scanning and the Nmap Scripting Engine

Introduction to Nmap Scripting Engine (NSE)

Nmap provides a user with a powerful toolset of features, that allows the user to create scripts to complete custom tasks.

Installing Nmap

To install Nmap on Ubuntu, use the apt package manager by exeucuting:

apt update; apt install -y nmap

The Nmap Scripting Engine is included and is a part of the normal nmap package.

About NSE scripts

Scripts are created using the LUA scripting language and end with the .nse file extension. There are well over 300+ examples to choose from, and many are installed with Nmap.

Envolking NSE

Using the Nmap Scripting Engine is simple! When using the nmap command we append the --script flag, followed by the script name or directory of scripts, and target host or range:

nmap --script script/directory HOST/RANGE

Script Categories

Included Nmap Scripts are listed via different categories.

For example, scripts that are created for the purpose of brute-forcing authentication credentials are placed within the “brute” category.

Full list of NSE Scripts

The Nmap documentation provides a complete comprehensive list of scripts that ship with Nmap when installing. To view a full list of Nmap Scripting Engine example scripts, please visit: https://nmap.org/nsedoc/

At any point, you can download these scripts by clicking on the “Download” link within the documentation.

Nmap Cheat Sheet

A Nmap cheat sheet provided by H4cker.org can be viewed by visiting, or simply using curl and accessing https://h4cker.org/cheat/nmap.

curl https://h4cker.org/cheat/nmap

Docker

The rest of the scenario will use Docker to simulate a vulnerable host on a network. The gravemind Docker container is obtained from Docker Hub. Multiple hosts will be set up for you using Docker.

Please verify that two gravemind instances are running using the following command:

docker ps

If no containers running, a setup script is provided in your home directory and can be executed by running: bash ~/gravemind_docker_network_setup.sh

These two containers have statically assigned IP Addresses:

  • Container 1: 10.0.0.5
  • Container 2: 10.0.0.6

FTP Anonymous Login

After observing that a machine on the network has an open port 21, commonly used for FTP, we can employ the help of Nmap to anonymously login on available FTP servers across the network, and check what available files are being served. For this, we will be using the Nmap Scripting Engine to carry out the task for us.

The FTP-anon.nse script can perform such action.

Executing the script on a single host

To perform a scan on a single host, pass the FTP-anon.nse script name as an argument and append a target host. For example, the command structure would be as follows:

nmap --script FTP-anon.nse HOST

To execute the command against our Gravemind container, execute the following command:

nmap --script ftp-anon.nse 10.0.0.5

The following output can be seen after executing the command:

Starting Nmap 7.80 ( https://nmap.org ) at 2021-08-13 20:24 UTC
Nmap scan report for 10.0.0.5
Host is up (0.000097s latency).
Not shown: 994 closed ports
PORT    STATE SERVICE
21/tcp  open  ftp
| ftp-anon: Anonymous FTP login allowed (FTP code 230)
| -rw-rw-r--    1 0        0              16 Aug 13 19:46 file1.txt
| -rw-rw-r--    1 0        0              16 Aug 13 19:46 file2.txt
| -rw-rw-r--    1 0        0              29 Aug 13 19:46 file3.txt
|_-rw-rw-r--    1 0        0              26 Aug 13 19:45 supersecretfile.txt
22/tcp  open  ssh
53/tcp  open  domain
80/tcp  open  http
139/tcp open  netbios-ssn
445/tcp open  microsoft-ds

Nmap done: 1 IP address (1 host up) scanned in 0.22 seconds

Here we see that an FTP server was found, and accessibnle through the anonymous user. The directory structure is listed, including:

read-write-executeFile or DirectoryUser IDGroup IDSize in BytesDateFilename
-rw-rw-r–10016 Aug 13 19:4616file1.txt
-rw-rw-r–10016 Aug 13 19:4616file2.txt
-rw-rw-r–10029 Aug 13 19:4629file3.txt
-rw-rw-r–10026 Aug 13 19:4529supersecretfile.txt

Executing the script on a network range

To perform the scan on a complete range of hosts, append the CIDR formatted range to the command:

nmap --script ftp-anon.nse RANGE/CIDR

For example to scan our docker network:

nmap --script ftp-anon.nse 10.0.0.0/24

Below we can see that hosts 10.0.0.5 and 10.0.0.6 have been found and are listing the available files on their respective hosts.

Starting Nmap 7.80 ( https://nmap.org ) at 2021-08-13 20:27 UTC
Nmap scan report for katacoda (10.0.0.1)
Host is up (0.00018s latency).
All 1000 scanned ports on katacoda (10.0.0.1) are closed

Nmap scan report for 10.0.0.5
Host is up (0.00019s latency).
Not shown: 994 closed ports
PORT    STATE SERVICE
21/tcp  open  ftp
| ftp-anon: Anonymous FTP login allowed (FTP code 230)
| -rw-rw-r--    1 0        0              16 Aug 13 19:46 file1.txt
| -rw-rw-r--    1 0        0              16 Aug 13 19:46 file2.txt
| -rw-rw-r--    1 0        0              29 Aug 13 19:46 file3.txt
|_-rw-rw-r--    1 0        0              26 Aug 13 19:45 supersecretfile.txt
22/tcp  open  ssh
53/tcp  open  domain
80/tcp  open  http
139/tcp open  netbios-ssn
445/tcp open  microsoft-ds

Nmap scan report for 10.0.0.6
Host is up (0.00020s latency).
Not shown: 994 closed ports
PORT    STATE SERVICE
21/tcp  open  ftp
| ftp-anon: Anonymous FTP login allowed (FTP code 230)
| -rw-rw-r--    1 0        0              16 Aug 13 19:46 file1.txt
| -rw-rw-r--    1 0        0              16 Aug 13 19:46 file2.txt
| -rw-rw-r--    1 0        0              29 Aug 13 19:46 file3.txt
|_-rw-rw-r--    1 0        0              26 Aug 13 19:45 supersecretfile.txt
22/tcp  open  ssh
53/tcp  open  domain
80/tcp  open  http
139/tcp open  netbios-ssn
445/tcp open  microsoft-ds

Nmap done: 256 IP addresses (3 hosts up) scanned in 3.17 seconds

Documentation

The complete documentation can be found on the Nmap Scripting Engine Documentation

Network Share Enumeration

SMB is another popular file transfer protocol, which is very common within Microsoft Windows environments as the default file share application. Gravemind, our example container, is running an installation of Samba serving files through the SMB protocol.

Executing the script on a single host

The common port for the SMB protocol is port 445. We can query this port using the smb-enum-share.nse script to receive a list of available SMB shares on a single host.

To perform the scan, use the --script smb-enum-shares.nse argument when invoking the nmap command.

Note: For simplicity, we added the -p 445 argument to the command for faster scans, but we can omit the argument to scan the top 1000 ports.

nmap --script smb-enum-shares.nse -p 445 HOST

For example, to scan all shares on our first Gravemind container:

nmap --script smb-enum-shares.nse -p 445 10.0.0.5

Below we can see the 10.0.0.5\workfiles share, along with some print services shared by our Gravemind host.

Starting Nmap 7.80 ( https://nmap.org ) at 2021-08-13 21:21 UTC
Nmap scan report for 10.0.0.5
Host is up (0.00017s latency).

PORT    STATE SERVICE
445/tcp open  microsoft-ds

Host script results:
| smb-enum-shares:
|   account_used: <blank>
|   \\10.0.0.5\IPC$:
|     Type: STYPE_IPC_HIDDEN
|     Comment: IPC Service (Samba 4.9.5-Debian)
|     Users: 1
|     Max Users: <unlimited>
|     Path: C:\tmp
|     Anonymous access: READ/WRITE
|   \\10.0.0.5\print$:
|     Type: STYPE_DISKTREE
|     Comment: Printer Drivers
|     Users: 0
|     Max Users: <unlimited>
|     Path: C:\var\lib\samba\printers
|     Anonymous access: READ/WRITE
|   \\10.0.0.5\workfiles:
|     Type: STYPE_DISKTREE
|     Comment: Confidential Workfiles
|     Users: 0
|     Max Users: <unlimited>
|     Path: C:\var\spool\samba
|_    Anonymous access: READ/WRITE

Nmap done: 1 IP address (1 host up) scanned in 7.57 seconds

Executing the script on a network range

To receive a list of available SMB mounts on a range of hosts, append the CIDR to the command:

nmap --script smb-enum-shares.nse -p 445 RANGE/CIDR

An example to scan both Gravemind containers can be found below:

nmap --script smb-enum-shares.nse -p 445 10.0.0.0/24

Starting Nmap 7.80 ( https://nmap.org ) at 2021-08-13 21:38 UTC
Nmap scan report for katacoda (10.0.0.1)
Host is up (0.00033s latency).

PORT    STATE  SERVICE
445/tcp closed microsoft-ds

Nmap scan report for 10.0.0.5
Host is up (0.00037s latency).

PORT    STATE SERVICE
445/tcp open  microsoft-ds

Host script results:
| smb-enum-shares:
|   account_used: <blank>
|   \\10.0.0.5\IPC$:
|     Type: STYPE_IPC_HIDDEN
|     Comment: IPC Service (Samba 4.9.5-Debian)
|     Users: 1
|     Max Users: <unlimited>
|     Path: C:\tmp
|     Anonymous access: READ/WRITE
|   \\10.0.0.5\print$:
|     Type: STYPE_DISKTREE
|     Comment: Printer Drivers
|     Users: 0
|     Max Users: <unlimited>
|     Path: C:\var\lib\samba\printers
|     Anonymous access: READ/WRITE
|   \\10.0.0.5\workfiles:
|     Type: STYPE_DISKTREE
|     Comment: Confidential Workfiles
|     Users: 0
|     Max Users: <unlimited>
|     Path: C:\var\spool\samba
|_    Anonymous access: READ/WRITE

Nmap scan report for 10.0.0.6
Host is up (0.00032s latency).

PORT    STATE SERVICE
445/tcp open  microsoft-ds

Host script results:
| smb-enum-shares:
|   account_used: <blank>
|   \\10.0.0.6\IPC$:
|     Type: STYPE_IPC_HIDDEN
|     Comment: IPC Service (Samba 4.9.5-Debian)
|     Users: 1
|     Max Users: <unlimited>
|     Path: C:\tmp
|     Anonymous access: READ/WRITE
|   \\10.0.0.6\print$:
|     Type: STYPE_DISKTREE
|     Comment: Printer Drivers
|     Users: 0
|     Max Users: <unlimited>
|     Path: C:\var\lib\samba\printers
|     Anonymous access: READ/WRITE
|   \\10.0.0.6\workfiles:
|     Type: STYPE_DISKTREE
|     Comment: Confidential Workfiles
|     Users: 0
|     Max Users: <unlimited>
|     Path: C:\var\spool\samba
|_    Anonymous access: READ/WRITE

Nmap done: 256 IP addresses (3 hosts up) scanned in 12.70 seconds

Documentation

The complete documentation can be found on the Nmap Scripting Engine Documentation

Web Application Enumeration

Nmap’s scripting engine can ease the process of finding commonly used webpage paths on a web server. It does so by digging through a fingerprint file and applying a pattern match across the webserver. It can also identify specific versions of the web server and display them within the output.

Executing the script on a single host

The http-enum.nse file can be passed to the script argument, as well as -sV which provides a more verbose service and version information. The script can be executed by using the following format:

nmap -sV --script=http-enum.nse HOST

To scan our Gravemind container, execute the following:

nmap -sV --script=http-enum.nse 10.0.0.5

Below we can see the scan found /admin//admin/index.html, and /s/ as interesting routes to access. The webserver information can also be seen as being Nginx followed by the version number.

Starting Nmap 7.80 ( https://nmap.org ) at 2021-08-13 22:34 UTC
Nmap scan report for 10.0.0.5
Host is up (0.000097s latency).
Not shown: 994 closed ports
PORT    STATE SERVICE     VERSION
21/tcp  open  ftp         vsftpd 3.0.3
22/tcp  open  ssh         OpenSSH 7.9p1 Debian 10+deb10u2 (protocol 2.0)
53/tcp  open  domain      ISC BIND 9.11.5-P4-5.1+deb10u5 (Debian Linux)
80/tcp  open  http        nginx 1.14.2
| http-enum:
|   /admin/: Possible admin folder
|   /admin/index.html: Possible admin folder
|_  /s/: Potentially interesting folder
|_http-server-header: nginx/1.14.2
139/tcp open  netbios-ssn Samba smbd 3.X - 4.X (workgroup: WORKGROUP)
445/tcp open  netbios-ssn Samba smbd 3.X - 4.X (workgroup: WORKGROUP)
Service Info: Host: 4EDD64A64E32; OSs: Unix, Linux; CPE: cpe:/o:linux:linux_kernel

Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 11.77 seconds

Executing the script on a range

To execute the http enumeration script on a range of IPs, use the following format:

nmap -sV --script=http-enum RANGE/CIDR

Using this format, we can scan our Gravemind container by executing:

nmap -sV --script=http-enum 10.0.0.0/24

Starting Nmap 7.80 ( https://nmap.org ) at 2021-08-13 22:42 UTC
Nmap scan report for katacoda (10.0.0.1)
Host is up (0.00018s latency).
All 1000 scanned ports on katacoda (10.0.0.1) are closed

Nmap scan report for 10.0.0.5
Host is up (0.00021s latency).
Not shown: 994 closed ports
PORT    STATE SERVICE     VERSION
21/tcp  open  ftp         vsftpd 3.0.3
22/tcp  open  ssh         OpenSSH 7.9p1 Debian 10+deb10u2 (protocol 2.0)
53/tcp  open  domain      ISC BIND 9.11.5-P4-5.1+deb10u5 (Debian Linux)
80/tcp  open  http        nginx 1.14.2
| http-enum:
|   /admin/: Possible admin folder
|   /admin/index.html: Possible admin folder
|_  /s/: Potentially interesting folder
|_http-server-header: nginx/1.14.2
139/tcp open  netbios-ssn Samba smbd 3.X - 4.X (workgroup: WORKGROUP)
445/tcp open  netbios-ssn Samba smbd 3.X - 4.X (workgroup: WORKGROUP)
Service Info: Host: 4EDD64A64E32; OSs: Unix, Linux; CPE: cpe:/o:linux:linux_kernel

Nmap scan report for 10.0.0.6
Host is up (0.00022s latency).
Not shown: 994 closed ports
PORT    STATE SERVICE     VERSION
21/tcp  open  ftp         vsftpd 3.0.3
22/tcp  open  ssh         OpenSSH 7.9p1 Debian 10+deb10u2 (protocol 2.0)
53/tcp  open  domain      ISC BIND 9.11.5-P4-5.1+deb10u5 (Debian Linux)
80/tcp  open  http        nginx 1.14.2
| http-enum:
|   /admin/: Possible admin folder
|   /admin/index.html: Possible admin folder
|_  /s/: Potentially interesting folder
|_http-server-header: nginx/1.14.2
139/tcp open  netbios-ssn Samba smbd 3.X - 4.X (workgroup: WORKGROUP)
445/tcp open  netbios-ssn Samba smbd 3.X - 4.X (workgroup: WORKGROUP)
Service Info: Host: FA2E2E48B5A4; OSs: Unix, Linux; CPE: cpe:/o:linux:linux_kernel

Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
Nmap done: 256 IP addresses (3 hosts up) scanned in 14.84 seconds

Documentation

The complete documentation can be found on the Nmap Scripting Engine Documentation

Exporting Nmap Output

The output of any scan can be output into various formats, including XML and a grep-friendly format. Each format has a respective command argument associated and expects a basename.

Exporting Scan Output in the Generic Nmap Format (-oN)

To save the”normally outputted” scan as shown on screen to a file, the -oN FILENAME argument can be appended to any scan.

The format of the complete command is shown below for a TCP SYN Scan:

nmap -sS -oN FILENAME HOST/RANGE

To run this command against the Gravemind container, execute the following:

nmap -sS -oN nmap_scan.nmap 10.0.0.5

If you ls in the current directory, you will see a file named nmap_scan.nmap.

You can view the file by using the command cat nmap_scan.nmap.

Exporting the Scan Output in XML (-oX)

To save the scan as an .xml file, append the -oX FILENAME option to a scan.

The format of the complete command is shown below for a TCP SYN Scan:

nmap -sS -oX FILENAME HOST/RANGE

To run this command against our Gravemind container, execute the following:

nmap -sS -oX nmap_scan.xml 10.0.0.5

If you ls in the current directory, you will see a file named nmap_scan.xml.

You can view the file by using the command cat nmap_scan.xml. Alternatively, you can parse the data using any software that is capable of displaying .xml files.

Exporting the Scan Output in a File that be Parsed with Grep (-oG)

The grep command is a powerful tool to search and filter data within a file. Normal usage includes passing in a pattern to find and a path to the data file.

To save the scan in a format that is easier to use the grep command in, append the -oX FILENAME option to a scan.

The format of the complete command is shown below for a TCP SYN Scan:

nmap -sS -oG FILENAME HOST/RANGE

To run this command against our Gravemind container, execute the following:

nmap -sS -oG nmap_scan.gnmap 10.0.0.5

If you ls in the current directory, you will see a file named nmap_scan.gnmap.

You can view the file by using the command cat nmap_scan.gnmap.

Exporting the Scan Output in All Formats (-oA)

To save the scan in all the aforementioned formats, use the -oA FILENAME argument when performing a scan.

The format of the complete command is shown below for a TCP SYN Scan:

nmap -sS -oA BASE_FILENAME HOST/RANGE

To run this command against our Gravemind container, execute the following:

nmap -sS -oA nmap_scan 10.0.0.5

If you ls in the current directory, you will see a file named nmap_scan.gnmapnmap_scan.xml, and nmap_scan.nmap.

Creating Nmap Python Scripts

Python can be used to programmatically manipulate Nmap scans and return formatted output back to the user.

Installing Python 3 & Pip3

Installing Python 3 and the pip3 package manager can be done using apt.

Execute the following command to install the python3 and pip3 packages:

apt update; apt install -y python3 python3-pip

Execute the following command to make sure that pip3 is updated to the latest version: python3 -m pip install --upgrade pip

Installing the Python Nmap module

pip3 install python3-nmap

Viewing the supplied Python file

For this lab, a file called nmap.py has been placed within your home directory. To view the contents of the file execute cat nmap.py.

Importing the Nmap3 module

Near the top of the file, we must specify to use the nmap3 module.

To do this, we can write the statement import nmap3 to the top of our file.

Next, we must create a nmap object to be able to execute different scans. We can create the object by assigning a variable to nmap3.Nmap(). Below we can see both the import and object instantiation at play.

# Import the Nmap Module
import nmap3

# Create an nmap Object
nmap = nmap3.Nmap()

Now we can start our scanning using the nmap object.

Nmap Helper Functions and Globals

Within the code, a function called print_output has been written to minimize repeated code within the script. The function simply takes a message string and result dictionary to display correctly on the screen.

The Gravemind container IP is also assigned to the HOST variable near the middle of the Python file. This is to add more flexibility to the scans. The string can be set to any target host within the network.

The SUBNET global is similar to HOST but instead of targeting one host, the target is a complete range of hosts.

Scanning Top 1000 ports

To scan the top 1000 ports of a host, use the .scan_top_ports(hostname: str) -> dict method. This method takes a hostname string as a parameter and returns a dictionary object as a response.

The following code scans our Gravemind Container:

...

# TCP SYN scan example
results = nmap.scan_top_ports(HOST)
print_output(f"Top ports of {HOST}", results)

...

Below we can see that the 10.0.0.5 host has been found and subsequent metadata of the host has been placed into different keys/value pairs.

...

'Top ports of 10.0.0.5'
{'10.0.0.5': {'hostname': [],
              'macaddress': None,
              'osmatch': {},
              'ports': [{'portid': '21',
                         'protocol': 'tcp',
                         'reason': 'syn-ack',
                         'reason_ttl': '0',
                         'scripts': [],
                         'service': {'conf': '3',
                                     'method': 'table',
                                     'name': 'ftp'},
                         'state': 'open'},
                        {'portid': '22',
                         'protocol': 'tcp',
                         'reason': 'syn-ack',
                         'reason_ttl': '0',
                         'scripts': [],
                         'service': {'conf': '3',
                                     'method': 'table',
                                     'name': 'ssh'},
                         'state': 'open'},

...

Nmap OS Detection

To detect the operating system of a host, we can use the .nmap_os_detection(hostname: str) -> dict method of the Nmap class to perform the scan. The function takes a hostname as a parameter and returns a dict of all hosts found.

...

# Nmap OS Detection
results = nmap.nmap_os_detection(HOST)
print_output(f"OS detection for {HOST}", results)

...

The host OS details for our Gravemind container, 10.0.0.5, can be found below.

{'10.0.0.5': {'hostname': [],
              'macaddress': {'addr': '02:42:0A:00:00:05', 'addrtype': 'mac'},
              'osmatch': [{'accuracy': '96',
                           'cpe': 'cpe:/o:linux:linux_kernel:2.6.32',
                           'line': '55173',
                           'name': 'Linux 2.6.32',
                           'osclass': {'accuracy': '96',
                                       'osfamily': 'Linux',
                                       'osgen': '2.6.X',
                                       'type': 'general purpose',
                                       'vendor': 'Linux'}},
                          {'accuracy': '96',
                           'cpe': 'cpe:/o:linux:linux_kernel:4',
                           'line': '65105',
                           'name': 'Linux 3.2 - 4.9',
                           'osclass': {'accuracy': '96',
                                       'osfamily': 'Linux',
                                       'osgen': '4.X',
                                       'type': 'general purpose',
                                       'vendor': 'Linux'}},

...

Nmap Subnet Scan

To scan an entire subnet of hosts, the .nmap_subnet_scan(subnet: str) -> dict method can be used. This method will return all open ports for hosts found on the network.

...

# NSE subnet scan
results = nmap.nmap_subnet_scan(SUBNET)
print_output(f"HTTP Enumeration for {SUBNET}", results)

...

Below is a snippet of the returned output for each host.

...

 '10.0.0.5': {'hostname': [],
              'macaddress': {'addr': '02:42:0A:00:00:05', 'addrtype': 'mac'},
              'osmatch': {},
              'ports': [{'portid': '21',
                         'protocol': 'tcp',
                         'reason': 'syn-ack',
                         'reason_ttl': '64',
                         'scripts': [],
                         'service': {'conf': '3',
                                     'method': 'table',
                                     'name': 'ftp'},
                         'state': 'open'},
                        {'portid': '22',
                         'protocol': 'tcp',
                         'reason': 'syn-ack',
                         'reason_ttl': '64',
                         'scripts': [],
                         'service': {'conf': '3',
                                     'method': 'table',
                                     'name': 'ssh'},
                         'state': 'open'},
...

 '10.0.0.6': {'hostname': [],
              'macaddress': {'addr': '02:42:0A:00:00:06', 'addrtype': 'mac'},
              'osmatch': {},
              'ports': [{'portid': '21',
                         'protocol': 'tcp',
                         'reason': 'syn-ack',
                         'reason_ttl': '64',
                         'scripts': [],
                         'service': {'conf': '3',
                                     'method': 'table',
                                     'name': 'ftp'},
                         'state': 'open'},
                        {'portid': '22',
                         'protocol': 'tcp',
                         'reason': 'syn-ack',
                         'reason_ttl': '64',
                         'scripts': [],
                         'service': {'conf': '3',
                                     'method': 'table',
                                     'name': 'ssh'},
                         'state': 'open'},

...

Running the python script

To run the python script, use the python command followed by the script name. In our case, the command to run the provided nmap.py file would be:

python3 nmap.py

Full example

# Import Pretty Printing
from pprint import pprint

# Import the Nmap Module
import nmap3

# Create an nmap Object
nmap = nmap3.Nmap()

# Helper functions

def print_output(message: str, results: str) -> None:
    """Handle output message and printing results"""
    pprint("")
    pprint('-'*20)
    pprint(message)
    pprint(results)


# Define target host
HOST = "10.0.0.5"
SUBNET = "10.0.0.0/24"

# TCP SYN scan example
results = nmap.scan_top_ports(HOST)
print_output(f"Top ports of {HOST}", results)

# Nmap OS Detection
results = nmap.nmap_os_detection(HOST)
print_output(f"OS detection for {HOST}", results)

# NSE subnet scan
results = nmap.nmap_subnet_scan(SUBNET)
print_output(f"Subnet scan for {SUBNET}", results)

Documentation

To view the full documentation of python3-nmap please visit: https://github.com/nmmapper/python3-nmap

Python3-nmap is under the GNU General Public License 3.0 and the license can be found here: https://github.com/nmmapper/python3-nmap/blob/master/LICENSE

Ethical Hacking: Active Recon – Enumeration and Fuzzing with Feroxbuster

https://websploit.org/

https://github.com/The-Art-of-Hacking/h4cker

https://hackingscenarios.com/

Introducing Feroxbuster

Feroxbuster is an ethical hacking tool written in Rust that is designed to perform Forced Browsing. You can use it to enumerate and access resources that are not referenced by a web application, but can still be accessible to the attacker.

Feroxbuster Source Code and GitHub Repository

Feroxbuster is an open-source tool and its source code can be accessed at this GitHub repository. The following link provides a comparison with some of the tools we discussed in previous scenarios:

https://github.com/epi052/feroxbuster#-comparison-w-similar-tools

Feroxbuster and Wordlists

In previous lessons part of these Ethical Hacking Labs, you learned that a wordlist is a text file containing a collection of words to use in different attacks including, but not limited to password cracking, recon, and fuzzing. feroxbuster uses wordlists to search for unlinked content in target directories. Some of these resources and content may store sensitive information about the web application and the underlying operating systems. You may often find additional information such as source code, credentials, sensitive logs, and more.

You can use feroxbuster to perform:

  • Predictable resource location attacks
  • File enumeration
  • Directory enumeration
  • Resource enumeration

In the next section, you will learn how to install feroxbuster

Installing Feroxbuster

You can install feroxbuster in Windows, Linux, and macOS.

Installing Feroxbuster in Windows

You can download the latest release of feroxbuster from the release section of its the GitHub repository. Use the x86-windows-feroxbuster.exe.zip binary file to install feroxbuster in Windows.

Installing Feroxbuster Using the apt Package Manager

Kali Linux:

If you are using Kali Linux, you can install feroxbuster using the following command:

sudo apt update && sudo apt install -y feroxbuster

Other Debian-based Linux Distributions:

Complete the following steps to install feroxbuster in any other Debian-based Linux distributions (such as Ubuntu and Parrot Security OS):

  1. Download feroxbuster_amd64.deb from the GitHub repository Releases section, as demonstrated below:

curl -sLO https://github.com/epi052/feroxbuster/releases/latest/download/feroxbuster_amd64.deb.zip

  1. Unzip the file:

unzip feroxbuster_amd64.deb.zip

  1. Install feroxbuster using apt:

sudo apt install -y ./feroxbuster_*_amd64.deb

Once feroxbuster is installed, you can verify the version using the following command:

feroxbuster -V

$ feroxbuster -V
feroxbuster 2.3.3

Installing Feroxbuster Using snap

Snap is a software packaging and deployment system developed by Canonical. In this lab, you are using Ubuntu:

lsb_release -a

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.1 LTS
Release:        20.04
Codename:       focal

You can install feroxbuster using snap, as demonstrated below:

sudo snap install feroxbuster

Note: The snap package can only read wordlists from a very specific locations. If the wordlist is on the same partition as your home directory, you can hard-link it into ~/snap/feroxbuster/common, as demonstrated below:

ln /path/to/the/wordlist ~/snap/feroxbuster/common

If the wordlist is on a separate partition, hard-linking won’t work. You’ll need to copy it into the snap directory:

cp /path/to/the/wordlist ~/snap/feroxbuster/common

Installing Feroxbuster Using cargo

Feroxbuster is written in the Rust programming language and it’s available in crates.io. If you have the Rust programming language installed in your system, you can install feroxbuster using cargo, as demonstrated below:

cargo install feroxbuster

Intalling Feroxbuster in macOS

You can install feroxbuster in macOS using Homebrew with the following two commands:

  1. brew tap tgotwig/feroxbuster
  2. brew install feroxbuster

Intalling Feroxbuster in BlackArch

You can install feroxbuster in BlackArch Linux) using the following command: pacman -S feroxbuster

Running the Feroxbuster Docker Container

You can run feroxbuster using Docker, as shown below: sudo docker run --init -it epi052/feroxbuster -u http://10.6.6.8 -x js,html

NOTE: Additional details about the feroxbuster Docker image can be obtained from the GitHub repository.

In the following section, you will learn how to customize the feroxbuster configuration

Feroxbuster Configuration Details

The feroxbuster configuration file is ferox-config.toml. The feroxbuster tool searches for the ferox-config.toml configuration file in the following locations (in the order shown):

  1. /etc/feroxbuster/ (global)
  2. CONFIG_DIR/feroxbuster/ (per-user)
  3. The same directory as the feroxbuster executable (per-user)
  4. Your current working directory (per-target)

You can override the default configuration by modifying the following location of the CONFIG_DIR (configuration directory) on each supported operating system:

  • Linux: $XDG_CONFIG_HOME or $HOME/.config
    • For example: /home/bob/.config
  • MacOS: $HOME/Library/Application Support
    • For example: /Users/bob/Library/Application Support
  • Windows: {FOLDERID_RoamingAppData}
    • For example: C:\Users\Bob\AppData\Roaming

A good example of a use case where you would like to override the default configuration is when you prefer to use a different wordlist setting than the default/built-in wordlist.

You are using Ubuntu in this lab. You can display the contents of the default configuration file with the following command:

cat /etc/feroxbuster/ferox-config.toml

The contents should be similar to the following output:

$ cat ferox-config.toml 
# Example configuration for feroxbuster
#
# If you wish to provide persistent settings to feroxbuster, rename this file to ferox-config.toml and make sure
# it resides in the same directory as the feroxbuster binary.
#
# After that, uncomment any line to override the default value provided by the binary itself.
#
# Any setting used here can be overridden by the corresponding command line option/argument
#
# wordlist = "/wordlists/seclists/Discovery/Web-Content/raft-medium-directories.txt"
# status_codes = [200, 500]
# filter_status = [301]
# threads = 1
# timeout = 5
# proxy = "http://127.0.0.1:8080"
# replay_proxy = "http://127.0.0.1:8081"
# replay_codes = [200, 302]
# verbosity = 1
# parallel = 8
# scan_limit = 6
# rate_limit = 250
# quiet = true
# silent = true
# auto_tune = true
# auto_bail = true
# json = true
# output = "/targets/ellingson_mineral_company/gibson.txt"
# debug_log = "/var/log/find-the-derp.log"
# user_agent = "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:47.0) Gecko/20100101 Firefox/47.0"
# redirects = true
# insecure = true
# extensions = ["php", "html"]
# url_denylist = ["http://dont-scan.me", "https://also-not.me"]
# no_recursion = true
# add_slash = true
# stdin = true
# dont_filter = true
# extract_links = true
# depth = 1
# filter_size = [5174]
# filter_regex = ["^ignore me$"]
# filter_similar = ["https://somesite.com/soft404"]
# filter_word_count = [993]
# filter_line_count = [35, 36]
# queries = [["name","value"], ["rick", "astley"]]
# save_state = false
# time_limit = "10m"

# headers can be specified on multiple lines or as an inline table
#
# inline example
# headers = {"stuff" = "things"}
#
# multi-line example
#   note: if multi-line is used, all key/value pairs under it belong to the headers table until the next table
#         is found or the end of the file is reached
#
# [headers]
# stuff = "things"
# more = "headers"

You can display the feroxbuster command usage/help information by executing the following command:

feroxbuster -h

The output should be similar to the following:

$ feroxbuster -h
feroxbuster 2.3.3
Ben 'epi' Risher (@epi052)
A fast, simple, recursive content discovery tool written in Rust

USAGE:
    feroxbuster [FLAGS] [OPTIONS] --url ...

FLAGS:
    -f, --add-slash        
            Append / to each request

        --auto-bail        
            Automatically stop scanning when an excessive amount of errors are encountered

        --auto-tune        
            Automatically lower scan rate when an excessive amount of errors are encountered

    -D, --dont-filter      
            Don't auto-filter wildcard responses

    -e, --extract-links    
            Extract links from response body (html, javascript, etc...); make new requests based on findings (default:
            false)
    -h, --help             
            Prints help information

    -k, --insecure         
            Disables TLS certificate validation

        --json             
            Emit JSON logs to --output and --debug-log instead of normal text

    -n, --no-recursion     
            Do not scan recursively

    -q, --quiet            
            Hide progress bars and banner (good for tmux windows w/ notifications)

    -r, --redirects        
            Follow redirects

        --silent           
            Only print URLs + turn off logging (good for piping a list of urls to other commands)

        --stdin            
            Read url(s) from STDIN

    -V, --version          
            Prints version information

    -v, --verbosity        
            Increase verbosity level (use -vv or more for greater effect. [CAUTION] 4 -v's is probably too much)


OPTIONS:
        --debug-log                         
            Output file to write log entries (use w/ --json for JSON entries)

    -d, --depth 
            Maximum recursion depth, a depth of 0 is infinite recursion (default: 4)

    -x, --extensions ...          
            File extension(s) to search for (ex: -x php -x pdf js)

    -N, --filter-lines ...                 
            Filter out messages of a particular line count (ex: -N 20 -N 31,30)

    -X, --filter-regex ...
            Filter out messages via regular expression matching on the response's body (ex: -X '^ignore me$')

        --filter-similar-to ...
            Filter out pages that are similar to the given page (ex. --filter-similar-to http://site.xyz/soft404)

    -S, --filter-size ...                   
            Filter out messages of a particular size (ex: -S 5120 -S 4927,1970)

    -C, --filter-status ...          
            Filter out status codes (deny list) (ex: -C 200 -C 401)

    -W, --filter-words ...                 
            Filter out messages of a particular word count (ex: -W 312 -W 91,82)

    -H, --headers ...                     
            Specify HTTP headers (ex: -H Header:val 'stuff: things')

    -o, --output                            
            Output file to write results to (use w/ --json for JSON entries)

        --parallel 
            Run parallel feroxbuster instances (one child process per url passed via stdin)

    -p, --proxy 
            Proxy to use for requests (ex: http(s)://host:port, socks5(h)://host:port)

    -Q, --query ...                        
            Specify URL query parameters (ex: -Q token=stuff -Q secret=key)

        --rate-limit 
            Limit number of requests per second (per directory) (default: 0, i.e. no limit)

    -R, --replay-codes ...
            Status Codes to send through a Replay Proxy when found (default: --status-codes value)

    -P, --replay-proxy 
            Send only unfiltered requests through a Replay Proxy, instead of all requests

        --resume-from 
            State file from which to resume a partially complete scan (ex. --resume-from ferox-1606586780.state)

    -L, --scan-limit                  
            Limit total number of concurrent scans (default: 0, i.e. no limit)

    -s, --status-codes ...
            Status Codes to include (allow list) (default: 200 204 301 302 307 308 401 403 405)

    -t, --threads                        
            Number of concurrent threads (default: 50)

        --time-limit                   
            Limit total run time of all scans (ex: --time-limit 10m)

    -T, --timeout                        
            Number of seconds before a request times out (default: 7)

    -u, --url ...                            
            The target URL(s) (required, unless --stdin used)

        --dont-scan ...                      
            URL(s) to exclude from recursion/scans

    -a, --user-agent                  
            Sets the User-Agent (default: feroxbuster/VERSION)

    -w, --wordlist                          
            Path to the wordlist


NOTE:
    Options that take multiple values are very flexible.  Consider the following ways of specifying
    extensions:
        ./feroxbuster -u http://127.1 -x pdf -x js,html -x php txt json,docx

    The command above adds .pdf, .js, .html, .php, .txt, .json, and .docx to each url

    All of the methods above (multiple flags, space separated, comma separated, etc...) are valid
    and interchangeable.  The same goes for urls, headers, status codes, queries, and size filters.

EXAMPLES:
    Multiple headers:
        ./feroxbuster -u http://127.1 -H Accept:application/json "Authorization: Bearer {token}"

    IPv6, non-recursive scan with INFO-level logging enabled:
        ./feroxbuster -u http://[::1] --no-recursion -vv

    Read urls from STDIN; pipe only resulting urls out to another tool
        cat targets | ./feroxbuster --stdin --silent -s 200 301 302 --redirects -x js | fff -s 200 -o js-files

    Proxy traffic through Burp
        ./feroxbuster -u http://127.1 --insecure --proxy http://127.0.0.1:8080

    Proxy traffic through a SOCKS proxy
        ./feroxbuster -u http://127.1 --proxy socks5://127.0.0.1:9050

    Pass auth token via query parameter
        ./feroxbuster -u http://127.1 --query token=0123456789ABCDEF

    Find links in javascript/html and make additional requests based on results
        ./feroxbuster -u http://127.1 --extract-links

    Ludicrous speed... go!
        ./feroxbuster -u http://127.1 -t 200

In the next section, you will learn how to enumerate files and directories using Feroxbuster.

Enumerating Directories and Files using Feroxbuster

Let’s start enumerating files and directories in a web application.

Accessing the Vulnerable Application

There is a vulnerable web application running in a container called unsc_infinity. Verify that the container is running by using the following command:

docker ps

If the container is not running, execute the following command:

bash ~/setup.sh

The vulnerable web application should be running on 10.6.6.8. Verify that you can reach the container by:

  • Using pingping -c 3 10.6.6.8
  • Using curlcurl http://10.6.6.8

Download a Wordlist

Let’s download a common wordlist from hackingscenarios.com to enumerate directories in the target web application.

wget https://hackingscenarios.com/wordlists/dir_enum

File and Directory Enumeration

The following is a simple test using the wordlist that you downloaded in the previous step:

feroxbuster -w dir_enum -u http://10.6.6.8

  • the -w is used to specify the wordlist
  • the -u is used to specify the URL of the web application

The feroxbuster tool starts enumerating directories. The tool uses 50 threads by default. You should see the additional details of the current test in the banner, as shown below:

 🎯  Target Url            │ http://10.6.6.8
 🚀  Threads               │ 50
 📖  Wordlist              │ dir_enum
 👌  Status Codes          │ [200, 204, 301, 302, 307, 308, 401, 403, 405, 500]
 💥  Timeout (secs)        │ 7
 🦡  User-Agent            │ feroxbuster/2.3.3
 💉  Config File           │ /etc/feroxbuster/ferox-config.toml
 🔃  Recursion Depth       │ 4

During the scan, you should see the following columns:

  • column 1status code – can be filtered with -C|--filter-status
  • column 2number of lines – can be filtered with -N|--filter-lines
  • column 3number of words – can be filtered with -W|--filter-words
  • column 4number of bytes (overall size) – can be filtered with -S|--filter-size
  • column 5url to discovered web application resource

NOTE: You should see a large number of errors. Do not be alarmed. Some of these errors are because the tool is not able to find the specific resources.

The wordlist that you downloaded earlier includes thousands of words. Even scanning or fuzzing a small application could take several minutes to complete. You can press Enter to access the Scan Cancel Menu. Once press Enter, you can enter a comma-separated list of indexes or ranges to cancel (for example: 1-4,8,9-13). You can also use -f to skip confirmation (for example: 3-5 -f).

If the scan is taking too long, feel free to skip several tests or press Ctrl+C to terminate the enumeration. If you press Ctrl+C, a file with the extension .state is created. This file includes the terminated test “state” in JSON format. You can open the file with the following command:

cat ferox-*.state | python3 -m json.tool

Extracting Links from the Response Body

You can extract links and look for additional endpoints to scan from the response body. You can simply use the --extract-links option to extract links from the response body, as shown below:

feroxbuster -u http://10.6.6.8 --extract-links

You can also limit the number of scans allowed to run at any given time by using the --scan-limit option, as shown below:

feroxbuster -w dir_enum -u http://10.6.6.8 --scan-limit 2

NOTE: The recursion feature of feroxbuster will still identify new directories. However, newly discovered directories can only begin scanning when the total number of active scans drops below the specified number of scans. The scan limit is set to 2 in the example above.

In the next section, you will learn how to send results to a web proxy.

Sending Results to a Proxy

One of the best ways to understand how a web application actually works is to observe it. A sniffer (packet capture software) is one possible choice. However, a web proxy is another available tool that can make the job a little easier. The following are two of the most popular web proxies among penetration testers and bug hunters:

Web proxies allow the penetration tester and bug hunters to attack and debug web applications. These tools allow you to intercept, inspect, and modify the raw contents of the traffic, as follows:

  • Intercept: Enables you to see under the hood and watch the traffic move back and forth between the client and the server.
  • Inspect: Enables you to enumerate how applications work and see the mechanisms they use.
  • Modify: Enables you to modify the data in an attempt to see how the application will respond (for example, injection attacks).

These tools help you perform SQL injection, cookies subversion, session hijacking, command injection, cross-site scripting (XSS), cross-site request forgery (CSRF), and many other types of attacks.

Sending the Results to a Web Proxy

Feroxbuster allows you to send the results to a web proxy such as Burp Suite or the OWASP Zed Attack Proxy (ZAP). You can use the –proxy option (as demonstrated below) to send the results to a web proxy:

feroxbuster -w dir_enum -u http://10.6.6.8 --insecure --proxy http://127.0.0.1:8080

Burp Suite and the OWASP ZAP use port 8080 by default.

NOTE: The --insecure flag is set because the proxy is not using HTTPS.

Sending the Results to a SOCKS Proxy

You can send the results to a SOCKS proxy (including DNS resolution lookups) by using the following command:

feroxbuster -w dir_enum -u http://10.6.6.8 --proxy socks5h://127.0.0.1:9050

In the following section, you will learn about additional advanced enumeration options.

Advanced Enumeration Options

The following are a few additional advanced enumeration options.

Specifying File Extensions to Scan Specific Files

You can specify multiple file types (extensions) to be scanned with the -x option. The following example adds .pdf.js.html.php.txt.json, and .docx extensions to each scanned URL.

feroxbuster -w dir_enum -u http://10.6.6.8 -x pdf,js,html,php,txt,json,docx

You can specify each extension using comma-separated or space-separated arguments. After executing the command above, you should be able to see the following extensions in the feroxbuster tool banner.

 💲  Extensions            │ [pdf, js, html, php, txt, json, docx]

Including HTTP Header Elements

You can include HTTP header elements using the -H option, as shown below:

feroxbuster -u http://10.6.6.8 -w dir_enum -H Accept:application/json "Authorization: Bearer {token}"

This is particularly useful when testing application programming interfaces (APIs).

Passing an Authorization Token via the --query Parameter

Token-based authentication is a protocol which allows web applications to verify their user’s identity or the identity of another web application by using a unique access token. During the life of the token, users or other applications (often via APIs) access the application resources instead of having to re-enter credentials each time they go back to the same web application resource protected with that same token. You can pass an authorization token using feroxbuster’s --query parameter, as demonstrated below:

feroxbuster -u http://10.6.6.8 -w dir_enum --query token=0987654321DEADBEEF

Auto-Tune and Auto-Bail

The --auto-tune and --auto-bail options allow you to configure different “policies” for “tunning” or “bailing” a scan. These auto-tune and auto-bail policies are only enforced after at least 50 requests have been made by the feroxbuster tool. Tunning and bailing actions are triggered by the following criteria:

  • number of general errors (for example: timeouts) is higher than half the number of threads (or at least 25 if threads are lower)
  • 90% of responses are 403 (Forbidden) error messages
  • 30% of requests are 429 (Too Many Requests) error messages

NOTE: All the criteria above is on a per-directory-scanned basis.

The --auto-tune policy enforces a rate limit on individual directory scans when one of the aforementioned criteria is met. The rate limit self-adjusts every (timeout / 2) seconds. If the number of errors have increased during that time, the allowed rate of requests is lowered. On the other hand, if the number of errors hasn’t moved, the allowed rate of requests is increased. The rate limit will be removed completely if no additional errors are found after a certain number of checks.

The --auto-bail policy cancels individual directory scans when one of the aforementioned criteria is met. They just stop getting scanned, no muss, no fuss.

Running Multiple Scans in Parallel

You can run multiple scans in parallel using the –parallel option. This allows you to scan a large number of hosts or web applications at the same time. You can put all your target applications URLs in a file and then use that file as shown in the following example:

cat my_targets | feroxbuster --stdin --parallel 10 --extract-links --auto-bail

The target file used in the example above is my_targets and 10 scans are run in parallel.

Rate Limiting

You can limit the number of requests per second using the --rate-limit option, as shown below:

feroxbuster -u http://10.6.6.8 -w dir_enum --rate-limit 50

You can also limit the number of directories that can be processed or scanned at the same time using the --scan-limit option, as demonstrated below:

feroxbuster -u http://10.6.6.8 -w dir_enum --rate-limit 50 --scan-limit 1

Web Application Penetration Testing – Training

Web Application Penetration Testing

Phase 1 – History

  1. History of Internet – https://www.youtube.com/watch?v=9hIQjrMHTv4

Phase 2 – Web and Server Technology

 

  1. Basic concepts of web applications, how they work and the HTTP protocol – https://www.youtube.com/watch?v=RsQ1tFLwldY&t=7s
  2. HTML basics part 1 – https://www.youtube.com/watch?v=p6fRBGI_BY0
  3. HTML basics part 2 – https://www.youtube.com/watch?v=Zs6lzuBVK2w
  4. Difference between static and dynamic website – https://www.youtube.com/watch?v=hlg6q6OFoxQ
  5. HTTP protocol Understanding – https://www.youtube.com/watch?v=JFZMyhRTVt0
  6. Parts of HTTP Request –https://www.youtube.com/watch?v=pHFWGN-upGM
  7. Parts of HTTP Response – https://www.youtube.com/watch?v=c9sMNc2PrMU
  8. Various HTTP Methods – https://www.youtube.com/watch?v=PO7D20HsFsY
  9. Understanding URLS – https://www.youtube.com/watch?v=5Jr-_Za5yQM
  10. Intro to REST – https://www.youtube.com/watch?v=YCcAE2SCQ6k
  11. HTTP Request & Response Headers – https://www.youtube.com/watch?v=vAuZwirKjWs
  12. What is a cookie – https://www.youtube.com/watch?v=I01XMRo2ESg
  13. HTTP Status codes – https://www.youtube.com/watch?v=VLH3FMQ5BIQ
  14. HTTP Proxy – https://www.youtube.com/watch?v=qU0PVSJCKcs
  15. Authentication with HTTP – https://www.youtube.com/watch?v=GxiFXUFKo1M
  16. HTTP basic and digest authentication – https://www.youtube.com/watch?v=GOnhCbDhMzk
  17. What is “Server-Side” – https://www.youtube.com/watch?v=JnCLmLO9LhA
  18. Server and client side with example – https://www.youtube.com/watch?v=DcBB2Fp8WNI
  19. What is a session – https://www.youtube.com/watch?v=WV4DJ6b0jhg&t=202s
  20. Introduction to UTF-8 and Unicode – https://www.youtube.com/watch?v=sqPTR_v4qFA
  21. URL encoding – https://www.youtube.com/watch?v=Z3udiqgW1VA
  22. HTML encoding – https://www.youtube.com/watch?v=IiAfCLWpgII&t=109s
  23. Base64 encoding – https://www.youtube.com/watch?v=8qkxeZmKmOY
  24. Hex encoding & ASCII – https://www.youtube.com/watch?v=WW2SaCMnHdU

Phase 3 – Setting up the lab with BurpSuite and bWAPP

 

MANISH AGRAWAL

 

  1. Setup lab with bWAPP – https://youtube.com/watch?v=dwtUn3giwTk&index=1&list=PLv95pq8fEyuivHeZB2jeC435tU3_1YGzV
  2. Set up Burp Suite – https://www.youtube.com/watch?v=hQsT4rSa_v0&list=PLv95pq8fEyuivHeZB2jeC435tU3_1YGzV&index=2
  3. Configure Firefox and add certificate – https://www.youtube.com/watch?v=hfsdJ69GSV4&index=3&list=PLv95pq8fEyuivHeZB2jeC435tU3_1YGzV
  4. Mapping and scoping website – https://www.youtube.com/watch?v=H-_iVteMDRo&index=4&list=PLv95pq8fEyuivHeZB2jeC435tU3_1YGzV
  5. Spidering – https://www.youtube.com/watch?v=97uMUQGIe14&list=PLv95pq8fEyuivHeZB2jeC435tU3_1YGzV&index=5
  6. Active and passive scanning – https://www.youtube.com/watch?v=1Mjom6AcFyU&index=6&list=PLv95pq8fEyuivHeZB2jeC435tU3_1YGzV
  7. Scanner options and demo – https://www.youtube.com/watch?v=gANi4Kt7-ek&index=7&list=PLv95pq8fEyuivHeZB2jeC435tU3_1YGzV
  8. Introduction to password security – https://www.youtube.com/watch?v=FwcUhcLO9iM&list=PLv95pq8fEyuivHeZB2jeC435tU3_1YGzV&index=8
  9. Intruder – https://www.youtube.com/watch?v=wtMg9oEMTa8&list=PLv95pq8fEyuivHeZB2jeC435tU3_1YGzV&index=9
  10. Intruder attack types – https://www.youtube.com/watch?v=N5ndYPwddkQ&index=10&list=PLv95pq8fEyuivHeZB2jeC435tU3_1YGzV
  11. Payload settings – https://www.youtube.com/watch?v=5GpdlbtL-1Q&index=11&list=PLv95pq8fEyuivHeZB2jeC435tU3_1YGzV
  12. Intruder settings – https://www.youtube.com/watch?v=B_Mu7jmOYnU&list=PLv95pq8fEyuivHeZB2jeC435tU3_1YGzV&index=12

ÆTHER SECURITY LAB

 

  1. 1 Penetration testing tool – https://www.youtube.com/watch?v=AVzC7ETqpDo&list=PLq9n8iqQJFDrwFe9AEDBlR1uSHEN7egQA&index=1
  2. Environment Setup – https://www.youtube.com/watch?v=yqnUOdr0eVk&index=2&list=PLq9n8iqQJFDrwFe9AEDBlR1uSHEN7egQA
  3. General concept – https://www.youtube.com/watch?v=udl4oqr_ylM&list=PLq9n8iqQJFDrwFe9AEDBlR1uSHEN7egQA&index=3
  4. Proxy module – https://www.youtube.com/watch?v=PDTwYFkjQBE&list=PLq9n8iqQJFDrwFe9AEDBlR1uSHEN7egQA&index=4
  5. Repeater module – https://www.youtube.com/watch?v=9Zh_7s5csCc&list=PLq9n8iqQJFDrwFe9AEDBlR1uSHEN7egQA&index=5
  6. Target and spider module – https://www.youtube.com/watch?v=dCKPZUSOlr8&list=PLq9n8iqQJFDrwFe9AEDBlR1uSHEN7egQA&index=6
  7. Sequencer and scanner module – https://www.youtube.com/watch?v=G-v581pXerE&list=PLq9n8iqQJFDrwFe9AEDBlR1uSHEN7egQA&index=7

Phase 4 – Mapping the application and attack surface

 

  1. Spidering – https://www.youtube.com/watch?v=97uMUQGIe14&list=PLv95pq8fEyuivHeZB2jeC435tU3_1YGzV&index=5
  2. Mapping application using robots.txt – https://www.youtube.com/watch?v=akuzgZ75zrk
  3. Discover hidden contents using dirbuster – https://www.youtube.com/watch?v=–nu9Jq07gA
  4. Dirbuster in detail – https://www.youtube.com/watch?v=2tOQC68hAcQ
  5. Discover hidden directories and files with intruder – https://www.youtube.com/watch?v=4Fz9mJeMNkI
  6. Directory bruteforcing 1 – https://www.youtube.com/watch?v=ch2onB_LFoI
  7. Directory bruteforcing 2 – https://www.youtube.com/watch?v=ASMW_oLbyIg
  8. Identify application entry points – https://www.youtube.com/watch?v=IgJWPZ2OKO8&t=34s
  9. Identify application entry points – https://www.owasp.org/index.php/Identify_application_entry_points_(OTG-INFO-006)
  10. Identify client and server technology – https://www.youtube.com/watch?v=B8jN_iWjtyM
  1. Identify server technology using banner grabbing (telnet) – https://www.youtube.com/watch?v=O67M-U2UOAg
  2. Identify server technology using httprecon – https://www.youtube.com/watch?v=xBBHtS-dwsM
  3. Pentesting with Google dorks Introduction – https://www.youtube.com/watch?v=NmdrKFwAw9U
  4. Fingerprinting web server – https://www.youtube.com/watch?v=tw2VdG0t5kc&list=PLxLRoXCDIalcRS5Nb1I_HM_OzS10E6lqp&index=10
  5. Use Nmap for fingerprinting web server – https://www.youtube.com/watch?v=VQV-y_-AN80
  6. Review webs servers metafiles for information leakage – https://www.youtube.com/watch?v=sds3Zotf_ZY
  7. Enumerate applications on web server – https://www.youtube.com/watch?v=lfhvvTLN60E
  8. Identify application entry points – https://www.youtube.com/watch?v=97uMUQGIe14&list=PLDeogY2Qr-tGR2NL2X1AR5Zz9t1iaWwlM
  9. Map execution path through application – https://www.youtube.com/watch?v=0I0NPiyo9UI
  10. Fingerprint web application frameworks – https://www.youtube.com/watch?v=ASzG0kBoE4c

Phase 5 – Understanding and exploiting OWASP top 10 vulnerabilities

 

  1. A closer look at all owasp top 10 vulnerabilities – https://www.youtube.com/watch?v=avFR_Af0KGk

IBM

 

  1. Injection – https://www.youtube.com/watch?v=02mLrFVzIYU&index=1&list=PLoyY7ZjHtUUVLs2fy-ctzZDSPpawuQ28d
  2. Broken authentication and session management – https://www.youtube.com/watch?v=iX49fqZ8HGA&index=2&list=PLoyY7ZjHtUUVLs2fy-ctzZDSPpawuQ28d
  3. Cross-site scripting – https://www.youtube.com/watch?v=x6I5fCupLLU&index=3&list=PLoyY7ZjHtUUVLs2fy-ctzZDSPpawuQ28d
  4. Insecure direct object reference – https://www.youtube.com/watch?v=-iCyp9Qz3CI&list=PLoyY7ZjHtUUVLs2fy-ctzZDSPpawuQ28d&index=4
  5. Security misconfiguration – https://www.youtube.com/watch?v=cIplXL8idyo&list=PLoyY7ZjHtUUVLs2fy-ctzZDSPpawuQ28d&index=5
  6. Sensitive data exposure – https://www.youtube.com/watch?v=rYlzTQlF8Ws&index=6&list=PLoyY7ZjHtUUVLs2fy-ctzZDSPpawuQ28d
  7. Missing functional level access controls – https://www.youtube.com/watch?v=VMv_gyCNGpk&list=PLoyY7ZjHtUUVLs2fy-ctzZDSPpawuQ28d&index=7
  8. Cross-site request forgery – https://www.youtube.com/watch?v=_xSFm3KGxh0&list=PLoyY7ZjHtUUVLs2fy-ctzZDSPpawuQ28d&index=8
  9. Using components with known vulnerabilities –

https://www.youtube.com/watch?v=bhJmVBJ-F-4&index=9&list=PLoyY7ZjHtUUVLs2fy-ctzZDSPpawuQ28d

  1. Unvalidated redirects and forwards – https://www.youtube.com/watch?v=L6bYKiLtSL8&index=10&list=PLoyY7ZjHtUUVLs2fy-ctzZDSPpawuQ28d

F5 CENTRAL

 

  1. Injection – https://www.youtube.com/watch?v=rWHvp7rUka8&index=1&list=PLyqga7AXMtPPuibxp1N0TdyDrKwP9H_jD
  2. Broken authentication and session management – https://www.youtube.com/watch?v=mruO75ONWy8&index=2&list=PLyqga7AXMtPPuibxp1N0TdyDrKwP9H_jD
  3. Insecure deserialisation – https://www.youtube.com/watch?v=nkTBwbnfesQ&index=8&list=PLyqga7AXMtPPuibxp1N0TdyDrKwP9H_jD
  4. Sensitive data exposure – https://www.youtube.com/watch?v=2RKbacrkUBU&index=3&list=PLyqga7AXMtPPuibxp1N0TdyDrKwP9H_jD
  5. Broken access control – https://www.youtube.com/watch?v=P38at6Tp8Ms&list=PLyqga7AXMtPPuibxp1N0TdyDrKwP9H_jD&index=5
  6. Insufficient logging and monitoring – https://www.youtube.com/watch?v=IFF3tkUOF5E&index=10&list=PLyqga7AXMtPPuibxp1N0TdyDrKwP9H_jD
  1. XML external entities – https://www.youtube.com/watch?v=g2ey7ry8_CQ&list=PLyqga7AXMtPPuibxp1N0TdyDrKwP9H_jD&index=4
  2. Using components with known vulnerabilities – https://www.youtube.com/watch?v=IGsNYVDKRV0&index=9&list=PLyqga7AXMtPPuibxp1N0TdyDrKwP9H_jD
  3. Cross-site scripting – https://www.youtube.com/watch?v=IuzU4y-UjLw&index=7&list=PLyqga7AXMtPPuibxp1N0TdyDrKwP9H_jD
  4. Security misconfiguration – https://www.youtube.com/watch?v=JuGSUMtKTPU&index=6&list=PLyqga7AXMtPPuibxp1N0TdyDrKwP9H_jD

LUKE BRINER

 

  1. Injection explained – https://www.youtube.com/watch?v=1qMggPJpRXM&index=1&list=PLpNYlUeSK_rkrrBox-xvSkm5lgaDqKa0X
  2. Broken authentication and session management – https://www.youtube.com/watch?v=fKnG15BL4AY&list=PLpNYlUeSK_rkrrBox-xvSkm5lgaDqKa0X&index=2
  3. Cross-site scripting – https://www.youtube.com/watch?v=ksM-xXeDUNs&index=3&list=PLpNYlUeSK_rkrrBox-xvSkm5lgaDqKa0X
  4. Insecure direct object reference – https://www.youtube.com/watch?v=ZodA76-CB10&list=PLpNYlUeSK_rkrrBox-xvSkm5lgaDqKa0X&index=4
  5. Security misconfiguration – https://www.youtube.com/watch?v=DfFPHKPCofY&index=5&list=PLpNYlUeSK_rkrrBox-xvSkm5lgaDqKa0X
  6. Sensitive data exposure – https://www.youtube.com/watch?v=Z7hafbGDVEE&list=PLpNYlUeSK_rkrrBox-xvSkm5lgaDqKa0X&index=6
  7. Missing functional level access control – https://www.youtube.com/watch?v=RGN3w831Elo&list=PLpNYlUeSK_rkrrBox-xvSkm5lgaDqKa0X&index=7
  8. Cross-site request forgery – https://www.youtube.com/watch?v=XRW_US5BCxk&list=PLpNYlUeSK_rkrrBox-xvSkm5lgaDqKa0X&index=8
  9. Components with known vulnerabilities – https://www.youtube.com/watch?v=pbvDW9pJdng&list=PLpNYlUeSK_rkrrBox-xvSkm5lgaDqKa0X&index=9
  10. Unvalidated redirects and forwards – https://www.youtube.com/watch?v=bHTglpgC5Qg&list=PLpNYlUeSK_rkrrBox-xvSkm5lgaDqKa0X&index=10

Phase 6 – Session management testing

 

  1. Bypass authentication using cookie manipulation – https://www.youtube.com/watch?v=mEbmturLljU
  2. Cookie Security Via httponly and secure Flag – OWASP – https://www.youtube.com/watch?v=3aKA4RkAg78
  3. Penetration testing Cookies basic – https://www.youtube.com/watch?v=_P7KN8T1boc
  4. Session fixation 1 – https://www.youtube.com/watch?v=ucmgeHKtxaI
  5. Session fixation 2 – https://www.youtube.com/watch?v=0Tu1qxysWOk
  6. Session fixation 3 – https://www.youtube.com/watch?v=jxwgpWvRUSo
  7. Session fixation 4 – https://www.youtube.com/watch?v=eUbtW0Z0W1g
  8. CSRF – Cross site request forgery 1 – https://www.youtube.com/watch?v=m0EHlfTgGUU
  9. CSRF – Cross site request forgery 2 – https://www.youtube.com/watch?v=H3iu0_ltcv4
  10. CSRF – Cross site request forgery 3 – https://www.youtube.com/watch?v=1NO4I28J-0s
  11. CSRF – Cross site request forgery 4 – https://www.youtube.com/watch?v=XdEJEUJ0Fr8
  12. CSRF – Cross site request forgery 5 – https://www.youtube.com/watch?v=TwG0Rd0hr18
  13. Session puzzling 1 – https://www.youtube.com/watch?v=YEOvmhTb8xA
  14. Admin bypass using session hijacking – https://www.youtube.com/watch?v=1wp1o-1TfAc

Phase 7 – Bypassing client-side controls

 

  1. What is hidden forms in HTML – https://www.youtube.com/watch?v=orUoGsgaYAE
  2. Bypassing hidden form fields using tamper data – https://www.youtube.com/watch?v=NXkGX2sPw7I
  3. Bypassing hidden form fields using Burp Suite (Purchase application) – https://www.youtube.com/watch?v=xahvJyUFTfM
  4. Changing price on eCommerce website using parameter tampering – https://www.youtube.com/watch?v=A-ccNpP06Zg
  5. Understanding cookie in detail – https://www.youtube.com/watch?v=_P7KN8T1boc&list=PLWPirh4EWFpESKWJmrgQwmsnTrL_K93Wi&index=18
  6. Cookie tampering with tamper data- https://www.youtube.com/watch?v=NgKXm0lBecc
  7. Cookie tamper part 2 – https://www.youtube.com/watch?v=dTCt_I2DWgo
  8. Understanding referer header in depth using Cisco product – https://www.youtube.com/watch?v=GkQnBa3C7WI&t=35s
  9. Introduction to ASP.NET viewstate – https://www.youtube.com/watch?v=L3p6Uw6SSXs
  10. NET viewstate in depth – https://www.youtube.com/watch?v=Fn_08JLsrmY
  11. Analyse sensitive data in ASP.NET viewstate – https://msdn.microsoft.com/en-us/library/ms972427.aspx?f=255&MSPPError=-2147217396
  12. Cross-origin-resource-sharing explanation with example – https://www.youtube.com/watch?v=Ka8vG5miErk
  13. CORS demo 1 – https://www.youtube.com/watch?v=wR8pjTWaEbs
  14. CORS demo 2 – https://www.youtube.com/watch?v=lg31RYYG-T4
  15. Security headers – https://www.youtube.com/watch?v=TNlcoYLIGFk
  16. Security headers 2 – https://www.youtube.com/watch?v=ZZUvmVkkKu4

Phase 8 – Attacking authentication/login

 

  1. Attacking login panel with bad password – Guess username password for the website and try different combinations
  2. Brute-force login panel – https://www.youtube.com/watch?v=25cazx5D_vw
  3. Username enumeration – https://www.youtube.com/watch?v=WCO7LnSlskE
  4. Username enumeration with bruteforce password attack – https://www.youtube.com/watch?v=zf3-pYJU1c4
  5. Authentication over insecure HTTP protocol – https://www.youtube.com/watch?v=ueSG7TUqoxk
  6. Authentication over insecure HTTP protocol – https://www.youtube.com/watch?v=_WQe36pZ3mA
  7. Forgot password vulnerability – case 1 – https://www.youtube.com/watch?v=FEUidWWnZwU
  8. Forgot password vulnerability – case 2 – https://www.youtube.com/watch?v=j7-8YyYdWL4
  9. Login page autocomplete feature enabled – https://www.youtube.com/watch?v=XNjUfwDmHGc&t=33s
  10. Testing for weak password policy – https://www.owasp.org/index.php/Testing_for_Weak_password_policy_(OTG-AUTHN-007)
  11. Insecure distribution of credentials – When you register in any website or you request for a password reset using forgot password feature, if the website sends your username and password over the email in cleartext without sending the password reset link, then it is a
  12. Test for credentials transportation using SSL/TLS certificate – https://www.youtube.com/watch?v=21_IYz4npRs
  13. Basics of MySQL – https://www.youtube.com/watch?v=yPu6qV5byu4
  14. Testing browser cache – https://www.youtube.com/watch?v=2T_Xz3Humdc
  15. Bypassing login panel -case 1 – https://www.youtube.com/watch?v=TSqXkkOt6oM
  16. Bypass login panel – case 2 – https://www.youtube.com/watch?v=J6v_W-LFK1c

Phase 9 – Attacking access controls (IDOR, Priv esc, hidden files and directories)

 

Completely unprotected functionalities

 

  1. Finding admin panel – https://www.youtube.com/watch?v=r1k2lgvK3s0
  2. Finding admin panel and hidden files and directories – https://www.youtube.com/watch?v=Z0VAPbATy1A
  3. Finding hidden webpages with dirbusater – https://www.youtube.com/watch?v=–nu9Jq07gA&t=5s

Insecure direct object reference

  1. IDOR case 1 – https://www.youtube.com/watch?v=gci4R9Vkulc
  2. IDOR case 2 – https://www.youtube.com/watch?v=4DTULwuLFS0
  3. IDOR case 3 (zomato) – https://www.youtube.com/watch?v=tCJBLG5Mayo

Privilege escalation

  1. What is privilege escalation – https://www.youtube.com/watch?v=80RzLSrczmc
  2. Privilege escalation – Hackme bank – case 1 – https://www.youtube.com/watch?v=g3lv 87cWM
  3. Privilege escalation – case 2 – https://www.youtube.com/watch?v=-i4O_hjc87Y

Phase 10 – Attacking Input validations (All injections, XSS and mics)

 

HTTP verb tampering

 

  1. Introduction HTTP verb tampering – https://www.youtube.com/watch?v=Wl0PrIeAnhs
  2. HTTP verb tampering demo – https://www.youtube.com/watch?v=bZlkuiUkQzE

HTTP parameter pollution

 

  1. Introduction HTTP parameter pollution – https://www.youtube.com/watch?v=Tosp-JyWVS4
  2. HTTP parameter pollution demo 1 – https://www.youtube.com/watch?v=QVZBl8yxVX0&t=11s
  3. HTTP parameter pollution demo 2 – https://www.youtube.com/watch?v=YRjxdw5BAM0
  4. HTTP parameter pollution demo 3 – https://www.youtube.com/watch?v=kIVefiDrWUw

XSS – Cross site scripting

 

  1. Introduction to XSS – https://www.youtube.com/watch?v=gkMl1suyj3M
  1. What is XSS – https://www.youtube.com/watch?v=cbmBDiR6WaY
  2. Reflected XSS demo – https://www.youtube.com/watch?v=r79ozjCL7DA
  3. XSS attack method using burpsuite – https://www.youtube.com/watch?v=OLKBZNw3OjQ
  4. XSS filter bypass with Xenotix – https://www.youtube.com/watch?v=loZSdedJnqc
  5. Reflected XSS filter bypass 1 – https://www.youtube.com/watch?v=m5rlLgGrOVA
  6. Reflected XSS filter bypass 2 – https://www.youtube.com/watch?v=LDiXveqQ0gg
  7. Reflected XSS filter bypass 3 – https://www.youtube.com/watch?v=hb_qENFUdOk
  8. Reflected XSS filter bypass 4 – https://www.youtube.com/watch?v=Fg1qqkedGUk
  9. Reflected XSS filter bypass 5 – https://www.youtube.com/watch?v=NImym71f3Bc
  10. Reflected XSS filter bypass 6 – https://www.youtube.com/watch?v=9eGzAym2a5Q
  11. Reflected XSS filter bypass 7 – https://www.youtube.com/watch?v=ObfEI84_MtM
  12. Reflected XSS filter bypass 8 – https://www.youtube.com/watch?v=2c9xMe3VZ9Q
  13. Reflected XSS filter bypass 9 – https://www.youtube.com/watch?v=-48zknvo7LM
  14. Introduction to Stored XSS – https://www.youtube.com/watch?v=SHmQ3sQFeLE
  15. Stored XSS 1 – https://www.youtube.com/watch?v=oHIl_pCahsQ
  16. Stored XSS 2 – https://www.youtube.com/watch?v=dBTuWzX8hd0
  17. Stored XSS 3 – https://www.youtube.com/watch?v=PFG0lkMeYDc
  18. Stored XSS 4 – https://www.youtube.com/watch?v=YPUBFklUWLc
  19. Stored XSS 5 – https://www.youtube.com/watch?v=x9Zx44EV-Og

SQL injection

 

  1. Part 1 – Install SQLi lab – https://www.youtube.com/watch?v=NJ9AA1_t1Ic&index=23&list=PLkiAz1NPnw8qEgzS7cgVMKavvOAdogsro
  2. Part 2 – SQL lab series – https://www.youtube.com/watch?v=TA2h_kUqfhU&index=22&list=PLkiAz1NPnw8qEgzS7cgVMKavvOAdogsro
  3. Part 3 – SQL lab series – https://www.youtube.com/watch?v=N0zAChmZIZU&list=PLkiAz1NPnw8qEgzS7cgVMKavvOAdogsro&index=21
  4. Part 4 – SQL lab series – https://www.youtube.com/watch?v=6pVxm5mWBVU&index=20&list=PLkiAz1NPnw8qEgzS7cgVMKavvOAdogsro
  5. Part 5 – SQL lab series – https://www.youtube.com/watch?v=0tyerVP9R98&index=19&list=PLkiAz1NPnw8qEgzS7cgVMKavvOAdogsro
  6. Part 6 – Double query injection – https://www.youtube.com/watch?v=zaRlcPbfX4M&index=18&list=PLkiAz1NPnw8qEgzS7cgVMKavvOAdogsro
  7. Part 7 – Double query injection . – https://www.youtube.com/watch?v=9utdAPxmvaI&index=17&list=PLkiAz1NPnw8qEgzS7cgVMKavvOAdogsro
  8. Part 8 – Blind injection boolean based – https://www.youtube.com/watch?v=u7Z7AIR6cMI&index=16&list=PLkiAz1NPnw8qEgzS7cgVMKavvOAdogsro
  9. Part 9 – Blind injection time based – https://www.youtube.com/watch?v=gzU1YBu_838&index=15&list=PLkiAz1NPnw8qEgzS7cgVMKavvOAdogsro
  10. Part 10 – Dumping DB using outfile – https://www.youtube.com/watch?v=ADW844OA6io&index=14&list=PLkiAz1NPnw8qEgzS7cgVMKavvOAdogsro
  11. Part 11 – Post parameter injection error based – https://www.youtube.com/watch?v=6sQ23tqiTXY&list=PLkiAz1NPnw8qEgzS7cgVMKavvOAdogsro&index=13
  12. Part 12 – POST parameter injection double query based – https://www.youtube.com/watch?v=tjFXWQY4LuA&index=12&list=PLkiAz1NPnw8qEgzS7cgVMKavvOAdogsro
  13. Part 13 – POST parameter injection blind boolean and time based – https://www.youtube.com/watch?v=411G-4nH5jE&list=PLkiAz1NPnw8qEgzS7cgVMKavvOAdogsro&index=10
  14. Part 14 – Post parameter injection in UPDATE query – https://www.youtube.com/watch?v=2FgLcPuU7Vw&list=PLkiAz1NPnw8qEgzS7cgVMKavvOAdogsro&index=11
  1. Part 15 – Injection in insert query – https://www.youtube.com/watch?v=ZJiPsWxXYZs&list=PLkiAz1NPnw8qEgzS7cgVMKavvOAdogsro&index=9
  2. Part 16 – Cookie based injection – https://www.youtube.com/watch?v=-A3vVqfP8pA&list=PLkiAz1NPnw8qEgzS7cgVMKavvOAdogsro&index=8
  3. Part 17 – Second order injection –https://www.youtube.com/watch?v=e9pbC5BxiAE&list=PLkiAz1NPnw8qEgzS7cgVMKavvOAdogsro&index=7
  4. Part 18 – Bypassing blacklist filters – 1 – https://www.youtube.com/watch?v=5P-knuYoDdw&index=6&list=PLkiAz1NPnw8qEgzS7cgVMKavvOAdogsro
  5. Part 19 – Bypassing blacklist filters – 2 – https://www.youtube.com/watch?v=45BjuQFt55Y&list=PLkiAz1NPnw8qEgzS7cgVMKavvOAdogsro&index=5
  6. Part 20 – Bypassing blacklist filters – 3 – https://www.youtube.com/watch?v=c-Pjb_zLpH0&index=4&list=PLkiAz1NPnw8qEgzS7cgVMKavvOAdogsro
  7. Part 21 – Bypassing WAF – https://www.youtube.com/watch?v=uRDuCXFpHXc&list=PLkiAz1NPnw8qEgzS7cgVMKavvOAdogsro&index=2
  8. Part 22 – Bypassing WAF – Impedance mismatch – https://www.youtube.com/watch?v=ygVUebdv_Ws&list=PLkiAz1NPnw8qEgzS7cgVMKavvOAdogsro&index=3
  9. Part 23 – Bypassing addslashes – charset mismatch –

https://www.youtube.com/watch?v=du-jkS6-sbo&list=PLkiAz1NPnw8qEgzS7cgVMKavvOAdogsro&index=1

NoSQL injection

  1. Introduction to NoSQL injection – https://www.youtube.com/watch?v=h0h37-Dwd_A
  2. Introduction to SQL vs NoSQL – Difference between MySQL and MongoDB with tutorial – https://www.youtube.com/watch?v=QwevGzVu_zk
  3. Abusing NoSQL databases – https://www.youtube.com/watch?v=lcO1BTNh8r8
  4. Making cry – attacking NoSQL for pentesters – https://www.youtube.com/watch?v=NgsesuLpyOg

Xpath and XML injection

  1. Introduction to Xpath injection – https://www.youtube.com/watch?v=2_UyM6Ea0Yk&t=3102s
  2. Introduction to XML injection – https://www.youtube.com/watch?v=9ZokuRHo-eY
  3. Practical 1 – bWAPP – https://www.youtube.com/watch?v=6tV8EuaHI9M
  4. Practical 2 – Mutillidae – https://www.youtube.com/watch?v=fV0qsqcScI4
  5. Practical 3 – webgoat – https://www.youtube.com/watch?v=5ZDSPVp1TpM
  6. Hack admin panel using Xpath injection – https://www.youtube.com/watch?v=vvlyYlXuVxI
  7. XXE demo – https://www.youtube.com/watch?v=3B8QhyrEXlU
  8. XXE demo 2 – https://www.youtube.com/watch?v=UQjxvEwyUUw
  9. XXE demo 3 – https://www.youtube.com/watch?v=JI0daBHq6fA

LDAP injection

  1. Introduction and practical 1 – https://www.youtube.com/watch?v=-TXFlg7S9ks
  2. Practical 2 – https://www.youtube.com/watch?v=wtahzm_R8e4

OS command injection

  1. OS command injection in bWAPP – https://www.youtube.com/watch?v=qLIkGJrMY9k
  2. bWAAP- OS command injection with Commiux (All levels) – https://www.youtube.com/watch?v=5-1QLbVa8YE

Local file inclusion

  1. Detailed introduction – https://www.youtube.com/watch?v=kcojXEwolIs
  2. LFI demo 1 – https://www.youtube.com/watch?v=54hSHpVoz7A
  1. LFI demo 2 – https://www.youtube.com/watch?v=qPq9hIVtitI

Remote file inclusion

  1. Detailed introduction – https://www.youtube.com/watch?v=MZjORTEwpaw
  2. RFI demo 1 – https://www.youtube.com/watch?v=gWt9A6eOkq0
  3. RFI introduction and demo 2 – https://www.youtube.com/watch?v=htTEfokaKsM

HTTP splitting/smuggling

  1. Detailed introduction – https://www.youtube.com/watch?v=bVaZWHrfiPw
  2. Demo 1 – https://www.youtube.com/watch?v=mOf4H1aLiiE

Phase 11 – Generating and testing error codes

 

  1. Generating normal error codes by visiting files that may not exist on the server – for example visit php or chintan.aspx file on any website and it may redirect you to 404.php or 404.aspx or their customer error page. Check if an error page is generated by default web server or application framework or a custom page is displayed which does not display any sensitive information.
  2. Use BurpSuite fuzzing techniques to generate stack trace error codes – https://www.youtube.com/watch?v=LDF6OkcvBzM

Phase 12 – Weak cryptography testing

 

  1. SSL/TLS weak configuration explained – https://www.youtube.com/watch?v=Rp3iZUvXWlM
  2. Testing weak SSL/TLS ciphers – https://www.youtube.com/watch?v=slbwCMHqCkc
  3. Test SSL/TLS security with Qualys guard – https://www.youtube.com/watch?v=Na8KxqmETnw
  4. Sensitive information sent via unencrypted channels – https://www.youtube.com/watch?v=21_IYz4npRs

Phase 12 – Business logic vulnerability

 

  1. What is a business logic flaw – https://www.youtube.com/watch?v=ICbvQzva6lE&list=PLWoDr1kTbIxKZe_JeTDIcD2I7Uy1pLIFI
  2. The Difficulties Finding Business Logic Vulnerabilities with Traditional Security Tools – https://www.youtube.com/watch?v=JTMg0bhkUbo&list=PLWoDr1kTbIxKZe_JeTDIcD2I7Uy1pLIFI&index=2
  3. How To Identify Business Logic Flaws – https://www.youtube.com/watch?v=FJcgfLM4SAY&list=PLWoDr1kTbIxKZe_JeTDIcD2I7Uy1pLIFI&index=3
  4. Business Logic Flaws: Attacker Mindset – https://www.youtube.com/watch?v=Svxh9KSTL3Y&list=PLWoDr1kTbIxKZe_JeTDIcD2I7Uy1pLIFI&index=4
  5. Business Logic Flaws: Dos Attack On Resource – https://www.youtube.com/watch?v=4S6HWzhmXQk&list=PLWoDr1kTbIxKZe_JeTDIcD2I7Uy1pLIFI&index=5
  6. Business Logic Flaws: Abuse Cases: Information Disclosure – https://www.youtube.com/watch?v=HrHdUEUwMHk&list=PLWoDr1kTbIxKZe_JeTDIcD2I7Uy1pLIFI&index=6
  1. Business Logic Flaws: Abuse Cases: iPod Repairman Dupes Apple – https://www.youtube.com/watch?v=8yB_ApVsdhA&list=PLWoDr1kTbIxKZe_JeTDIcD2I7Uy1pLIFI&index=7
  2. Business Logic Flaws: Abuse Cases: Online Auction – https://www.youtube.com/watch?v=oa_UICCqfbY&list=PLWoDr1kTbIxKZe_JeTDIcD2I7Uy1pLIFI&index=8
  3. Business Logic Flaws: How To Navigate Code Using ShiftLeft Ocular – https://www.youtube.com/watch?v=hz7IZu6H6oE&list=PLWoDr1kTbIxKZe_JeTDIcD2I7Uy1pLIFI&index=9
  4. Business Logic Security Checks: Data Privacy Compliance – https://www.youtube.com/watch?v=qX2fyniKUIQ&list=PLWoDr1kTbIxKZe_JeTDIcD2I7Uy1pLIFI&index=10
  5. Business Logic Security Checks: Encryption Compliance – https://www.youtube.com/watch?v=V8zphJbltDY&list=PLWoDr1kTbIxKZe_JeTDIcD2I7Uy1pLIFI&index=11
  6. Business Logic Security: Enforcement Checks – https://www.youtube.com/watch?v=5e7qgY_L3UQ&list=PLWoDr1kTbIxKZe_JeTDIcD2I7Uy1pLIFI&index=12
  7. Business Logic Exploits: SQL Injection – https://www.youtube.com/watch?v=hcIysfhA9AA&list=PLWoDr1kTbIxKZe_JeTDIcD2I7Uy1pLIFI&index=13
  8. Business Logic Exploits: Security Misconfiguration – https://www.youtube.com/watch?v=ppLBtCQcYRk&list=PLWoDr1kTbIxKZe_JeTDIcD2I7Uy1pLIFI&index=15
  9. Business Logic Exploits: Data Leakage – https://www.youtube.com/watch?v=qe0bEvguvbs&list=PLWoDr1kTbIxKZe_JeTDIcD2I7Uy1pLIFI&index=16
  10. Demo 1 – https://www.youtube.com/watch?v=yV7O-QRyOao
  11. Demo 2 – https://www.youtube.com/watch?v=mzjTG7pKmQI
  12. Demo 3 – https://www.youtube.com/watch?v=A8V_58QZPMs
  13. Demo 4 – https://www.youtube.com/watch?v=1pvrEKAFJyk
  14. Demo 5 – https://hackerone.com/reports/145745
  15. Demo 6 – https://hackerone.com/reports/430854

Phase 13 – WAF Bypass