Bypass Firewall Restrictions with Metasploit (reverse_tcp_allports)

Bypass Firewall Restrictions with Metasploit (reverse_tcp_allports)

Introduction

Network Address Translation generally involves “re-writing the source and/or destination addresses of IP packets as they pass through a router or firewall” (from https://en.wikipedia.org/wiki/Network_Address_Translation)

The Linux kernel usually possesses a packet filter framework called netfilter (Project home: netfilter.org). This framework enables a Linux machine with an appropriate number of network cards (interfaces) to become a router capable of NAT. We will use the command utility ‘iptables’ to create complex rules for modification and filtering of packets. The important rules regarding NAT are – not very surprising – found in the ‘nat’-table. This table has three predefined chains: PREROUTINGOUTPUT und POSTROUTING.

ALL-PORTS payload:-

‘reverse_tcp’ only allows connection to one port, but if the victim has blocked outgoing connections except a few ports. Then it makes it difficult for the attacker to set a port for listening. ‘reverse_tcp _allports’ is used to to brute-force all the ports from {1-65535}.

We use iptables to reroute any incoming connection to the listening port.

Let’s begin

We use metasploit to create a meterpreter reverse shell.

Full Article Read Here

要查看或添加评论,请登录

Rajpal Singh的更多文章

  • Born2Root: 2: Vulnhub Walkthrough

    Born2Root: 2: Vulnhub Walkthrough

    Hello Friends!! Today we are going to take another CTF challenge named “Born2Root: 2”. The credit for making this VM…

  • dnscat2: Command and Control over the DNS

    dnscat2: Command and Control over the DNS

    In this article, we learn DNS tunnelling through an amazing tool i.e.

    8 条评论
  • HackInOS:1: Vulnhub Lab Walkthrough

    HackInOS:1: Vulnhub Lab Walkthrough

    Hello friends! Today we are going to take another boot2root challenge known as “HackInOS: 1”. The credit for making…

    2 条评论
  • unknowndevice64: 1: Vulnhub Lab Walkthrough

    unknowndevice64: 1: Vulnhub Lab Walkthrough

    Hello friends! Today we are going to take another boot2root challenge known as “unknowndevice64: 1”. The credit for…

  • Hack the Box Access: Walkthrough

    Hack the Box Access: Walkthrough

    Today we are going to solve another CTF challenge “Access”. It is a retired vulnerable lab presented by Hack the Box…

    2 条评论
  • Vulnhub: RootThis: 1 Walkthrough

    Vulnhub: RootThis: 1 Walkthrough

    Hello friends! Today we are going to take another boot2root challenge known as root this. The credit for making this VM…

  • Vulnhub: Kuya: 1 Walkthrough

    Vulnhub: Kuya: 1 Walkthrough

    Today we are going to solve another CTF challenge “Kuya”. It is another vulnerable lab presented by vulnhub for helping…

  • Matrix 2: Vulnhub Lab Walkthrough

    Matrix 2: Vulnhub Lab Walkthrough

    Today we are going to solve another Boot2Root challenge “Matrix 2”. It is another vulnerable lab presented by vulnhub…

    1 条评论
  • W34kn3ss 1: Vulnhub Lab Walkthrough

    W34kn3ss 1: Vulnhub Lab Walkthrough

    Today we are going to solve another CTF challenge “W34kn3ss 1”. Briefing about the lab, the matrix is controlling this…

  • Pentest Lab Setup on Memcached

    Pentest Lab Setup on Memcached

    In this article, we are going to learn about pen-testing in Memcached lab setup in Ubuntu 18.04.

社区洞察

其他会员也浏览了