Skip to content

Commit

Permalink
Linux Priv Esc - minor update
Browse files Browse the repository at this point in the history
  • Loading branch information
swisskyrepo committed Mar 18, 2019
1 parent e5090f2 commit e9489f0
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions Methodology and Resources/Linux - Privilege Escalation.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
## Summary
* [Checklist](#checklist)
* [Cron job](#cron-job)
* [Cron jobs](#cron-jobs)
* [SUID](#suid)
* [Find SUID binaries](#find-suid-binaries)
* [Create a SUID binary](#create-a-suid-binary)
Expand Down Expand Up @@ -53,16 +53,16 @@
* Extracts password policies and hash storage method information
* Checks umask value
* Checks if password hashes are stored in /etc/passwd
* Extract full details for default uids such as 0, 1000, 1001 etc
* Extract full details for 'default' uid's such as 0, 1000, 1001 etc
* Attempt to read restricted files i.e. /etc/shadow
* List current users history files (i.e .bash_history, .nano_history etc.)
* Basic SSH checks
* Privileged access:
* Which users have recently used sudo
* Determine if /etc/sudoers is accessible
* Determine if the current user has Sudo access without a password
* Are known good breakout binaries available via Sudo (i.e. nmap, vim etc.)
* Is roots home directory accessible
* Are known 'good' breakout binaries available via Sudo (i.e. nmap, vim etc.)
* Is root's home directory accessible
* List permissions for /home/
* Environmental:
* Display current $PATH
Expand Down Expand Up @@ -94,7 +94,7 @@
* Locate all SUID/GUID files
* Locate all world-writable SUID/GUID files
* Locate all SUID/GUID files owned by root
* Locate interesting SUID/GUID files (i.e. nmap, vim etc)
* Locate 'interesting' SUID/GUID files (i.e. nmap, vim etc)
* Locate files with POSIX capabilities
* List all world-writable files
* Find/list all accessible *.plan files and display contents
Expand All @@ -108,14 +108,18 @@
* Checks to see if the host has Docker installed
* Checks to determine if we're in an LXC container
## Cron job
## Cron jobs
Check if you have access with write permission on these files.
Check inside the file, to find other paths with write permissions.
```powershell
/etc/init.d
/etc/cron*
/etc/crontab
/etc/cron.allow
/etc/cron.d
/etc/cron.deny
/etc/cron.daily
/etc/cron.hourly
/etc/cron.monthly
Expand All @@ -124,10 +128,8 @@ Check inside the file, to find other paths with write permissions.
/etc/exports
/etc/at.allow
/etc/at.deny
/etc/crontab
/etc/cron.allow
/etc/cron.deny
/etc/anacrontab
/var/spool/cron
/var/spool/cron/crontabs/root
```

Expand Down Expand Up @@ -264,7 +266,7 @@ The project collects legitimate functions of Unix binaries that can be abused to

## Wildcard

By using tar with –checkpoint-action options, a specified action can be used after a checkpoint. This action could be a malicious shell script that could be used for executing arbitrary commands under the user who starts tar. “Tricking” root to use the specific options is quite easy, and thats where the wildcard comes in handy.
By using tar with –checkpoint-action options, a specified action can be used after a checkpoint. This action could be a malicious shell script that could be used for executing arbitrary commands under the user who starts tar. “Tricking” root to use the specific options is quite easy, and that's where the wildcard comes in handy.

```powershell
# create file for exploitation
Expand Down Expand Up @@ -359,8 +361,6 @@ int __libc_start_main(int (*main) (int, char **, char **), int argc, char ** ubp
```




## Groups

### Docker
Expand Down

0 comments on commit e9489f0

Please sign in to comment.