LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to find out information about a server? (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-find-out-information-about-a-server-717279/)

jcafaro10 04-06-2009 05:39 PM

How to find out information about a server?
 
If there's an http server on my network and I want to find out information about that server, what version of linux, 32 or 64 bit, etc, is there a command I can use to find that information out?

bsdunix 04-06-2009 05:55 PM

nmap can help.

http://nmap.org/book/man.html

jcafaro10 04-06-2009 06:10 PM

Thanks!

jcafaro10 04-06-2009 06:23 PM

hmm, this is going really slow. I just did what the example had, nmap -A -T4 ipaddress. It gave me a warning about giving up on a port early, than said Connect Scan Timing: 23.69% done, about a half hour remaining.

dandart 04-06-2009 06:47 PM

SSH in and run:

cat /proc/cpuinfo
CPU info

cat /proc/version
Version of Linux, compile time, etc

echo $HOSTTYPE for arch
echo $MACHTYPE for host triplet

Hope this helps.
Cheers!

jcafaro10 04-06-2009 07:24 PM

That would be helpful except I can't ssh into the server b/c I don't have the login info. All I really need is the OS

jcafaro10 04-06-2009 07:40 PM

I can use netcraft and see that it is running linux, but I need to know specifically which linux distribution.

lazlow 04-06-2009 08:30 PM

Why would you need to know the specific distro of a machine that you do not have access rights to?

jcafaro10 04-06-2009 10:14 PM

Our final project in my CS class is to attempt to do a buffer exploit on a fake buggy server that our professor set up. I've been messing around in Red Hat and Ubuntu and have noticed that even though they are both linux, when I make a buffer and try to overwrite the return address by going outside the range of the buffer there is a different amount that I have to go by depending on Red Hat or Ubuntu.

lazlow 04-06-2009 10:20 PM

Have you checked to see if it is not only distro but version specific? Say RHEL3,4,5? Could you not use your exploit to determine which distro (of your choices) it is?

jcafaro10 04-06-2009 11:07 PM

Wouldn't I be putting my cart before the horse? If the server is running red hat version x and I write my exploit on red hat version y, and so it won't work on version x, I won't be able to use it to find out that the server is running red hat version x.

lazlow 04-06-2009 11:39 PM

I guess I meant that as two separate thoughts.

1.Have you checked to see if it is not only distro but version specific? Say RHEL3,4,5?

2.Could you not use your exploit to determine which distro (of your choices) it is?

jcafaro10 04-06-2009 11:45 PM

Are you saying like write versions that work under different distros and just keep trying ones until it works, and then you've found out the distro? I think I'm just not following

lazlow 04-06-2009 11:48 PM

Assuming that you know that each distro and version requires a different buffer exploit, yes.


Although I suspect it is more dependent on the version of the software that the distro is running, rather than the distro itself.


All times are GMT -5. The time now is 11:59 PM.