12.07.2013 Views

One-way Web Hacking

One-way Web Hacking

One-way Web Hacking

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

위의 명령들은 목표 웹 서버 상에서 "cmdasp.asp" 파일을 만들기 위해 post_cmd.pl과 같은 스크립트를 통해 실행될 수<br />

있다.<br />

post_cmd.pl<br />

#!/usr/bin/perl<br />

#<br />

# post_cmd.pl<br />

# By Saumil Shah (c) net-square, 2001<br />

#<br />

# Able to send arbitrary commands to http://TARGET/cgi-bin/CMD.EXE<br />

# and have them executed on the server. This is possible only if<br />

# CMD.EXE is placed in %wwwroot%\cgi-bin. (perhaps after running<br />

# some .. ah.. exploit)<br />

#<br />

# Note: If %wwwroot%\cgi-bin is not available, use the /scripts/<br />

# directory in which case, the URL becomes<br />

# http://TARGET/scripts/CMD.EXE<br />

#<br />

# POST can send text to a back-end web program's standard input<br />

# This program is used to feed commands to CMD.EXE on a remote<br />

# webserver via standard input, and get the output on standard<br />

# output, back to us, via HTTP.<br />

#<br />

# Note: We cannot use this with a form, because forms al<strong>way</strong>s<br />

# send variable=value pairs back to the back-end web program. We<br />

# want to send commands here<br />

#<br />

# Things to be careful about (and which is why this program helps)<br />

#

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!