When we first gain access to a Linux box there is a good chance that we have gotten a low level account. The next step is usually to escalate our privileges (give us access to more than we have now) up so we can view things like the shadow file. Or maybe there are certain tool we want to run to attack another system and need to be root to run these tools.

I wanted to give some idea of commands we can run to get information that may help us to escalate our privileges and then give really basic example to show what I mean.

Who are you?Linux Command: id

Where are you?pwd

What version of Linux is running?uname -a

What can you do?sudo -l

Find all files and directories that are owned by youfind / -user `whoami` -ls 2> /dev/null

Cyber.spirit wrote:thank u jamie r like always good article i knew some of these technics but i have a question. I hack the ftp admin account then how can i esculate my priv? Its a linux server

Read the above article and the links it points to. Privilege escalation isn't an exact science. It depends a lot on what's on the server and what you have access to. The only way to get anywhere is to enumerate, test, fail, try again.

Cyber.spirit wrote:thank u jamie r like always good article i knew some of these technics but i have a question. I hack the ftp admin account then how can i esculate my priv? Its a linux server

Read the above article and the links it points to. Privilege escalation isn't an exact science. It depends a lot on what's on the server and what you have access to. The only way to get anywhere is to enumerate, test, fail, try again.

sternone wrote:

Cyber.spirit wrote:I hack the ftp admin account then how can i esculate my priv? Its a linux server

If you hacked the ftp admin account you are already escalated.

Jamie.R wrote:shadowzero excatly this why I tired to keep this simple with small example as if you never done any priv before its like where do you start.

sternone That is ture but most people with commom sense would make it so you can never login via ftp or ssh as root. You will login as a normal user then esculate your priv using sudo.

i just can log on to the ftp service. not to the machine remotely the ftp account is valid only for this service if could log on remotely escalating privilege was so easy

Cyber.spirit wrote:for that service of-course but i want to get os level access any idea??

We don't know anything about the server you're accessing and you haven't given us any information about it other than you've got an ftp account.

Can you write files anywhere? Can you login as the same user using a different service? Are there other services running? Are there files you can download? Have you done enough enumeration and research?

Just because you've got access to one service, doesn't mean you can escalate it to a privileged user. It could be a dead end.

Cyber.spirit wrote:for that service of-course but i want to get os level access any idea??

We don't know anything about the server you're accessing and you haven't given us any information about it other than you've got an ftp account.

Can you write files anywhere? Can you login as the same user using a different service? Are there other services running? Are there files you can download? Have you done enough enumeration and research?

Just because you've got access to one service, doesn't mean you can escalate it to a privileged user. It could be a dead end.

Shadowzero, i ran a brute force attack against admin account and i hacked it. So i can read, write, del files but i cant logon using that account to other services as i mentioned the server is Linux

Last edited by cyber.spirit on Sun Sep 02, 2012 9:52 am, edited 1 time in total.