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 27 guests online
You are here:
Home
Ethical Hacking Discussions and Related Certifications
Network Pen Testing
Banner grabbing with netcat
EH-Net
May 23, 2013, 09:28:23 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
) >
Banner grabbing with netcat
Pages: [
1
]
Go Down
« previous
next »
Print
Author
Topic: Banner grabbing with netcat (Read 12808 times)
0 Members and 1 Guest are viewing this topic.
H1t M0nk3y
Hero Member
Offline
Posts: 865
Banner grabbing with netcat
«
on:
August 16, 2010, 08:55:20 AM »
Hey,
I am currently using netcat (but it could be telnet, sbd, etc) to do some banner grabbing. So far, I only find example for HTTP and FTP servers... But what about other services? I poked around and found some more ways of getting information with netcat:
HTTP
Code:
nc -v 192.168.1.10 80
HEAD / HTTP/1.0
[ENTER]
[ENTER]
- or -
GET HTTP
FTP
Code:
nc -v 192.168.1.59 21
SSH
Code:
nc -v 192.168.1.59 22
MS-SQLServer
Code:
nc -v 192.168.1.59 1433
MySQL
Code:
nc -v 192.168.1.59 3306
And etc!
So my questions really is: Yes, you can use netcat to connect to every single port and get the banner of well known services. But what about other TCP ports with no obvious response without the proper prompt (like a web server)? We need to provide the service with some precise query parameters. So do you guys know about other data that could be send to a TCP port that doesn't an obvious reply?
I hope you guys understand my question...
Logged
OSCP, GPEN, GWAPT, GSEC, CEH, CISSP
Synquell
Full Member
Offline
Posts: 169
Re: Banner grabbing with netcat
«
Reply #1 on:
August 16, 2010, 09:37:33 AM »
Sort of, I think
The banner grabbing for versioning can, as you know, be done with an Nmap version scan.
A more 'manual' approach, but still fast enough, might be to use an Nmap script, like:
http://nmap.org/nsedoc/scripts/banner.html
http://pauldotcom.com/2008/12/banner-grabbing-with-nmap-relo.html
I suppose you can adapt the script to fuzz everything you can think off towards the ports in question, and see what comes back.
This is all just an educated guess though, don't have a lot of experience with all that personally
Logged
Twitter:
https://twitter.com/dietervds
Blog:
https://synquell.wordpress.com
(not much there yet)
The beginning of knowledge is the discovery of something we do not understand.
ajohnson
Recruiters
Hero Member
Offline
Posts: 1057
aka dynamik
Re: Banner grabbing with netcat
«
Reply #2 on:
August 16, 2010, 11:53:07 AM »
Don't forget SMTP, IMAP, and POP with netcat. You can also use Nmap's ncat with the --ssl option to connect to ssl-based services (or use sslproxy with one of the netcat variants that don't support ssl).
Your best bet would be to perform a packet capture while establishing an legitimate connection to see what information is normally transmitted and then adjust that as necessary.
You could then use a packet crafting utilities, such as HPing, Scapy, PackEth, etc. (or hexedit and file2cable if you are feeling particularly l33t) to generate your custom packets.
Disclaimer: I don't have much hands-on experience with this, but I think that looks right in theory
Logged
WIP: GCFA |
www.infosiege.net
| @infosiege
The day you stop learning is the day you start becoming obsolete.
sachitre
Newbie
Offline
Posts: 22
Re: Banner grabbing with netcat
«
Reply #3 on:
August 17, 2010, 05:15:47 AM »
Hi,
You can use the triggers in the AMAP tool that can be found in the file appdefs.trig (I cant remember exactly but I think thats the one). Are you using netcat manually to rule out false positives?
cheers
Logged
CISSP, GPEN, CCNA
H1t M0nk3y
Hero Member
Offline
Posts: 865
Re: Banner grabbing with netcat
«
Reply #4 on:
August 17, 2010, 05:32:01 AM »
Thanks for the hints. I heard about AMAP but I never used it. Last release is January 2006, so is it too old to detect recent services?!?
My goal wasn't so much about ruling out false positive. I was more looking at an easy way to look at one or to ports on a machine. My question really was "what to do" when you see a strange port open. The answer seems to be:
1) Start a network sniffer
2) Connect to the service with telnet/netcat and see what happen
3) Launch some tools like nmap scripts or AMAP
There is not much else we can do.
Logged
OSCP, GPEN, GWAPT, GSEC, CEH, CISSP
Synquell
Full Member
Offline
Posts: 169
Re: Banner grabbing with netcat
«
Reply #5 on:
August 17, 2010, 08:10:31 AM »
Idd, I don't think there is.
Basicly poke at it with whatever you can and see what happens!
Logged
Twitter:
https://twitter.com/dietervds
Blog:
https://synquell.wordpress.com
(not much there yet)
The beginning of knowledge is the discovery of something we do not understand.
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
GCIH - GIAC Certified Incident Handler
: Passed my GCIH
(6) by
azmatt
Greetings
: Hi from the UK
(4) by
MrTuxracer
GCIH - GIAC Certified Incident Handler
: GCIH Free Practice test attempt
(0) by
prats84
News Items and General Discussion About EH-Net
: Change is Coming to EH-Net!!
(27) by
don
Network Pen Testing
: AIX Vulnerability Assessments
(2) by
ras76
Tutorials
: Need guidance
(9) by
hanyhasan
EH-Net News Feeds
Latest Additions
Privacy Notice
for TDCC & All Properties
© 2013 The Ethical Hacker Network
Joomla!
is Free Software released under the GNU/GPL License.