Document Title: =============== Swiss File Knife v1.7.4 HTTP - Buffer Overflow Vulnerability References (Source): ==================== http://www.vulnerability-lab.com/get_content.php?id=1441 Release Date: ============= 2015-02-27 Vulnerability Laboratory ID (VL-ID): ==================================== 1441 Common Vulnerability Scoring System: ==================================== 8.4 Product & Service Introduction: =============================== Swiss File Knife - A Command Line Tools Collection that combines many functions in a single, portable executable that belongs onto every USB stick. Search and convert text files, instant simple FTP/HTTP server, find duplicate files, compare folders, treesize, run own commands on all files of a folder - it`s all within a single tool. (Copy of the Vendor Homepage: http://stahlworks.com/dev/swiss-file-knife.html ) Abstract Advisory Information: ============================== An indepdent vulnerability laboratory researcher discovered a buffer overflow vulnerability in the official Swiss File Knife 1.7.4 HTTP Server software. Vulnerability Disclosure Timeline: ================================== 2015-02-18: Vendor Fix/Patch (Developer Team) 2015-02-27: Public Disclosure (Vulnerability Laboratory) Discovery Status: ================= Published Affected Product(s): ==================== Stahlworks Product: Swiss File Knife - HTTP Server 1.7.4 (Windows, MacOS & Linux) Exploitation Technique: ======================= Remote Severity Level: =============== High Technical Details & Description: ================================ A buffer overflow vulnerability has been discovered by an indepdent researcher in the official Swiss File Knife 1.7.4 HTTP Server software. The vulnerability allows local or remote attacker to gain higher system or access privileges by exploitation of a classic buffer overflow vulnerability. Payload overwrites SEH with address of pop pop ret sequence, which redirects execution flow to the attacker buffer started with fixed string “unexpected: file left open for write: ”. First two bytes “un” - 75 6E in hex are an opcode for JNZ SHORT sfk174.005A7AC0, which successfully jumps over the fixed text right into attacker controlled buffer filled with nops and finally shellcode. The security risk of the buffer overflow vulnerability is estimated as high with a cvss (common vulnerability scoring system) count of 8.4. Proof of Concept (PoC): ======================= The vulnerability can be exploited by remote attackers without user interaction or privileged application user account. For security demonstration or to reproduce the vulnerability follow the provided information and steps below to continue. PoC: Exploit Code (*.py) !/usr/bin/env python Swiss File Knife 1.7.4 (rev 1) Buffer Overflow Author: lucyoa