
Bro के लिए ShellShock हमले और शोषण का पता लगाने वाला उपकरण।
===========================
यह स्क्रिप्ट CVE-2014-6271 के रूप में जानी जाने वाली Bash भेद्यता के सफल शोषण का पता लगाती है, जिसे "ShellShock" उपनाम दिया गया है। यह आस-पास उपलब्ध अधिकांश डिटेक्शनों की तुलना में अधिक व्यापक है क्योंकि यह हमला किए गए होस्ट के उस व्यवहार पर नज़र रखता है जो सफल समझौते या वास्तविक भेद्यता का संकेत दे सकता है।
यदि कोई होस्ट HTTP पर हमला प्राप्त करता दिखाई देता है, तो Bro उस होस्ट पर नज़र रखेगा कि वह या तो ड्रॉपर पेलोड डाउनलोड करता है या ICMP पिंग भेजता है। कई और तंत्र सामने आ सकते हैं, लेकिन यह अधिकांश ज्ञात प्रतिक्रिया तंत्रों को कवर करेगा। यह स्क्रिप्ट डिफ़ॉल्ट रूप से application/x-executable माइम प्रकार की फ़ाइलों पर नज़र रखने के लिए कॉन्फ़िगर की गई है, जो यहाँ दिए गए हमले में सूचीबद्ध ड्रॉपर को कवर करेगी:
https://gist.github.com/anonymous/929d622f3b36b00c0be1
वैकल्पिक रूप से, यदि हमलावर केवल पिंग कमांड से परीक्षण कर रहे हैं, तो यह स्क्रिप्ट हमले का पता चलने के तुरंत बाद पीड़ित से आने वाले पिंग कमांड पर नज़र रखेगी।
यह स्क्रिप्ट HTTP लॉग में "tags" फ़ील्ड में एक टैग भी जोड़ेगी, उन किसी भी अनुरोध के लिए जो संभावित हमले प्रतीत होते हैं। टैग की सामग्री है: ShellShock::HIT.
जहाँ तक बात है, यह स्क्रिप्ट क्लस्टर-जागरूक है और Bro क्लस्टर पर ठीक काम करेगी तथा परिचालन रूप से चलाने के लिए भी ठीक होनी चाहिए।
यह स्क्रिप्ट वर्तमान में Bro 2.3, 2.4, और 2.5 का समर्थन करती है। यदि यह स्क्रिप्ट Bro के किसी समर्थित संस्करण पर आपको परेशानी दे रही है, तो कृपया एक टिकट दर्ज करें।
इस रिपॉजिटरी में एक उदाहरण पैकेट कैप्चर शामिल है जो exploit.pcap नामक एक उदाहरण सर्वर का शोषण करता है। ये रहे प्रासंगिक लॉग जो आउटपुट होते हैं।
notice.log
#separator \x09
#set_separator ,
#empty_field (empty)
#unset_field -
#path notice
#open 2014-09-26-10-47-02
#fields ts uid id.orig_h id.orig_p id.resp_h id.resp_p fuid file_mime_type file_desc proto note msg sub src dst p peer_descr actions suppress_for dropped remote_location.country_code remote_location.region remote_location.city remote_location.latitude remote_location.longitude
#types time string addr port addr port string string string enum enum string string addr addr port count string set[enum] interval bool string string string double double
1411666207.583791 - - - - - - - - - ShellShock::Scanner 10.246.50.2 sent at least 1 CVE-2014-6271 exploit attempts in 0m0s. Used payload: "() { :;}; /bin/ping -c1 10.246.50.2" :: against sample victim hosts: 10.246.50.6 10.246.50.2 - - - bro Notice::ACTION_LOG 3600.00000-
1411666207.588581 - - - - - - - - - ShellShock::Exploit High likelihood of successful CVE-2014-6271 exploitation against 10.246.50.6. Attack over HTTP and sent a ping to 10.246.50.2 within 0.000 seconds of an attack. Attack over HTTP and sent a ping to 10.246.50.2 within 0.000 seconds of an attack. 10.246.50.6 - - - bro Notice::ACTION_LOG 3600.000000 F - - - - -
http.log
#separator \x09
#set_separator ,
#empty_field (empty)
#unset_field -
#path http
#open 2014-09-26-10-47-02
#fields ts uid id.orig_h id.orig_p id.resp_h id.resp_p trans_depth method host uri referrer user_agent request_body_len response_body_len status_code status_msg info_code info_msg filename tags username password proxied orig_fuids orig_mime_types resp_fuids resp_mime_types
#types time string addr port addr port count string string string string string count count count string count string string set[enum] string string set[string] vector[string] vector[string] vector[string] vector[string]
1411666207.583791 CC7s232GDnmtxZUly5 10.246.50.2 43616 10.246.50.6 80 1 GET 10.246.50.6 /exploitable.cgi - () { :;}; /bin/ping -c1 10.246.50.2 0 615 500 Internal Server Error - - - ShellShock::HIT - - - - - FgVgjb1GU12ixSuugc text/html
#close 2014-09-26-10-47-02
bro-pkg refresh
bro-pkg install corelight/bro-shellshock
कुछ कॉन्फ़िगरेशन वेरिएबल हैं।
## The number of apparent attacks a host must send for it to be
## detected as ShellShock::Scanner.
const ShellShock::scan_threshold = 10 &redef;
## The period over which scanner detection is performed.
const ShellShock::scan_detection_period = 10min &redef;
इनका उपयोग यह विस्तारित करने के लिए किया जा सकता है कि ShellShock स्कैन किए गए होस्टों पर कितनी देर तक नज़र रखी जाए और हमलों की कितनी संख्या होने पर उन्हें स्कैनिंग घोषित किया जाए तथा एक नोटिस बनाया जाए।
Seth Hall <[email protected]>
Stephen Hosom - Provided a fully exploiting packet capture.
Nick Weaver - Valuable discussion on how shellshock is and isn't exploitable.
Vlad Grigorescu - Feature request after feature request.
Mike Patterson - Suggesting to watch for shellscripts as a post-exploit dropper.