Banner Grab
Banner Grab
Banner Grab
netcat(Banner Grabbing)
1) Perform an experiment to grab a banner with telnet and perform the task using
Netcat
Netcat be used to create simple TCP or UDP connection to system to see whether the port and
service available. So, for instance, if we wanted to connect to the SSH on remote system, we can
type;
Banner Grabbing
We can also use netcat to “grab” the banner on web servers by connecting to port 80 and then
sendinga HEAD / HTTP/1.0 or HEAD / HTTP/1.1 request depending upon the protocol which
they’re using.
Command: nc 192.168.179.146 80
1
HEAD / HTTP/1.0
Make certain to hit “Enter” a couple times after typing the HEAD request to pull the banner . As
you can see, we grabbed the banner of Apache 2.4.25 web server running on Debian. Through this
method,you can even find the open HTTP methods against the target like CONNECT , DELETE,
DEBUG,OPTIONS, PUT etc.
To do a banner grab,
type nc 10.73.31.1 81. This opens Netcat, to our router’s IP address, on port 81. Then
type: HTTP/1.1 200 . Since our server is running Apache, it won’t respond to anything until we give
it a specific request.
nc 10.73.31.1 222 (a different port, but same internal IP). Or Google! ncat google.com 80. GET /
HTTP/1.1.
Why would this be useful? What could I use this for as a systems admin? Here is a simple example:
We have several products running in our office using SSH, but I don’t know which ones have been
updated. I know we have an SSH server running on 10.73.31.1 222, and a WiFi Pineapple running
on port 22.
I can type nc 10.73.31.1 222, and the same for the Pineapple on port 22. If I look at these versions,
I need to update the first one. That’s one quick and easy way to do some homework.