Phlashing, or "Brick and Run"

DON'T post new tutorials here! Please use the "Pending Submissions" board so the staff can review them first.
Post Reply
User avatar
DNR
Digital Mercenary
Digital Mercenary
Posts: 6114
Joined: 24 Feb 2006, 17:00
18
Location: Michigan USA
Contact:

Phlashing, or "Brick and Run"

Post by DNR »

This is a good example of thinking outside of the box, or the rules. This is an example of an obvious backdoor into a network, a weakness.
enjoy this compilation :wink:

DNR



Phlashing is a permanent denial of service (DoS) attack that exploits a vulnerability in network-based firmware updates. Such an attack is currently theoretical but if carried out could render the target device inoperable.
Rich Smith, head of HP's Systems Security Lab, discovered the vulnerability and demonstrated the attack at the EUSecWest security conference in June 2008. In a real-world execution, an attacker could use remote firmware update paths in network hardware, which are often left unprotected, to deliver corrupted firmware and flash this to the device. As a result, the device would become unusable.

The likelihood of phlashing attacks is under some debate. Like other types of exploits, DoS has become increasingly profit-driven. Although phlashing would be cheaper to execute and more damaging than a traditional DOS attack, its potential for gain is limited because once the network hardware has been rendered useless, the victim has no incentive to pay the attacker. The attacker's only prospect for gain would be to threaten to attack and demand a payoff to refrain from doing so. However, as suggested on the Hack a Day blog, the same attack vector could be more effectively used to flash a device with malware-embedded firmware.

------------

Phlashing Attack Can Damage Systems Beyond Repair

The attack would be carried out by exploiting flaws in remote management interfaces to gain access to the system and then flashing or fuzzing the firmware binaries to render the hardware useless. One such remote management interface is HP’s Integrated Lights Out (ILO) which is embedded in their ProLiant servers; however, Doug Hascall, an HP manager in charge of ILO firmware, believes the security architecture of the interface makes it invulnerable to the attack.

Security watchers, myself included, don’t see crackers destroying systems since there would be no money in it; rather, this attack could make it possible for them to plant malware inside of the firmware: a far more insidious threat. Moreover, a country’s enemies could use the technique as an effective cyberwarfare weapon either to take out critical infrastructure or to implant spyware to gather military intelligence.

http://itknowledgeexchange.techtarget.c ... nd-repair/
--------------

Phlashing denial of service attack, the new hype

Anyone who has flashed a device knows the danger of interrupting the procedure.

Embedded systems, like wireless routers, network cameras, and printers require remote access to be upgraded. This could be over the network or just a USB cable. Unfortunately most devices go unpatched because of this lack of easy access. The upgrade procedure can be very insecure too. The last time we flashed a custom firmware on our La Fonera we had to set up a TFTP server for it to download the firmware from. The TFTP protocol has no authentication, so anyone could pose as the server and offer a bad firmware for download. Many embedded system upgrade tools use TFTP because of its ease of implementation and low hardware overhead.

Malware is a business and destroying hardware doesn't seem to have much income potential. The article presents this as an alternative to maintaining a botnet to perform a DDOS. With a DDOS, you deny the service, ask for ransom, and return service when they pay. With PDOS, you threaten to deny their service, they don't pay, and then you destroy their equipment and get nothing. We agree with [HD Moore] that a more successful attack would be installing your own custom firmware that gives you full control of the system and full access to the network to do as you please.

Outside of griefing, the PDOS attack is not a threat. In any case, firmware upgrade procedures for embedded devices need to be improved.

http://www.hackaday.com/2008/05/20/phla ... e-new-hype
-------------

Researcher to demonstrate a permanent denial-of-service (PDOS) attack that remotely wipes out hardware via flash firmware updates

Smith will demonstrate how network-enabled systems firmware is susceptible to a remote PDOS attack -- which he calls “phlashing” -- this week at the EUSecWest security conference in London. He’ll also unveil a fuzzing tool he developed that can be used to launch such an attack as well as to detect PDOS vulnerabilities in firmware systems.

His so-called PhlashDance tool fuzzes binaries in firmware and the firmware’s update application protocol to cause a PDOS, and it detects PDOS weaknesses across multiple embedded systems.

Meanwhile, Smith says he’s not aware of any phlashing PDOS attacks in the wild to date, but there are a few precautions to protect against these attacks. “Unfortunately, there isn't a magic bullet, but making sure the flash update mechanisms have authentication so as not just anyone can perform an update is a start,” Smith says. “Beyond this, flash update mechanisms need to be designed with malicious attacks in mind.”

Smith has no plans yet for releasing his PhlashDance tool.


http://www.darkreading.com/document.asp?doc_id=154270
-------------------

other
http://eusecwest.com/speakers.html
http://www.pcsympathy.com/2008/05/20/pe ... -hardware/
http://www.boingboing.net/2008/05/20/ph ... k-per.html
http://www.itsec.ru/keywords.php?keyword=26441
http://ntlab.egloos.com/tag/PhlashDance
http://www.howinthetech.com/youve-been- ... k-and-run/
Last edited by DNR on 25 Nov 2008, 13:22, edited 1 time in total.
-
He gives wisdom to the wise and knowledge to the discerning. He reveals deep and hidden things; he knows what lies in Darkness, and Light dwells with him.

User avatar
str33tl0rd
Fame ! Where are the chicks?!
Fame ! Where are the chicks?!
Posts: 241
Joined: 04 Jul 2008, 16:00
15
Location: somewhere

Post by str33tl0rd »

very nice and clear explanation DNR....keep it up....
A fools mind is at the mercy of his tongue and a wise mans tongue is under the control of his mind.~ Imam Ali (A.S)

MariaLara
suck-o-fied!
suck-o-fied!
Posts: 99
Joined: 27 Feb 2008, 17:00
16
Contact:

Post by MariaLara »

I really enjoyed this post too. It was a nice read. Thank you.

User avatar
hpprinter100
Fame ! Where are the chicks?!
Fame ! Where are the chicks?!
Posts: 214
Joined: 19 Oct 2007, 16:00
16
Contact:

Post by hpprinter100 »

Wow thats intense post

G-Brain
Fame ! Where are the chicks?!
Fame ! Where are the chicks?!
Posts: 467
Joined: 08 Nov 2007, 17:00
16
Location: NL

Post by G-Brain »

Delicious copypasta.
I <3 MariaLara more than all of you

User avatar
caisher
On the way to fame!
On the way to fame!
Posts: 46
Joined: 04 Oct 2007, 16:00
16
Location: Texas,USA
Contact:

Post by caisher »

thnx DNR
The barrier to change is not too little caring; it is too much complexity.
改变世界的阻碍,并非人类的冷漠,而是这个世界太复杂

User avatar
DNR
Digital Mercenary
Digital Mercenary
Posts: 6114
Joined: 24 Feb 2006, 17:00
18
Location: Michigan USA
Contact:

more on UPnP flash attack, and Netgear router phashing

Post by DNR »

http://www.gnucitizen.org/blog/flash-upnp-attack-faq/

Flash UPnP Attack FAQ
published: January 14th, 2008

What does the Flash UPnP hack consist of?
When the victim visits a malicious SWF file, or a page that embeds one (think about ad networks, etc), a 4 (could be less or slightly more) step ATTACK will silently execute in the background, upon which the attacker will have control over the victim’s router, pretty much regardless of its model.

Does the attack rely on any vulnerabilities within Flash?
No! The attack is based on the navigateToURL function and the URLRequest object. Both of them are used as described in the Flash ActionScript specifications.

Does the Flash UPnP Attack depend on certain browser type and/or version?
No! The attack is possible because of Flash not because of the underlaying browser!

Does the Flash UPnP Attack depend on certain Operating System type and/or version?
No! Flash is cross-platformed. The attack will work wherever Flash works.

The Demo does not work with the most recent version of Flash Player, right?
No! It does work!

Nevertheless, UPnP is useless, right?
Wrong! UPnP hacking is extremely serious discipline which often lead to a catastrophic effect. The following is possible with UPnP:

•portforward internal services (ports) to the router external facing side (a.k.a poking holes into your firewall and/or network)
•portforward the router web administration interface to the external facing side.
•port forwarding to any external server located on the Internet, effectively turning your router into a zombie: the attacker can attack an Internet host via your router, thus hiding their IP address (not all routers are affected by this, but most are)
•change the DNS server settings so that next time when the victim visits bank.com, they actually end up on evil.com mascaraed as bank.com
•change the DNS server settings so that the next time when the victim updates theirs favorite Firefox extensions, they will end up downloading evil code from evil.com which will root their system.
•reset/change the administrative credentials
•reset/change the PPP settings
•reset/change the IP settings for all interfaces
•reset/change the WiFi settings
•terminate the connection
And these are just a small portion of the things you can do over UPnP.

Nevertheless, UPnP is secure. The user will be prompted with a Basic Authentication prompt, right?
Wrong! UPnP specifications do not provide any standard for authentication. Therefore, everyone can do these changes without any restrictions.

Is UPnP turned on by default?
Yes! UPnP is turned on by default on most, if not all devices. Otherwise, things like MSN and Skype realtime audio and video, P2P (Peer-to-Peer) software like Emule, Games of all kinds and bunch of other things wont work unless the user manually make changes in their router’s configuration. Due to the fact that the average user is not a System Administrator, UPnP is enabled by default in order to make the magic happening behind the screen.

Can I turn UPnP off?
Yes! Please consult with the manual provided by your router manufacturer. It is a good idea to consider the inconveniences that this change may cause you. Remember: there are no perfect things! It is all about keeping the balance.

Is it just my router that supports UPnP?
No! Many types of devices support the UPnP protocol: Cameras, Printers, Mobile Phones (yes my mobile has UPnP capabilities), Digital Entertainment Systems, etc.

Is it possible to hack into other UPnP enabled devices with the Flash UPnP Attack?
Yes! It is possible to hack into any UPnP enabled device as long as the UPnP control point is delivered over HTTP. HTTPU (HTTP over UDP) UPnP implementations are not vulnerable due to the fact that Flash does not support the UDP transport protocol.

Am I safe if my UPnP device handles only HTTPU?
No! You still need to consider the risk that someone can send arbitrary UDP requests to the UPnP control point. Remember, UPnP does not have any authentication or authorization facilities!

Am I safe if I disable/uninstall Flash?
Although I am not aware of any other method for achieving the same effect, it is very likely that the same attack can be performed by other types of Web technologies.

Why did you publish the research?
We hope that by exposing this information, we will drastically improve the situation for the future. I think that this is a lot better than keeping it for ourselves or risking it all by given the criminals the opportunity to have in possession a secret which no one else is aware of.

Why didn’t you contact the vendor?
What vendor? Who? There are so many device manufacturers that it is highly unfeasible to contact each individually. Regarding Adobe, well…, they haven’t done anything wrong either. So, I don’t think that you should blame them.

How would you rate the issue?
HIGHLY SEVERE! Turn UPnP off!

-----

Check out the firmware codec for netgear

ftp://downloads.netgear.com/files/GPL/

This is an example of technical stuff you can search for on each router's manufacturer, in this case, this is on Netgear.
Clearing the Password or Updating the Firmware in Routers Using a Manager Port: RM356, RT311, RT314, RT328, RT338, RH340, and RH348

This procedure uses a terminal emulation program such as HyperTerminal to put the router into boot mode, then sends it the new firmware or default configuration file using the XMODEM file transfer protocol. HyperTerminal is included in the standard Windows installation, under Programs Accessories Communications Hyperterminal.

Updating sends a firmware file to the router. Firmware files are typically named filename.bin, and can be found in the Downloads for a product in under Support in NETGEAR's Web site.

Clearing the password is accomplished by sending a default configuration file to the router. Default configuration files are typically named romfile0 or romfile0.nnn. Your original romfile0 can be found on utility disk that was supplied with the router. If you have updated the router's firmware, use the romfile0 that is included with new firmware.

Download the files to your PC and remember their location. Connect a standard PC serial cable from one of your PC's COM ports to the serial Manager port on the rear of your router, then follow the appropriate instructions below.

Note:

•The FirstGear Configuration Utility cannot be used to upload firmware.
•The RM356 uses a special serial cable that was supplied with the router.
•For a more detailed description of these procedures, refer to the Reference Manual that was supplied with the router.
To Upgrade These Router's Bin File

1.Click Start > Programs > Accessories > Communication > HyperTerminal.
2.In Connection Description enter a name of your choice.
3.Click OK.
4.In the Connect To window select Direct to COM1 in Connect using, and click OK.
5.In COM1 Properties set the values as shown:

Bits per second
9600

Data bit
8

Parity
None
Stop bits
1

Flow control Hardware



6.Click OK. A HyperTerminal Screen displays.
7.Power cycle the router and when the power is turned on, you will notice the session completing a test. When the window reads "PRESS ANY KEY TO ENTER DEBUG WITHIN 3 SECONDS" press any key. If you are late, then recycle the power and try again.
8.Once you enter the debug mode type the command atur and quickly press ENTER. (Some users have reported that atur does not work, and atur3 should be used, instead.) This message appears “Starting XMODEM upload (CRC mode)...."
9.When you see characters like "CCCCCC……CCC" go to the TRANSFER option on the top menu bar and click Send File > Browse.
10.Browse to the bin file. Change the protocol to XMODEM and click Send. This process takes about 10 minutes.
11.Restart router by typing atgo and press Enter.
To Clear the Router's Password and Restore Factory Defaults

1.Click Start > Programs > Accessories > Communication > HyperTerminal.
2.In Connection Description enter a name of your choice. Click OK.
3.In the Connect To window select Direct to COM1 in Connect using, and click OK.
4.In COM1 Properties set the values as shown:

Bits per second
9600

Data bit
8

Parity
None
Stop bits
1

Flow control None



5.Click OK. A HyperTerminal Screen displays.
6.Power cycle the router and when the power is turned on, you will notice the session completing a test. When the window reads "PRESS ANY KEY TO ENTER DEBUG WITHIN 3 SECONDS" press any key. If you are late, then recycle the power and try again.
7.Once you enter the debug mode type the command atur3 and quickly press ENTER. This message appears “Starting XMODEM upload (CRC mode)..."
8.When you see characters like "CCCCCC……CCC" go to the TRANSFER option on the top menu bar and click Send File > Browse.
9.Browse to the romfile0 file. Change the protocol to XMODEM and click Send. This process takes about 10 seconds.
10.Restart router by typing atgo and press Enter.
Now the router has the original factory defaults settings. The password is 1234.
----

I suppose once you learn how to 'update' router's firmware, and view open-source code, you could write something malicious and then perform the devastating 'update'.

DNR
-
He gives wisdom to the wise and knowledge to the discerning. He reveals deep and hidden things; he knows what lies in Darkness, and Light dwells with him.

Post Reply