⭐️

How To Pentest Firewall

one of the top cyber security pentesting companies

Table of Contents

How to Pen Test a Firewall Externally

A firewall is a device or software which is responsible for filtering network traffic.
It can be implemented between a trusted zone (Corporate Network Area) and an untrusted zone (Internet).
All communication between trusted and untrusted zones flows through the firewall, which decides whether to grant or reject access.
It uses different methods to filter out information.

Types of Firewalls

  • Packet-filtering firewalls:
    Operate at the router level, comparing each received packet to a set of defined criteria
    (such as allowed IP addresses, packet type, port number, etc.) before forwarding.
  • Circuit-level gateways:
    Responsible for monitoring the TCP handshaking between trusted and untrusted (remote) hosts
    to determine whether a session is legitimate.
  • Stateful inspection firewalls:
    Examine each packet while keeping track of whether that packet is part of an established TCP session.
    Offers more security than packet filtering or circuit-level gateways.
  • Application-level gateways:
    Decide whether to drop or forward a packet based on application information.
  • Multilayer inspection firewalls:
    Combine multiple firewall approaches, using a packet-filtering method that examines all seven layers
    of the Open Systems Interconnection (OSI) model.

Firewall Penetration Testing

In external penetration testing, a security analyst tests the ports and services available
on the organization’s external network. A live scan of the firewall can be performed using
nmap, a network mapping and port scanning tool. Nmap offers a variety of
scanning methods that can be used to analyze firewall configurations.

What is Port Scanning?

Port scanning is the process of attempting to connect to a number of sequential ports in order
to determine which ports are open and what services are running behind them.

Using nmap, we can check which services are open on a remote host and what could
be protected by its firewall. Below are some example commands:

Useful Nmap Commands

  • Scan operating system:

    sudo nmap -O remote_host
  • Scan a specific port instead of all common ports:

    sudo nmap -p port_number remote_host
  • Scan for TCP and UDP open ports:

    sudo nmap -n -PN -sT -sU -p- remote_host

Prashant Phatak

Founder & CEO, Valency Networks

Prashant Phatak is an accomplished leader in the field of IT and Cyber Security. He is Founder and C-level executive of his own firm Valency Networks. Prashant specializes in Vulnerability assessment and penetration testing (VAPT) of Web, Networks, Mobile Apps, Cloud apps, IoT and OT networks. He is also a certified lead auditor for ISO27001 and ISO22301 compliance.As an proven problem solver, Prashant's expertise is in the field of end to end IT and Cyber security consultancy to various industry sectors.

Related Blogs

Difference Between Privilege Escalation Attack and IDOR Attack

⭐️

Wireshark Tutorial -10 | Creating Wireshark Profiles

⭐️

Wireshark Tutorial -9 | Exporting and Sharing PCAP Files

⭐️

Wireshark Tutorial -8 | Detecting ICMP Floods or DoS Attempts

⭐️

Wireshark Tutorial -7 | Expose passwords sent in plain text

⭐️

Wireshark Tutorial -6 | Analyze HTTP, HTTPS, and DNS traffic