Image
 
linkedin_logo.png rss_logo.jpg
twitter_logo.png youtube_logo.jpg
Latest Additions
 
EH-Net Login
Welcome Guest.






Lost Password?
No account yet? Register
Who's Online
We have 121 guests and 2 members online
EH-Net News Feeds
Latest Additions
 
Advertisement

You are here: Home arrow Forum arrow Ethical Hacking Discussions and Related Certificationsarrow Network Pen Testingarrow how to use nmap or nc to find one true port amongst many false ports?
EH-Net
May 26, 2012, 04:09:35 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Advertise on EH-Net!! - Reasonable Rates, Highly Targeted Audience.
 
   Home   Help Calendar Login Register  
Pages: [1]   Go Down
  Print  
Author Topic: how to use nmap or nc to find one true port amongst many false ports?  (Read 1898 times)
0 Members and 1 Guest are viewing this topic.
BASHful
Newbie
*
Offline Offline

Posts: 4


View Profile
« on: January 27, 2011, 08:23:01 PM »

Hello. I am trying some things for security on my network and am trying to find out the correct way in which to use nmap or nc to locate one real port that is listening amongst a range of false ports. Right now I can scan my system with nmap and I have used nemesis and some scripts to make it look like I have several open ports when only one of them is truly accepting connections.

To clarify what I'm doing: say I do an nmap of my system, 'nmap -T polite -p 11500-12000 192.168.1.53' it shows a bunch of ports as open even though they are just strings as I have dropped all original port scan packets and replaced them with injected packets using nemesis... only one of the ports listed is really open.

Now I want to play the attacker and try to locate the real port using nmap or netcat. However, every command I have tried does not give me the answer. Is there a way to do this?

I've tried this command which I thought might locate it but it doenst seem to work:
Code:
nc -v -t 192.168.1.53 11500-12000

I used -t because in this case the real port is a telnet port. Shouldn't -t be used with netcat when scanning for telnet negotiations?
 
Any help is appreciated.
Logged
Andrew Waite
Hero Member
*****
Offline Offline

Posts: 857



View Profile WWW
« Reply #1 on: January 28, 2011, 01:40:12 AM »

Welcome to the forum.

I'd guess it depends how intelligently Nemesis is mimicking then true open port.

For example, if it's just throwing a syn-ack packet in response to a syn then you should be able to just look for one port that doesn't behave like the rest, that will be the real service. With nmap I'd suggest trying the version detection flag (-sV) and look for different output.

Similarly you could easily script nc to connect to each open port, pass some arbitrary input, and look for differences in response. Again I'd expect all of the Nemesis ports to respond in the same manner, with the real port being unique.

Depending on how convincing the Nemesis responses are, you may need to craft some complex data/input before you identify a difference, but you will get there. If not, and Nemesis is responding exactly like the real service, then you've just opened the same service on multiple ports Wink

Hope this helps, let me know how you get on, would be interested to confirm how well the above works in practice....
Logged

Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines
Joomla Bridge by JoomlaHacks.com
Valid XHTML 1.0! Valid CSS!
Page created in 0.198 seconds with 22 queries.
 

gk_static-ad_feb2012.jpg
Global Knowledge: Build Security Skills to Protect & Defend

els_130x200fixed2.gif
eLearnSecurity Student Course Now Live!
5% Off with Code
ELS-EH-5

SANS Deals 4 EH-Netters
$150 OFF Any SANS Course in Any Format!
Coupon Code: EHN_Connect Including SANS Security West 2012 & SANSFIRE 2012
Recent Forum Topics

cbtnuggets_logo_125.jpg
Try CBT Nuggets Free!

Vote For EH-Net

Add to Technorati Favorites
technorati fave

 
         
Advertisement

© 2012 The Ethical Hacker Network
Joomla! is Free Software released under the GNU/GPL License.