Opened host ports are usually the most non-physical direct way of forcing entry remotely.
Here you would see several tools and ways how to list out your currently opened ports from your managed linux box.
Let's view our first attempt to list out those opened and used ports.
# netstat -panut | grep LISTEN
We used the linux command grep to filter LISTENing ports only from the resulting output.
or
# netstat -ntl
Take a look of the sample output from issuing the above command :
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 6536/sshd
tcp 0 0 127.0.0.1:53 0.0.0.0:* LISTEN 1819/named
tcp 0 0 127.0.0.1:953 0.0.0.0:* LISTEN 1819/named
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
With reference to the first resulting line, basically explained below:
0.0.0.0:* = basically means that the port is opened from all host's IP address
tcp = would be the protocol used by the daemon service for establishing communication
22 = is the specific port for which the service is currently listening from
sshd = the daemon/application service which is currently listening from that specific port
You can squeezed out more likely the same info when issuing:
# ss -a | grep LISTEN
Let's use a deeper port scanning commands here and use it with our localhost IP address like so:
# nmap -P0 localhost
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Starting Nmap 4.20 ( http://insecure.org ) at 2007-07-17 22:29 WAT
Interesting ports on yourhost.domain.com (127.0.0.1):
Not shown: 1693 closed ports
PORT STATE SERVICE
22/tcp open ssh
53/tcp open domain
778/tcp open unknown
953/tcp open rndc
Nmap finished: 1 IP address (1 host up) scanned in 0.082 seconds
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Linux command nmap is referred to as a handy swiss knife for probing a particular host for possible opened ports, that reminds me of netcat as well, but the blog would not be covering any of that hacking stuff here. :) Going back, check out moer nmap parameters
# man nmap
Try
# nmap -v localhost
So how do you verify further that the port you are referring to is actually open. This is simply done again by one of the most famous tool mostly used with linux and routers
# telnet localhost 22
Telnets you to locahost on port 22 for testing if the actual host's port is really open.
If the port is actually open, you would be dropped inside that port daemon service for further awaiting service commands. Press ctrl+], enter and quit. As you are not inside to do something harmful!
So, basically, you can now list out your opened ports and develop a more likely tools and approach on getting further info with the host and its ports using these linux commands.
Be reminded that most linux commands used have always more and better command line parameters that simply comes with it.
Have a nice day ahead!
Subscription
Categories
- HowTos (612)
- Linux Devices (40)
- Linux Diggs (620)
- Linux News (1541)
- Linux Videos (24)
Recent Posts
Blog Archive
-
▼
2007
(340)
-
▼
July
(107)
- AMSN messenger install howto
- firefox browser - yum update howto
- kopete messenger install howto
- Gaim pidgin messenger install howto
- xmms - multimedia player install howto
- UltraDMA - speedup your harddisk howto
- sabayon - user profile manager howto
- 50 quick linux command tips part 3
- No negotiations with Microsoft in progress
- connect SamSung D820 mobile to linux howto
- yum from ISO image or CD install howto
- missing portmap reinstall howto
- 50 quick linux command tips part 2
- 50 quick linux command tips part 1
- desktop wiki install howto
- NASA tests Linux for spacecraft control
- warzone 2100 strategy 3d game install howto
- motd - message of the day
- more with kernel name version howto
- stop and start networking service howto
- change network proxy preference howto
- alexa firefox toolbar plugin install howto
- reboot / halt system via CLI howto
- gparted partitioning install howto
- google picasa install howto
- pine and pico install howto
- adobe/macromedia flash player test and install howto
- realplayer install howto
- Microsoft's TrueType core fonts install howto
- Why Choose Fedora? (Fedora vs. Ubuntu)
- Microsoft vs Opensource
- the df command
- linux possessed by monsterz
- change display setting howto
- NTP clock synchronization howto
- qtparted partitioning magic install howto
- host name and host aliases explained
- IP aliasing - virtual IP howto
- viruskiller on linux
- change keyboard language setting
- changing ethernet card settings howto
- TIP: WiFi with chillispot and linux
- play tennis the linux way
- sudoku game install howto
- my linux box talked to me
- CD/DVD burning software install howto
- A SYSAD BLOG - LINUX: list out active host connect...
- list out active host connection howto
- more with linux command named history
- GnuPG and enigmail thunderbird add-ons
- PDF file readers install howto
- digikam - KDE photo management install howto
- gnome floppy formatter
- f-spot Gnome photo manager install howto
- VLC media player install howto
- ping IP subnet block howto
- TIP: find and delete files recursively
- list out opened host ports howto
- TIP: linux process priority scheduling management
- TIP: spammer sending email using squid
- remount partition as read only howto
- additional swap file howto
- CrossOver install howto
- system-config-securitylevel-tui and lokkit howto
- format a windows partition from linux hadrdisk
- TIP: monitoring while mounting USB devices
- zero-sized a file without permission / ownership c...
- TIP: auto create mail spool when adding user
- md5sum checksum howto
- IP address to country lookup howto
- gnome mail notification install howto
- add new harddisk to existing linux system
- TIP: block an IP address
- disk space report
- more trace route command alternatives
- changing your hardware / software clock howto
- other interesting ping commands
- send email via CLI howto
- adding static route howto
- send message to all logged in users
- unzip zip untar tar bzip2 bunzip2 gzip gunzip file...
- format of /etc/passwd, /etc/shadow and /etc/group
- remove user's cron jobs howto
- find the user's files howto
- passphraseless + passwordless ssh howto
- passwordless ssh howto
- X11 Forwarding via ssh howto
- skype install howto
- disable IPv6
- lsusb - list all USB devices
- make yum faster
- lspci - list all PCI devices
- kill a process
- beginners CLI guide for static ip address
- the pidof command
- retrieve data from mysql using bash script
- VirtualBox install howto
- call bash script inside php web page
- alternative linux browsers
- last / currently logged in users
-
▼
July
(107)
Tuesday, July 17, 2007
list out opened host ports howto
Subscribe to:
Post Comments (Atom)
ILoveTux - howtos and news | About | Contact | TOS | Policy
0 comments:
Post a Comment