kyalin 发表于 2015-7-10 21:44:21

大家看下这段代码 有什么漏洞

一打开www.xxxx.com/swf/





代码如下

---SWFUpload Instance Info---
Version: 2.2.0 Beta 2
Movie Name: SWFUpload_0
Settings:
        upload_url:               upload.php
        flash_url:                swfupload/swfupload.swf?swfuploadrnd=799638670
        use_query_string:         false
        requeue_on_error:         false
        http_success:            
        file_post_name:         Filedata
        post_params:            
        file_types:               *.*
        file_types_description:   All Files
        file_size_limit:          100 MB
        file_upload_limit:      100
        file_queue_limit:         0
        debug:                  true
        prevent_swf_caching:      true
        button_placeholder_id:    spanButtonPlaceHolder
        button_image_url:         images/TestImageNoText_65x29.png
        button_width:             65
        button_height:            29
        button_text:            <span class="theFont">浏览</span>
        button_text_style:      .theFont { font-size: 16; }
        button_text_top_padding:3
        button_text_left_padding: 12
        button_action:            -110
        button_disabled:          false
        custom_settings:         
Event Handlers:
        swfupload_loaded_handler assigned:false
        file_dialog_start_handler assigned: false
        file_queued_handler assigned:       true
        file_queue_error_handler assigned:true
        upload_start_handler assigned:      true
        upload_progress_handler assigned:   true
        upload_error_handler assigned:      true
        upload_success_handler assigned:    true
        upload_complete_handler assigned:   true
        debug_handler assigned:             true

SWF DEBUG: SWFUpload Init Complete
SWF DEBUG:
SWF DEBUG: ----- SWF DEBUG OUTPUT ----
SWF DEBUG: Build Number:         SWFUPLOAD 2.2.0 Beta 2 2008-10-28
SWF DEBUG: movieName:            SWFUpload_0
SWF DEBUG: Upload URL:             upload.php
SWF DEBUG: File Types String:      *.*
SWF DEBUG: Parsed File Types:      
SWF DEBUG: HTTP Success:         0
SWF DEBUG: File Types Description: All Files (*.*)
SWF DEBUG: File Size Limit:      104857600 bytes
SWF DEBUG: File Upload Limit:      100
SWF DEBUG: File Queue Limit:       100
SWF DEBUG: Post Params:
SWF DEBUG:                         PHPSESSID=
SWF DEBUG: ----- END SWF DEBUG OUTPUT ----
SWF DEBUG:

大神看一下 可以任意上传文件不??

90_ 发表于 2015-7-10 22:01:54

兄弟你有问得时间,估计就已经可以试N遍了

kyalin 发表于 2015-7-10 22:58:05

90_ 发表于 2015-7-10 22:01
兄弟你有问得时间,估计就已经可以试N遍了

不才N遍也没成功

热心网友2 发表于 2026-5-20 19:05:00

Re: 大家看下这段代码 有什么漏洞

从你贴出的配置来看,上传组件本身没有限制文件类型(`file_types: *.*`),而且允许上传最大100MB的文件。这意味着前端没有任何过滤,**能否任意上传完全取决于后端的 `upload.php` 是否做了严格的验证**。 常见的风险点: - 后端是否校验了文件扩展名、MIME类型、文件内容头? - 上传目录是否可执行脚本? - 文件名是否被重命名? - 是否限制了文件大小与类型白名单? 如果 `upload.php` 没有做任何检查,攻击者可以直接上传WebShell(如PHP文件)并由此控制服务器。建议你检查实际后端的处理逻辑,并参考以下安全措施: 1. 只允许白名单内的扩展名(如jpg、png、gif等)。 2. 使用 `getimagesize()` 或 `finfo` 验证文件内容。 3. 禁止上传目录的执行权限。 4. 重命名文件,避免用户控制路径。 如果这是你部署的站点,请立即确认后端逻辑并修复;如果是你发现的漏洞,建议联系站点管理员。
页: [1]
查看完整版本: 大家看下这段代码 有什么漏洞