• Home
  • News
  • Software
  • Knowledge
  • MMO
  • Tips
  • Security
  • Network
  • Office
AnonyViet - English Version
  • Home
  • News
  • Software
  • Knowledge
  • MMO
  • Tips
  • Security
  • Network
  • Office
No Result
View All Result
  • Home
  • News
  • Software
  • Knowledge
  • MMO
  • Tips
  • Security
  • Network
  • Office
No Result
View All Result
AnonyViet - English Version
No Result
View All Result

How to Escalate Linux Privileges Using SUID

AnonyViet by AnonyViet
January 25, 2023
in Network
0

This article will explain what privilege escalation is and how we can upgrade our privileges using the SUID permissions file. You can use this knowledge to solve Christmas Advent of Cyber ​​challenge number 8.

Join the channel Telegram of the AnonyViet 👉 Link 👈

How to Escalate Linux Privileges Using SUID

What is privilege escalation?

Computer systems are designed to be used by many users, and privileges mean what users are allowed to do. Common privileges include viewing and editing files or modifying system files.

Privilege escalation is the act of exploiting a bug, design or configuration flaw in an operating system or software application to gain higher access to normally protected resources from an application or user. .

What is SUID?

SUID is a special type of file permission granted to a file. When a user runs a program, if they have the correct read/execute permissions, that program will run using their account privileges. SUID allows a user to run a program using the privileges of another user. To learn more about file perks, complete challenge 4 in the Christmas room or read the supporting material here.

In some cases, we can take advantage of running the file as another user, to execute mining commands. You might be thinking, why allow anyone to run the file as another user, right? However, we need to have certain binaries run as root by an unprivileged user.

For example, if we change our password on Linux, the program that does this needs permission to change the file system. You may not have write permission to the /etc/ directory, but root does. This is why the password binary has the SUID bit.

If a binary file has a SUID bit then it will have permissions S. If we check the permissions for the password binary, we can see the permissions -rwsr-xr-x.

How to Escalate Linux Privileges Using SUID 4

The SUID bit is set on execute permission, which means that when a user runs this file, it will run as the file owner (as root).

In essence, SUID files execute with the permission of the file owner.

Make use of SUID files

Some administrators will manually set the SUID bit to allow certain programs to be run. Let’s say you are a system administrator and an unprivileged user wants to programmatically require the file to run with higher privileges. They can set the SUID bit, then unprivileged users can execute the program without any additional account permissions.

We can scan the entire file system to find all files with the SUID bit, with the following command:

find / -user root -perm -4000 -exec ls -ldb {} \;

How to Escalate Linux Privileges Using SUID 5

We can see some binaries running as root, which are legitimate programs with the right permissions set up to do the right task.

If a sysadmin has manually set the SUID bit on a binary file, the above command will find those files. You can take advantage of this command to elevate your privileges or run commands you wouldn’t normally be able to do.

Tips for the SUID challenge

A regular standard Linux binary (such as the find command), which can change the file owner and the SUID bit.

For example, if we want to know what user is running the find command, we can do the following:

touch foo
find foo -exec whoami \;

This command will find the file foo (which we just created), then run the command with the -exec parameter.

If you find a file that looks suspicious? Try running it and see what you can do with it? Run the whoami command to see if the file is actually running as root.

If you are given the option to run the command as another user. Why not run /bin/bash to run bash (for the shell) as another user?

Also, you can check out Shodan.io readings on TryHackMe here.

The article achieved: 5/5 – (100 votes)

Tags: EscalateLinuxPrivilegesSUID
Previous Post

Lesson 151: How to use the Text function in Excel

Next Post

5 extremely evil computer jokes

AnonyViet

AnonyViet

Related Posts

Save image as Type contains malicious code: Remove immediately before losing money unfairly!
Network

Save image as Type contains malicious code: Remove immediately before losing money unfairly!

March 19, 2026
Instructions on how to register a .co.uk domain name for free for 1 year
Network

Instructions on how to register a .co.uk domain name for free for 1 year

March 12, 2026
How to Setup Paperclip AI: Create a Company for AI Agent
Network

How to Setup Paperclip AI: Create a Company for AI Agent

March 12, 2026
Compilation of free and cheap APIs to run OpenClaw stably
Network

Compilation of free and cheap APIs to run OpenClaw stably

March 10, 2026
3 Services to Determine IP Location for Website (IP Geolocation API)
Network

3 Services to Determine IP Location for Website (IP Geolocation API)

March 10, 2026
How to buy a .STORE domain name for 1 USD (2026): Detailed instructions from A–Z
Network

How to buy a .STORE domain name for 1 USD (2026): Detailed instructions from A–Z

March 3, 2026
Next Post
5 extremely evil computer jokes

5 extremely evil computer jokes

0 0 votes
Article Rating
Subscribe
Login
Notify of
guest

guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments

Recent News

How to add Watermark to Google Docs to protect copyright

How to add Watermark to Google Docs to protect copyright

April 19, 2026
How to intercept traffic using Burp Suite to analyze HTTP/HTTPS

How to intercept traffic using Burp Suite to analyze HTTP/HTTPS

April 18, 2026
How to avoid Adblock detection on Youtube with 4 good tips

How to avoid Adblock detection on Youtube with 4 good tips

April 17, 2026
How to transfer ChatGPT data to Claude is extremely simple

How to transfer ChatGPT data to Claude is extremely simple

April 16, 2026
How to add Watermark to Google Docs to protect copyright

How to add Watermark to Google Docs to protect copyright

April 19, 2026
How to intercept traffic using Burp Suite to analyze HTTP/HTTPS

How to intercept traffic using Burp Suite to analyze HTTP/HTTPS

April 18, 2026
How to avoid Adblock detection on Youtube with 4 good tips

How to avoid Adblock detection on Youtube with 4 good tips

April 17, 2026
AnonyViet - English Version

AnonyViet

AnonyViet is a website share knowledge that you have never learned in school!

We are ready to welcome your comments, as well as your articles sent to AnonyViet.

Follow Us

Contact:

Email: anonyviet.com[@]gmail.com

Main Website: https://anonyviet.com

Recent News

How to add Watermark to Google Docs to protect copyright

How to add Watermark to Google Docs to protect copyright

April 19, 2026
How to intercept traffic using Burp Suite to analyze HTTP/HTTPS

How to intercept traffic using Burp Suite to analyze HTTP/HTTPS

April 18, 2026
No Result
View All Result
  • Home
  • News
  • Software
  • Knowledge
  • MMO
  • Tips
  • Security
  • Network
  • Office

wpDiscuz
0
0
Would love your thoughts, please comment.x
()
x
| Reply