[lug] What's my IP?

Matthew Snelham infinite at sigalrm.com
Tue Jan 25 17:15:19 MST 2005


On 25 Jan 2005 05:00 PM or thereabouts, Richard H. Fifarek wrote:
> On Tue, 25 Jan 2005, Jeff Schroeder wrote:
> 
> > Assume this is a "basic" installation and doesn't include fancy network
> > analysis tools like nmap, ettercap, or ethereal.
> 
> 	If you can, make an outgoing connection (like ssh) to a machine,
> and then run 'netstat -an'.  You're IP should be listed in the output.

And if you suspect all of your net tools including netstat, have been
compromised, you can go to the source: 

cat /proc/net/tcp

As long as you don't mind converting hex, that is.  Same info, and most
rootkits and trojans don't bother to fix it.  (So, not 100% accurate, but
might catch a kiddie.)  Oh, and the hex is in network byte order... so for
example, 10.1.50.159 == 9F32010A. 

--Matthew
infinite at sigalrm.com

--
   "I've been talking to dead rabbits and feeding bloody walls. 
    I've done horrifying things with salad tongs. 
    It's really eaten into my social life."
      - Jhonen Vasquez



More information about the LUG mailing list