SlideShare una empresa de Scribd logo
1 de 18
Descargar para leer sin conexión
Released 18/04/2014
By Eloi Vanderbeken - Synacktiv
How Sercomm saved my Easter!
Another backdoor in my router:
when Christmas is NOT enough!
2 / 18
I don't know about you, but I love Easter!
 And with Sercomm, it's Easter every day!
3 / 18
Remember the TCP/32764 router
backdoor?
 Introduced by Sercomm
 Gives root shell, no authentication
 Dump entire configuration
 4 affected manufacturers (Cisco, Linksys,
NetGear, Diamond)
 24 router models confirmed vulnerable
 6000 vulnerable routers on the Internet
 (more info: https://github.com/elvanderb/TCP-32764 )
4 / 18
It was patched!
5 / 18
No, it can't be a *feature*!
It was a simple mistake... wasn't it?
6 / 18
Let's have a look!
 'binwalk -e' to extract the file system
 scfgmgr (the backdoor binary) is still
present...
 But it's now started with a new -l option
7 / 18
What's this -l option?
 scfgmgr now listen on a Unix domain
socket :'(
8 / 18
Wait... what?
 There is an alternate option: -f that make
scfgmgr listen on TCP
9 / 18
Let's see if it's used...
10 / 18
What's this 'ft_tool'?
 Opens a raw socket
 Wait for packets
– with ethertype = 0x8888
– coming from the Ethernet card or broadcasted
(check of the destination MAC address)
 Packet format
11 / 18
If payload == md5(''DGN1000'')...
12 / 18
And if packet type == 0x201...
system(''scfgmgr -f &'')!!!
13 / 18
So you can reactivate the
backdoor again...
 If you're on the LAN
 Or if you're an Internet provider (if you're one-
hop away, you can craft Ethernet packets)
 It's DELIBERATE
 You can also use the 0x200 packet type to ping
the router (it will respond with its MAC address)
and 0x202 to change its LAN IP address
14 / 18
I don't always patch backdoors...
15 / 18
Because a root shell is not enough...
 You can now (among other things) make
the router LEDs flash with the 33, 34 and
35th message :)
16 / 18
But where does it come from?
 The 0x8888 ethertype and packet structure
is used in an old Sercomm update tool:
http://wiki.openwrt.org/_media/toh/netgear/dg834.g.v4/nftp.c
– lazy guys, they didn't even code their new
backdoor from scratch ;)
 It may be present in other hardware but
hard to tell:
– No easy way to scan
– MD5 signature will certainly be different as it's
based on the router commercial name
17 / 18
How to detect it?
 For DGN1000, simply use the PoC from
your LAN
 For other routers, the simplest way is to:
– Use 'binwalk -e' to extract the file system
– Search for 'ft_tool' or grep -r 'scfgmgr -f'
– Use IDA to confirm
We hope you enjoyed this
presentation :)
 PoC is available here:
http://synacktiv.com/ressources/ethercomm.c

Más contenido relacionado

Más de The Hacker News

Patent Troll - Big Websites Sued For Using HTTPS Encryption
Patent Troll - Big Websites Sued For Using HTTPS EncryptionPatent Troll - Big Websites Sued For Using HTTPS Encryption
Patent Troll - Big Websites Sued For Using HTTPS EncryptionThe Hacker News
 
Geo-Inference Attacks via the Browser Cache
Geo-Inference Attacks via the Browser CacheGeo-Inference Attacks via the Browser Cache
Geo-Inference Attacks via the Browser CacheThe Hacker News
 
FCC Net Neutrality Rules (Complete 400 Pages)
FCC Net Neutrality Rules (Complete 400 Pages)FCC Net Neutrality Rules (Complete 400 Pages)
FCC Net Neutrality Rules (Complete 400 Pages)The Hacker News
 
Google's Effort to Fight Content Piracy
Google's Effort to Fight Content PiracyGoogle's Effort to Fight Content Piracy
Google's Effort to Fight Content PiracyThe Hacker News
 
This Warrant Authorized FBI to Track and Infect Computers with Malware
This Warrant Authorized FBI to Track and Infect Computers with MalwareThis Warrant Authorized FBI to Track and Infect Computers with Malware
This Warrant Authorized FBI to Track and Infect Computers with MalwareThe Hacker News
 
National Security Authorities Transparency Report 2013
National Security Authorities Transparency Report 2013National Security Authorities Transparency Report 2013
National Security Authorities Transparency Report 2013The Hacker News
 
Blackshades Indictment by FBI
Blackshades Indictment by FBIBlackshades Indictment by FBI
Blackshades Indictment by FBIThe Hacker News
 
Blackshades, yucel indictment s1 13 cr 834 redacted
Blackshades, yucel indictment s1 13 cr  834 redactedBlackshades, yucel indictment s1 13 cr  834 redacted
Blackshades, yucel indictment s1 13 cr 834 redactedThe Hacker News
 

Más de The Hacker News (9)

Facebook lawsuit
Facebook lawsuitFacebook lawsuit
Facebook lawsuit
 
Patent Troll - Big Websites Sued For Using HTTPS Encryption
Patent Troll - Big Websites Sued For Using HTTPS EncryptionPatent Troll - Big Websites Sued For Using HTTPS Encryption
Patent Troll - Big Websites Sued For Using HTTPS Encryption
 
Geo-Inference Attacks via the Browser Cache
Geo-Inference Attacks via the Browser CacheGeo-Inference Attacks via the Browser Cache
Geo-Inference Attacks via the Browser Cache
 
FCC Net Neutrality Rules (Complete 400 Pages)
FCC Net Neutrality Rules (Complete 400 Pages)FCC Net Neutrality Rules (Complete 400 Pages)
FCC Net Neutrality Rules (Complete 400 Pages)
 
Google's Effort to Fight Content Piracy
Google's Effort to Fight Content PiracyGoogle's Effort to Fight Content Piracy
Google's Effort to Fight Content Piracy
 
This Warrant Authorized FBI to Track and Infect Computers with Malware
This Warrant Authorized FBI to Track and Infect Computers with MalwareThis Warrant Authorized FBI to Track and Infect Computers with Malware
This Warrant Authorized FBI to Track and Infect Computers with Malware
 
National Security Authorities Transparency Report 2013
National Security Authorities Transparency Report 2013National Security Authorities Transparency Report 2013
National Security Authorities Transparency Report 2013
 
Blackshades Indictment by FBI
Blackshades Indictment by FBIBlackshades Indictment by FBI
Blackshades Indictment by FBI
 
Blackshades, yucel indictment s1 13 cr 834 redacted
Blackshades, yucel indictment s1 13 cr  834 redactedBlackshades, yucel indictment s1 13 cr  834 redacted
Blackshades, yucel indictment s1 13 cr 834 redacted
 

Último

Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 

Último (20)

Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 

TCP 32764 Backdoor Reactivated Again

  • 1. Released 18/04/2014 By Eloi Vanderbeken - Synacktiv How Sercomm saved my Easter! Another backdoor in my router: when Christmas is NOT enough!
  • 2. 2 / 18 I don't know about you, but I love Easter!  And with Sercomm, it's Easter every day!
  • 3. 3 / 18 Remember the TCP/32764 router backdoor?  Introduced by Sercomm  Gives root shell, no authentication  Dump entire configuration  4 affected manufacturers (Cisco, Linksys, NetGear, Diamond)  24 router models confirmed vulnerable  6000 vulnerable routers on the Internet  (more info: https://github.com/elvanderb/TCP-32764 )
  • 4. 4 / 18 It was patched!
  • 5. 5 / 18 No, it can't be a *feature*! It was a simple mistake... wasn't it?
  • 6. 6 / 18 Let's have a look!  'binwalk -e' to extract the file system  scfgmgr (the backdoor binary) is still present...  But it's now started with a new -l option
  • 7. 7 / 18 What's this -l option?  scfgmgr now listen on a Unix domain socket :'(
  • 8. 8 / 18 Wait... what?  There is an alternate option: -f that make scfgmgr listen on TCP
  • 9. 9 / 18 Let's see if it's used...
  • 10. 10 / 18 What's this 'ft_tool'?  Opens a raw socket  Wait for packets – with ethertype = 0x8888 – coming from the Ethernet card or broadcasted (check of the destination MAC address)  Packet format
  • 11. 11 / 18 If payload == md5(''DGN1000'')...
  • 12. 12 / 18 And if packet type == 0x201... system(''scfgmgr -f &'')!!!
  • 13. 13 / 18 So you can reactivate the backdoor again...  If you're on the LAN  Or if you're an Internet provider (if you're one- hop away, you can craft Ethernet packets)  It's DELIBERATE  You can also use the 0x200 packet type to ping the router (it will respond with its MAC address) and 0x202 to change its LAN IP address
  • 14. 14 / 18 I don't always patch backdoors...
  • 15. 15 / 18 Because a root shell is not enough...  You can now (among other things) make the router LEDs flash with the 33, 34 and 35th message :)
  • 16. 16 / 18 But where does it come from?  The 0x8888 ethertype and packet structure is used in an old Sercomm update tool: http://wiki.openwrt.org/_media/toh/netgear/dg834.g.v4/nftp.c – lazy guys, they didn't even code their new backdoor from scratch ;)  It may be present in other hardware but hard to tell: – No easy way to scan – MD5 signature will certainly be different as it's based on the router commercial name
  • 17. 17 / 18 How to detect it?  For DGN1000, simply use the PoC from your LAN  For other routers, the simplest way is to: – Use 'binwalk -e' to extract the file system – Search for 'ft_tool' or grep -r 'scfgmgr -f' – Use IDA to confirm
  • 18. We hope you enjoyed this presentation :)  PoC is available here: http://synacktiv.com/ressources/ethercomm.c