Home
Calendar
Certifications
Columns
Features
Forum
Resources
Vitals
Latest Additions
April 2013 Free Giveaway Sponsor - eLearnSecurity
Human Intelligence to Navigate the Security Data Deluge
February 2013 Free Giveaway Winner of SANS CyberCon Training
Interview: Bugcrowd Founders on Herding Ninjas for Crowdsourced Bug Bounties
Network Forensics: The Tree in the Forest
March 2013 Free Giveaway Sponsor - Mile2
Book Review: Violent Python
February 2013 Free Giveaway Sponsor - SANS
Holiday 2012 Free Giveaway Winner of Metasploit Pro by Rapid7
Course Review: SANS FOR408 Computer Forensic Investigations – Windows In-Depth
The Security Consulting Sugar High
Tutorial: Fun with SMB on the Command Line
Interview: Ilia Kolochenko, CEO of High-Tech Bridge
October 2012 Free Giveaway Winner of LearningGate Training
The Broken: Assessing Corporate Security in 2012 to Make a Better 2013
EH-Net Login
Welcome Guest.
Username:
Password:
Remember me
Lost Password?
No account yet?
Register
Who's Online
We have 46 guests and 2 members online
Free Business and Tech Magazines and eBooks
You are here:
Home
Ethical Hacking Discussions and Related Certifications
Network Pen Testing
Bypassing Firewalls with simple scans
EH-Net
May 20, 2013, 03:46:03 PM
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News
: Go back to The Ethical Hacker Network Online Magazine
Home Page
Home
Help
Calendar
Login
Register
EH-Net
>
Ethical Hacking Discussions and Related Certifications
>
Network Pen Testing
(Moderator:
don
) >
Bypassing Firewalls with simple scans
Pages: [
1
]
Go Down
« previous
next »
Print
Author
Topic: Bypassing Firewalls with simple scans (Read 7776 times)
0 Members and 1 Guest are viewing this topic.
Kev
Guest
Bypassing Firewalls with simple scans
«
on:
June 27, 2007, 03:08:25 PM »
What is one of the first things to do in a ethical hack? Ec-council suggests information gathering. While that is very true, that is becoming less requested. Usually you are given your target information from the get go. Seems like more and more organizations want you to get right to it and dont want to spend money on what they perceive as "extras". A good place to start is to inspect the firewall rules of your target. There are some simple tests to do right at the start. These tests are old school and work mostly if its an improperly configured iptables firewall.
Depending on the test enviroment, we are not going to be too worried about being stealth, so we will begin with the traditional traceroute or tracert command to the target. Simply "traceroute victims ip." This in return should give you a return of astericks. This usually is a sign that the firewall is preventing packets from leaving the target. This is normal because most firewalls filter diagnostic ICMP packets.
We attempt to "fool" the firewall by using TCP packets and Hping2 is great for that. We enter "hping2 -T -t 1 -S -p 80 victims IP" With a little luck we get a response.
The next scans we perform are with nmap. For a fast scan we use nmap -sS -F -n -O victimsIP. We might try just a simple test of the firewall rules with "nmap -v -sA -ff -r -n victimsIP" If we have the time and this can sometimes take an hour or so but is very complete, we use nmap -v -g53 -sS -sR -P0 -O -p1-65000 -o nmap.out victimsIP. I like the -g switch, which lets you set the source port. You can test for misconfigured rules that allow packets based on source ports, such as ftp data (port 20), dns lookups (port 53) or return http traffic (port 80). This is an important scan because one mistake many administrators make when creating rules for allowing traffic through their firewall is to trust traffic based simply on its source port number, such as DNS replies from port 53 or FTP from port 20. Other switches I like are -sA and -PO for firewall scanning. If you are trying to avoid IDS logging, use the default -rH, which is a randomized port order. This, combined with slow timing options, will make network monitoring hard to detect the scan. As an example we might try, nmap -sS --scan-delay 500 -f -rH victimsIP.
We might even be able to slip through if the organization has devices connecting to the internet. This scan will test for devices like routers, printers,switches,etc.. map -vv -sS -O -n victimsIP/24 -oA inventory. With a little luck you might get an inventory of devices.
Ok now that we have managed to discover active ports we might be able to breach the server with a simple tool like Fpipe with fpipe -l 53 -s 53 -r 80 victimsIP. Its rare to work but when it does its sweet because it can be shocking to an organization when they have just implemented their new shiny firewall that was never configured to be breached by a couple of free tools.
The idea of these scans is to test for misconfigured firewalls. If the rules are in place correctly we wont get results. Auditing the firewall is a very crucial and good first place to start your ethical hacking session.
«
Last Edit: June 27, 2007, 03:15:17 PM by Kev
»
Logged
BiotiC
Newbie
Offline
Posts: 15
Re: Bypassing Firewalls with simple scans
«
Reply #1 on:
June 27, 2007, 04:06:45 PM »
Great post Kev - succinct and to the point. Food for thought.
One for my little black book.
Thanks
Logged
nebu10uz
Sr. Member
Offline
Posts: 368
Re: Bypassing Firewalls with simple scans
«
Reply #2 on:
June 27, 2007, 05:47:16 PM »
Awesome tutorial, thanks Kev. This scans will work for misconfigured packet filter firewalls. To mitigate this problem use a well configured stateful or proxy firewall. Because stateful firewalls keep track of the state of network connections, using these simple scans will usually not work.
Logged
Security+, OSCP, CEH
jimbob
Guest
Re: Bypassing Firewalls with simple scans
«
Reply #3 on:
June 28, 2007, 03:09:20 AM »
Good stuff Kev. Even some well configured firewalls will often send TTL expired messages in response to a good TCP traceroute. hping is one of the tools that seems to get the least hype and does a whole host of tricks. Perhaps the prerequisite knowledge needed to use it well is a barrier to its use.... I feel a cheat sheet idea coming on :-)
Jim
Logged
Negrita
Sr. Member
Offline
Posts: 299
Re: Bypassing Firewalls with simple scans
«
Reply #4 on:
June 28, 2007, 05:02:42 AM »
Nice tutorial. Kudos to Kev (and also to Fyodor and Antirez).
Logged
CEH, CCSA NG/AI, NNCSS, MCP, MCSA 2003
There are 10 kinds of people, those that understand binary, and those that don't.
LSOChris
Guest
Re: Bypassing Firewalls with simple scans
«
Reply #5 on:
June 28, 2007, 09:18:25 AM »
great post. working hard for that ticket to blackhat :-)
good part on the source port scanning, might be a good idea to script that to shove in commonly allowed ports besides the 3 your mentioned to let that run and come back later and check the results
Logged
Pages: [
1
]
Go Up
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
EH-Net
-----------------------------
=> Calendar Of Events
===> ChicagoCon 2007
===> ChicagoCon 2008s
===> ChicagoCon 2008f
===> ChicagoCon 2009s
=> Ethical Hacktivism
=> News Items and General Discussion About EH-Net
===> Greetings
=> Special Events
-----------------------------
Ethical Hacking Discussions and Related Certifications
-----------------------------
=> General Certification
===> Networking
===> OS
===> Security
=> Compliance, Regulations & Standards
=> Control Systems
=> Cyber Warfare
=> Forensics
===> CCE / MCCE - (Master) Certified Computer Examiner
===> CHFI - Computer Hacking Forensic Investigator
===> EnCE - EnCase® Certified Examiner
===> GCFA - GIAC Certified Forensics Analyst
=> Hardware
=> Incident Response
===> CSIH - Computer Security Incident Handler
===> GCIH - GIAC Certified Incident Handler
=> Malware
===> Advisories
=> Mobile
=> Network Pen Testing
===> CEH - Certified Ethical Hacker
===> CPTC - Certified Penetration Testing Consultant
===> CPTE - Certified Penetration Testing Engineer
===> CSTA - Certified Security Testing Associate
===> eCPPT - eLearnSecurity Certified Professional Penetration Tester
===> ECSA - EC-Council Certified Security Analyst
===> GPEN - GIAC Certified Penetration Tester
===> OSCP - Offensive Security Certified Professional
=> Physical Security
=> Programming
=> Social Engineering
=> Web Applications
=> Wireless
===> CWNP Certs
===> GAWN - GIAC Assessing Wireless Networks
===> OSWP - Offensive Security Wireless Professional
=> Other
-----------------------------
Columns
-----------------------------
=> Editor-In-Chief
=> Andress
=> Gates
=> Haddix
=> Hadnagy
=> Heffner
=> Hoffman
=> Linn
=> RichM
=> Murray
=> J. Peltier
=> Weidman
=> Wilson
-----------------------------
Features
-----------------------------
=> /root
=> Book Reviews
=> Opinions
=> Skillz
===> Examples
===> May 06 - Star Hacks, Episode V: The Empire Hacks Back
===> July 06 - Hack Bill!
===> Sept 06 - Netcat in the Hat
===> Nov 06 - Hitch-Hackers Guide to the Galaxy
===> Dec 06 - A Christmas (Hacking) Story
===> Feb 07 - Charlottes Web Site
===> April 07 - Microsoft Office Space
===> June 07 - Serenity Hack
===> Oct 07 - Worst. Ethical. Hacker. Challenge. Ever.
===> Dec 07 - Frosty the Snow Crash
===> March 2008 - It Happened One Friday
===> Oct 2008 - Scooby Doo and the Crypto Caper
===> Dec 08 - Santa Claus Is Hacking to Town
===> Feb 2009 - Brady Bunch Boondoggle
===> July 2009 - Prison Break
===> October 2009 - SSHliders
===> December 2009 - Miracle on Thirty-Hack Street
===> December 2010 - The Nightmare Before Charlie Browns Christmas
-----------------------------
Resources
-----------------------------
=> Career Central
===> Looking For Work
===> Looking To Hire
=> Links to cool sites.
=> Mass Media
=> News from the Outside World
=> Tools
=> Tutorials
===> Tutorial Requests
Loading...
Exclusive Deal
SANSFIRE 2013
June 15 - 22
5% Off
w/ Code
:
EHN_5
SANS Deals 4 EH-Netters
5% OFF
Any
SANS Course
in Any Format!
Coupon Code:
EHN_5
Including
SANS Rocky Mountain 2013
&
SANS Boston 2013
Polls
Compared to this year, 2013 will be:
Great!
Better.
About the same.
Little worse.
FUBAR!
Recent Forum Topics
Programming
: Finished Python Course in Codecademy now what?
(11) by
securitian
OSCP - Offensive Security Certified Professional
: Failed my first attempt at the OSCP exam
(91) by
r0ckm4n
Tools
: Social-Engineer Toolkit (SET) Version 5.0 “The Wild West” Released
(2) by
m0wgli
Malware
: EICAR?
(3) by
UKSecurityGuy
Advisories
: HTB23154: Multiple Vulnerabilities in Exponent CMS
(0) by
AndyP
Advisories
: HTB23153: Multiple Vulnerabilities in Jojo CMS
(0) by
AndyP
Advisories
: HTB23151: Cross-Site Request Forgery (CSRF) in UMI.CMS
(0) by
AndyP
Tutorials
: Need guidance
(8) by
r0ckm4n
OSCP - Offensive Security Certified Professional
: Class Scheduled 6/8 - Linux n00b
(7) by
Taemyks
OSCP - Offensive Security Certified Professional
: OSCP exam scheduled
(6) by
gbhat
Incident Response
: LinkedIn Forensics
(0) by
AFENTIS_Forensics
General Certification
: Red Team/Blue Team
(1) by
ajohnson
Career Central
: Starter cert?
(3) by
Grendel
Network Pen Testing
: Beginner Ethical Hacker
(1) by
m0wgli
General Certification
: CPT Practical Submission
(0) by
z28power4u
Web Applications
: Nessus and Nikto
(4) by
Seen
Network Pen Testing
: Cracking salted MD5 hash
(4) by
n37sh@rk
CEH - Certified Ethical Hacker
: Passed my C|EH
(3) by
n37sh@rk
Mass Media
: EC-council hacked, irony at his best?
(0) by
j0rDy
Web Applications
: SQL Injection into an INSERT statement.
(6) by
eyenit0
Network Pen Testing
: Solution for sipXtapi INVITE Message CSeq Field Header Remote Overflow
(1) by
m0wgli
Web Applications
: dns
(2) by
H1t M0nk3y
Other
: BSides Boston
(0) by
3xban
Career Central
: InfoSec in Central, FL
(2) by
tturner
Web Applications
: Web vulnerability scanner
(4) by
H1t M0nk3y
EH-Net News Feeds
Latest Additions
Privacy Notice
for TDCC & All Properties
Free Business and Tech Magazines and eBooks
© 2013 The Ethical Hacker Network
Joomla!
is Free Software released under the GNU/GPL License.