1 | 1 | | #!/bin/bash |
2 | 2 | | |
3 | | - | ###################################80 Columns################################### |
4 | | - | # Linux Privilege Escalation Check Script |
5 | | - | # |
6 | | - | # [Details:] |
7 | | - | ## Originally forked from the linuxprivchecker.py (Mike Czumak), this script |
8 | | - | ## is intended to be executed locally on a Linux box to enumerate basic system |
9 | | - | ## info and search for common privilege escalation vectors such as word |
10 | | - | ## writable files, misconfigurations, clear-text password and applicable |
11 | | - | ## exploits. |
12 | | - | # |
13 | | - | # [Original Author]: Mike Czumak (T_v3rn1x) -- @SecuritySift |
14 | | - | # [Contributors]: |
15 | | - | ## Mike Merrill (linted) -- https://github.com/linted |
16 | | - | ## James Hogan (5aru) -- https://github.com/5aru |
17 | | - | # |
18 | | - | # [Modification, Distribution, and Attribution]: |
19 | | - | ## Permission is herby granted, free of charge, to any person obtaining a copy |
20 | | - | ## of this software and the associated documentation files (the "Software"), |
21 | | - | ## to use, copy, modify, merge, publish, distribute, and/or sublicense copies |
22 | | - | ## of the Software, and to permit persons to whom the Software is furnished to |
23 | | - | ## do so, subject to the following conditions: |
| 3 | + | ############################################################################################################### |
| 4 | + | ## [Title]: linuxprivchecker.sh -- a Linux Privilege Escalation Check Script |
| 5 | + | ## [Author]: Mike Czumak (T_v3rn1x) -- @SecuritySift |
| 6 | + | ## [Contributors]: Mike Merrill (linted) -- https://github.com/linted |
| 7 | + | ## James Hogan (5aru) -- https://github.com/5aru |
| 8 | + | ##------------------------------------------------------------------------------------------------------------- |
| 9 | + | ## [Details]: |
| 10 | + | ## Similar functions to Mike Czumak's linuxprivchecker.py Linux Privilege Escalation Check Script. |
| 11 | + | ## This script is intended to be executed locally on a Linux box to enumerate basic system info and |
| 12 | + | ## search for common privilege escalation vectors such as world writable files, misconfigurations, clear-text |
| 13 | + | ## passwords and applicable exploits. |
| 14 | + | ##------------------------------------------------------------------------------------------------------------- |
| 15 | + | ## [Warning]: |
| 16 | + | ## This script comes as-is with no promise of functionality or accuracy. |
| 17 | + | ##------------------------------------------------------------------------------------------------------------- |
| 18 | + | ## [Modification, Distribution, and Attribution]: |
| 19 | + | ## Permission is herby granted, free of charge, to any person obtaining a copy of this software and the |
| 20 | + | ## associated documentation files (the "Software"), to use, copy, modify, merge, publish, distribute, and/or |
| 21 | + | ## sublicense copies of the Software, and to permit persons to whom the Software is furnished to do so, subject |
| 22 | + | ## to the following conditions: |
24 | 23 | | ## |
25 | 24 | | ## The software must maintain original author attribution and may not be sold |
26 | 25 | | ## or incorporated into any commercial offering. |
27 | 26 | | ## |
28 | | - | ## THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
29 | | - | ## IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
30 | | - | ## FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
31 | | - | ## AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER |
32 | | - | ## LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
33 | | - | ## FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
34 | | - | ## DEALINGS IN THE SOFTWARE. |
35 | | - | ##################################80 Columns#################################### |
| 27 | + | ## THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR ## IMPLIED, INCLUDING BUT NOT |
| 28 | + | ## LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO |
| 29 | + | ## EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY, WHETHER |
| 30 | + | ## IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE |
| 31 | + | ## USE OR OTHER DEALINGS IN THE SOFTWARE. |
| 32 | + | ############################################################################################################### |
36 | 33 | | |
37 | 34 | | ### Useful functions |
38 | 35 | | |
| skipped 218 lines |