当前位置:网站首页>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 !
边栏推荐
- NPM: the 'NPM' item cannot be recognized as the name of a cmdlet, function, script file, or runnable program. Please check the spelling of the name. If the path is included, make sure the path is corr
- 可分离债券与可转债
- Mongodb replication set [master-slave replication]
- Learning notes of C programming [compiled by Mr. Tan Haoqiang] (Chapter III sequence programming) 04 C sentence
- Numpy warning visibledeprecationwarning: creating an ndarray from ragged needed sequences
- Limit of one question per day
- Ffmpeg recording screen and screenshot
- Table structure of Navicat export database
- VS克隆时显示403错误
- Pat class B "1104 forever" DFS optimization idea
猜你喜欢
TCP/IP模型中的重磅嘉宾TCP--尚文网络奎哥
IPv6过渡技术-6to4手工隧道配置实验--尚文网络奎哥
Introduction to mongodb
On the adjacency matrix and adjacency table of graph storage
numpy之 警告VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences
Limit of one question per day
Tidal characteristics of the Bohai Sea and the Yellow Sea
docker安装及启动mysql服务
Numpy warning visibledeprecationwarning: creating an ndarray from ragged needed sequences
QQ小程序开发之 一些前期准备:预约开发账号、下载安装开发者工具、创建qq小程序
随机推荐
Stepping on pits and solutions when using inputfilter to limit EditText
[combinatorics] number of solutions of indefinite equations (number of combinations of multiple sets R | number of non negative integer solutions of indefinite equations | number of integer solutions
[combinatorics] brief introduction to generating function (definition of generating function | Newton binomial coefficient | commonly used generating function | correlation with constant | correlation
动态规划:最长回文子串和子序列
Convert binary stream to byte array
900w+ data, from 17s to 300ms, how to operate
[combinatorics] basic counting principle (addition principle | multiplication principle)
[leetcode question brushing day 34] 540 Unique element in array, 384 Disrupt array, 202 Happy number, 149 Maximum number of points on a line
Ansible introduction [unfinished (semi-finished products)]
NPM: the 'NPM' item cannot be recognized as the name of a cmdlet, function, script file, or runnable program. Please check the spelling of the name. If the path is included, make sure the path is corr
Hi3536C V100R001C02SPC040 交叉编译器安装
The calculation of stripe, kernel and padding in CNN
Bigvision code
[mathematical logic] predicate logic (individual word | individual domain | predicate | full name quantifier | existence quantifier | predicate formula | exercise)
Limit of one question per day
Elsevier latex submitted the article pdftex def Error: File `thumbnails/cas-email. jpeg‘ not found: using draf
使用InputFilter限制EditText时踩坑及解决方案
navicat 导出数据库的表结构
For instruction, uploading pictures and display effect optimization of simple wechat applet development
FileZilla Client下載安裝