当前位置:网站首页>Without sxid, suid & sgid will be in danger- Shangwen network xUP Nange
Without sxid, suid & sgid will be in danger- Shangwen network xUP Nange
2022-07-03 03:37:00 【Shangwen network】
Into the Q Group 11372462 Receive exclusive registration benefits !
# Said in the previous
as everyone knows ,Linux Except under the system r 、w 、x Beyond these basic permissions , also suid 、 sgid as well as sticky This is commonly known as the existence of the three brothers of special authority ; What are the functions of these three special permissions , The following is true suid 、 sgid as well as sticky Explain the role of :
- SUID jurisdiction :
It can only be applied to executable files , When the user executes the execution file , Will temporarily have the permission of the owner of the execution file .passwd The command enables SUID function , So most users are using passwd When the command changes the password , Will temporarily own passwd Order the owner root User's rights . - SGID jurisdiction :
SGID Attributes can be applied to directories or executables . When SGID When attributes are applied to a directory , The owning group of all files or subdirectories created in this directory will be the owning group of this directory . such as /upwendir The owning group of the directory is upwen, When /upwendir The directory has SGID Attribute , Any owning group of files or subdirectories created by users in this directory will upwen; When SGID When attributes are applied to an executable , Other users will temporarily have the permissions of the executable group when using the executable . - Stikcy jurisdiction :
Sticky Attributes can only be applied to directories , When the directory has Sticky Attribute all the files or subdirectories in this directory. No matter what the permissions are, only the owner of the file or subdirectory and root User can delete .
that , Although the above three permissions are called special permissions , But in fact, it also has security risks and hidden dangers , Next , Let's list bash Command by giving suid The scenario of raising rights with special permission ,Let 's go ! ! !
# once SUID/SGID The case of raising power
We build a new one upnange The average user , And through the bash Give orders to suid(chmod u+s) jurisdiction :
Next , We carry out bash -p Carry out the right raising operation , At this time upnange Users can view it at will /etc/shadow file :
# Use sXid Monitor what's going on SUID/SGID
##sXid Definition
SUID/SGID There may be security risks in the file . To reduce risk , We have been from root Has deleted s position , These programs don't absolutely need this privilege , But future and existing files may enable these without notice s position .
sXid It's a multi in one suid/sgid Monitoring program , It aims at regularly starting from cron function . Basically, it will track your s[ug]id Any changes in files and folders . If there is any new 、 No longer set 、 Or they have changed bits or other modes , Then it will report the changes in an easy to read format via email or command line .sXid The task will be performed automatically to find all on your server SUID/SGID And report them .
##sXid install
Source package installation sXid.
After installation ,sXid The corresponding program installation path is /usr/local/bin/sxid
##sXid To configure
We need to put the configuration file in /usr/local/etc/ Under the table of contents :
You can modify... In the configuration file , hold EMAIL=“root” Change to the required user .
Add the following content to the planning task , In this way, you can check periodically according to the planned task Linux Systematic suid | sgid Changes to :
Conduct manual inspection after configuration 
# Said at the end
This time, , We know through bash Raise the right suid&sgid scene , be based on sXid monitor Linux Systematic uid&sgid, These are what we become Linux The essential basic skills of the great God ;UP Brother Nan, help the little friends come here first , Later, through the feedback used by the big guys , Welcome to join the group 11372462, communication IT Industry development and knowledge , I feel this article is useful , You can also ask for attention CSDN, Focus on UPWEN The public, .UP Nange continues to output the purest IT Industry development and knowledge !
边栏推荐
- Limit of one question per day
- Recursive use and multi-dimensional array object to one-dimensional array object
- Pytorch multi card distributed training distributeddataparallel usage
- [pyg] understand the messagepassing process, GCN demo details
- Bid farewell to artificial mental retardation: Mengzi open source project team received RMB 100 million financing to help NLP develop
- Pat class B "1104 forever" DFS optimization idea
- Limit of one question per day
- Summary of matrix knowledge points in Chapter 2 of Linear Algebra (Jeff's self perception)
- Réglez la hauteur et lancez le système. Currenttimemillis catton
- 为什么线程崩溃不会导致 JVM 崩溃
猜你喜欢

Numpy warning visibledeprecationwarning: creating an ndarray from ragged needed sequences

Limit of one question per day

Positioning (relative positioning, absolute positioning, fixed positioning, Z-index) 2022-2-11
![C programming learning notes [edited by Mr. Tan Haoqiang] (Chapter III sequence programming) 03 operators and expressions](/img/4a/1df03d9f3315debb4c335260ed39f2.jpg)
C programming learning notes [edited by Mr. Tan Haoqiang] (Chapter III sequence programming) 03 operators and expressions

docker安装及启动mysql服务

900w+ data, from 17s to 300ms, how to operate

Hi3536C V100R001C02SPC040 交叉编译器安装

Mongodb installation & Deployment

PHP generates PDF tcpdf

Hutool动态添加定时任务
随机推荐
The difference between static web pages and dynamic web pages & the difference between Web1.0 and Web2.0 & the difference between get and post
Vs 2019 configuration tensorrt
navicat 导出数据库的表结构
node,npm以及yarn下载安装
[combinatorics] brief introduction to generating function (definition of generating function | Newton binomial coefficient | commonly used generating function | correlation with constant | correlation
别再用 System.currentTimeMillis() 统计耗时了,太 Low,StopWatch 好用到爆!
umi 路由拦截(简单粗暴)
用Three.js做一個簡單的3D場景
npm : 无法将“npm”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼写,如果包括路径,请确保路径正确,然后再试一次。
Yolov5 project based on QT
Mongodb replication set [master-slave replication]
Nanning water leakage detection: warmly congratulate Guangxi Zhongshui on winning the first famous brand in Guangxi
LVGL使用心得
Change and access of median value of listening object
递归使用和多维数组对象变一维数组对象
Bigvision code
Elsevier latex submitted the article pdftex def Error: File `thumbnails/cas-email. jpeg‘ not found: using draf
FileZilla Client下载安装
[mathematical logic] predicate logic (individual word | individual domain | predicate | full name quantifier | existence quantifier | predicate formula | exercise)
Web会话管理安全问题