We're sorry but this page doesn't work properly without JavaScript enabled. Please enable it to continue.
Feedback

Breaking Google Home: Exploit It with SQLite(Magellan)

00:00

Formale Metadaten

Titel
Breaking Google Home: Exploit It with SQLite(Magellan)
Serientitel
Anzahl der Teile
335
Autor
Lizenz
CC-Namensnennung 3.0 Unported:
Sie dürfen das Werk bzw. den Inhalt zu jedem legalen Zweck nutzen, verändern und in unveränderter oder veränderter Form vervielfältigen, verbreiten und öffentlich zugänglich machen, sofern Sie den Namen des Autors/Rechteinhabers in der von ihm festgelegten Weise nennen.
Identifikatoren
Herausgeber
Erscheinungsjahr
Sprache

Inhaltliche Metadaten

Fachgebiet
Genre
Abstract
Over the past years, our team has used several new approaches to identify multiple critical vulnerabilities in SQLite and Curl, two of the most widely used basic software libraries. These two sets of vulnerabilities, which we named "Magellan" and "Dias" respectively, affect many devices and software. We exploited these vulnerabilities to break into some of the most popular Internet of things devices, such as Google Home with Chrome. We also exploited them on one of the most widely used Web server (Apache+PHP) and one of the most commonly used developer tool (Git). In this presentation, we will share how we try to crack the Google Home from both hardware and software aspects, get and analyze the newest firmware, solve the problem, and introduce new methods to discover vulnerabilities in SQLite and Curl through Fuzz and manual auditing. Through these methods, we found "Magellan", a set of three heap buffer overflow and heap data disclosure vulnerabilities in SQLite ( CVE-2018-20346, CVE-2018-20505 CVE-2018-20506 ) We also found "Dias", two remote memory leak and stack buffer overflow vulnerabilities in Curl ( CVE-2018-16890 and CVE-2019-3822 ). Considering the fact that these vulnerabilities affect many systems and software, we have issued a vulnerability alert to notify the vulnerable vendor to fix it. We will disclose the details of "Magellan" and "Dias" for the first time and highlight some of our new vulnerability exploitation techniques. In the first part, we will introduce the results of our analysis on hardware, how to get the newest firmware from simulating an update request, and attack surface of Google Home. We will show how to use Magellan to complete the remote exploit of Google Home, we will also give a brefing talk about how to use Dias to complete the remote attack on Apache+PHP and Git. Finally, we will summarize our research and provide some security development advice to the basic software library developers. Wenxiang Qian Wenxiang Qian is a senior security researcher at the Tencent Blade Team. He is focusing on security research of IoT devices. He also do security audits for web browsers. He was on the top 100 of annual MSRC list (2016 & 2017 ). He published a book called "Whitehat Talk About Web Browser Security ". YuXiang Li YuXiang Li is a senior security researcher at Tencent Blade Team, specialized in the study of Mobile Security and IoT Security. He has reported multiple vulnerabilities of Android and received acknowledgments from vendors(Google/Huawei). He was a speaker of HITB AMS 2018 and XCON 2018. HuiYu Wu HuiYu Wu is a senior security researcher at Tencent Blade Team. Now his job is mainly focus on IoT security research and mobile security research. He was also a bug hunter, winner of GeekPwn 2015, and speaker of DEF CON 26 , HITB 2018 AMS and POC 2017.
ExploitGoogolComputersicherheitCross-site scriptingCodeFokalpunktSharewareSystemplattformPunktwolkeUnrundheitComputersicherheitFlächeninhaltPlastikkarteSoftwareschwachstelleMereologieFlächentheorieInternet der DingeKontrollstrukturProgrammfehlerQuaderExploitPunktwolkeBrowserSatellitensystemKurvenanpassungSystemplattformFamilie <Mathematik>Computeranimation
PlastikkarteCodeWurzel <Mathematik>KontrollstrukturFamilie <Mathematik>DatenfeldProxy ServerComputersicherheitPlastikkarteDiagramm
GoogolHardwareBenutzeroberflächeFlash-SpeicherFirmwareFamilie <Mathematik>SoftwaretestMereologieHardwareFlash-SpeicherBefehlsprozessorAnalysisFirmwareBus <Informatik>Computeranimation
FirmwareSpeicherabzugTrägheitsmomentLogarithmusLangevin-GleichungPersönliche IdentifikationsnummerDigitaltechnikSpeicherabzugDifferenteSoftwaretestWhiteboardFunktionalPASS <Programm>ProgrammProdukt <Mathematik>Computeranimation
SpeicherabzugFirmwareKanal <Bildverarbeitung>Graphische BenutzeroberflächeProzess <Informatik>Flash-SpeicherSpezialrechnerZustandsdichteLesen <Datenverarbeitung>Produkt <Mathematik>ProgrammFlash-SpeicherBildgebendes VerfahrenPhysikalisches SystemUmwandlungsenthalpieFirmwareTrigonometrieComputeranimationProgramm/QuellcodeXMLFlussdiagramm
Physikalisches SystemGraphische BenutzeroberflächeFunktion <Mathematik>BrowserGoogolNabel <Mathematik>Physikalisches SystemGraphische BenutzeroberflächeFunktionalBrowserGewicht <Ausgleichsrechnung>MereologieComputeranimation
Mechanismus-Design-TheorieComputersicherheitGoogolOpen SourceQuellcodeMereologieHIP <Kommunikationsprotokoll>FirmwareBinärcodeComputersicherheitFirmwareProgrammRelativitätstheorieBootenKernel <Informatik>Open SourceGoogolAttributierte GrammatikComputeranimation
E-MailSpezialrechnerProgrammverifikationLastPhysikalisches SystemPartitionsfunktionBootenGoogolComputersicherheitGewicht <Ausgleichsrechnung>RSA-VerschlüsselungKonsistenz <Informatik>BootenMechanismus-Design-TheorieBildgebendes VerfahrenComputersicherheitInternet der DingeGoogolMathematische LogikPhysikalisches SystemEinflussgrößeIntegralProgrammverifikationComputeranimation
Graphische BenutzeroberflächeMechanismus-Design-TheorieComputersicherheitNamensraumBootenAdditionProgrammMechanismus-Design-TheorieAuswahlverfahrenNamensraumGraphische BenutzeroberflächeFlächentheorieHalbleiterspeicherFirmwarePhysikalisches SystemNabel <Mathematik>VerzeichnisdienstSchnitt <Mathematik>Minkowski-MetrikComputeranimation
FlächentheorieGoogolRechnernetzDrahtloses lokales NetzHardwareFirmwareWurzel <Mathematik>Flash-SpeicherBootenProxy ServerServerHackerKeller <Informatik>UmwandlungsenthalpieWeb-SeiteGraphische BenutzeroberflächeBrowserProtokoll <Datenverarbeitungssystem>Lokales NetzServerGoogolComputersicherheitProtokoll <Datenverarbeitungssystem>Nichtlinearer OperatorMultiplikationOffene MengeFlächentheorieComputeranimation
HardwareWurzel <Mathematik>Drahtloses lokales NetzFlächentheorieGoogolRechnernetzFlash-SpeicherProxy ServerBootenHackerGraphische BenutzeroberflächeKeller <Informatik>Protokoll <Datenverarbeitungssystem>UmwandlungsenthalpieBrowserWeb-SeiteSoftwareentwicklerApp <Programm>Protokoll <Datenverarbeitungssystem>CADFlächentheorieURLSpeicher <Informatik>Kartesische KoordinatenGraphische BenutzeroberflächeSoftwareschwachstelleLokales NetzGanze FunktionGoogolFirmwareBootenGarbentheorieComputerarchitekturInternet der DingeApp <Programm>InstantiierungAuswahlverfahrenLastBimodulComputeranimation
KonfigurationsdatenbankFlächentheorieProtokoll <Datenverarbeitungssystem>BrowserGoogolWeb-SeiteComputersicherheitKartesische KoordinatenSpeicher <Informatik>AdressraumApp <Programm>Interrupt <Informatik>Protokoll <Datenverarbeitungssystem>Graphische BenutzeroberflächeBrowserURLAuswahlverfahrenRouterWeb-SeiteInteraktives FernsehenVolumenvisualisierungCADComputeranimation
URLDatentypFlächentheorieSoftwareentwicklerGoogolGraphische BenutzeroberflächeLokales NetzApp <Programm>Protokoll <Datenverarbeitungssystem>RouterWeb-SeiteURLKartesische KoordinatenAuswahlverfahrenApp <Programm>Protokoll <Datenverarbeitungssystem>ProzessautomationLokales NetzVolumenvisualisierungGraphische BenutzeroberflächeSoftwareschwachstelleGoogolRPCSprachsyntheseVorzeichen <Mathematik>CADExploitSichtenkonzeptNotepad-ComputerComputeranimation
Graphische BenutzeroberflächeGoogolSoftwareschwachstelleSoftwareschwachstelleMereologieFuzzy-LogikDigitaltechnikXMLComputeranimationJSON
GoogolGoogle ChromeGraphische BenutzeroberflächeEinfache GenauigkeitSoftwareSoftwareschwachstelleProgrammbibliothekGoogolCodeFunktionalGraphische BenutzeroberflächeMereologieFuzzy-LogikDigitaltechnikSoftwareschwachstelleComputeranimation
SoftwareEinfache GenauigkeitSystemzusammenbruchTabelleSchlüsselverwaltungVirtuelle RealitätInhalt <Mathematik>SoftwareschwachstelleDigitaltechnikSchnittmengeProjektive EbeneCodeCASE <Informatik>Elektronische PublikationGraphische BenutzeroberflächeTabelleMathematikBefehl <Informatik>HalbleiterspeicherZeiger <Informatik>SummierbarkeitSoftwaretestSystemzusammenbruchProgrammbibliothekSchlüsselverwaltungInhalt <Mathematik>Fuzzy-LogikComputeranimationBesprechung/Interview
DatenbankAbschattungTabelleInhalt <Mathematik>TopologieBefehl <Informatik>StatistikAbschattungSoftwareTabelleVerzweigendes ProgrammGraphische BenutzeroberflächeCodeRechenschieberTypentheorieMultifunktionProgrammierumgebungArithmetisches MittelInhalt <Mathematik>DatenflussKonditionszahlFlächentheorieAggregatzustandDigitaltechnikExploitComputeranimation
Wurzel <Mathematik>Ganze ZahlTabelleVirtuelle RealitätZahlenbereichSchlüsselverwaltungKorrelationInhalt <Mathematik>p-BlockAbschattungTermURLSchnittmengeDatenfeldWort <Informatik>TabelleInhalt <Mathematik>Inverter <Schaltung>Mapping <Computergraphik>BinärcodeRechenschieberAutomatische IndexierungEindeutigkeitTypentheorieAbfrageArithmetisches MittelXML
p-BlockTopologieSelbstrepräsentationBinärdatenTabelleAbschattungDatenstrukturGanze ZahlSchlüsselverwaltungKnotenmengeTermDickeDateiformatZahlenbereichSoftwareschwachstelleHalbleiterspeicherBildschirmmaskeDatenstrukturEinfache GenauigkeitVarianzVersionsverwaltungTermBitGanze ZahlNichtlinearer OperatorCodeGarbentheorieInnerer PunktFigurierte ZahlDivergente ReiheFlächeninhaltSerielle SchnittstelleDateiformatComputeranimation
InformationROM <Informatik>SchlüsselverwaltungKnotenmengeFunktion <Mathematik>TopologieSystemzusammenbruchInhalt <Mathematik>Dreiecksfreier GraphFunktionalSoftwareschwachstelleHalbleiterspeicherMatchingSoftwareMAPTabelleExploitOrtsoperatorBinärcodeNichtlinearer OperatorAbfragePräkonditionierungDickeKomplex <Algebra>KreisflächeDivergente ReiheComputeranimation
Proxy ServerAbschattungInformationKontrollstrukturFunktion <Mathematik>TermLemma <Logik>SoftwareschwachstelleSchnittmengeHalbleiterspeicherInformationOpen SourceBinärcodeZeiger <Informatik>ParametersystemMailing-ListeXMLComputeranimation
Gebundener ZustandRandwertStrom <Mathematik>PunktDickeMailing-ListeCodeGanze ZahlBinärcodeResultanteFunktionalInhalt <Mathematik>CursorMinkowski-MetrikDatenfeldDickeLesen <Datenverarbeitung>RandwertAlgorithmusComputeranimation
SpeicherverwaltungPufferspeicherLesen <Datenverarbeitung>ROM <Informatik>LeckTabelleRohdatenZeiger <Informatik>FunktionalPufferüberlaufMailing-ListeHalbleiterspeicherCodePuffer <Netzplantechnik>GeradeXML
CodeTabelleAbschattungProxy ServerGanze ZahlHalbleiterspeicherROM <Informatik>Protokoll <Datenverarbeitungssystem>VektorraumFunktion <Mathematik>Virtuelle MaschineKeller <Informatik>InformationMessage-PassingPufferüberlaufComputersicherheitExogene VariableClientLeckPufferspeicherVersionsverwaltungNotepad-ComputerWeb logDatentypKonditionszahlCodeSpeicherabzugHalbleiterspeicherMessage-PassingLeckTabelleFunktionalPufferüberlaufFlächentheorieWeb logRPCSoftwareschwachstellePräkonditionierungAbfrageSchaltnetzTopologieKonstanteAbschattungGeradeSoftwaretestTelekommunikationInteraktives FernsehenTypentheorieAdressraumNavigierenVariableServerClientVersionsverwaltungResultanteSoftware EngineeringDatenstrukturProgrammbibliothekKeller <Informatik>Protokoll <Datenverarbeitungssystem>ComputeranimationBesprechung/Interview
StrebeGanze ZahlFunktionalMessage-PassingPufferüberlaufGeradeLokales MinimumCodeE-MailSoftwareschwachstelleTypentheorieProgrammfehlerInformationVariableHalbleiterspeicherPuffer <Netzplantechnik>Ganze ZahlBitGebundener ZustandDickeSchnittmengeResultanteProgrammierumgebungXML
Keller <Informatik>PufferspeicherDatentypExogene VariableCILGradientCodeGeradePufferüberlaufGanze ZahlLesen <Datenverarbeitung>Exogene VariableCompilerFunktionalMailing-ListeMessage-PassingResultanteOrdnung <Mathematik>Puffer <Netzplantechnik>DickeHalbleiterspeicherZahlenbereichServerClientKeller <Informatik>Vorzeichen <Mathematik>AuswahlverfahrenTypentheorieAutorisierungMakrobefehlSpeicherabzugXML
Funktion <Mathematik>BaumechanikCompilerVariablePufferspeicherKeller <Informatik>Operations ResearchGravitationsgesetzGüte der AnpassungPufferüberlaufProgrammOrtsoperatorPuffer <Netzplantechnik>Nichtlinearer OperatorFunktionalKeller <Informatik>VariableSpeicherverwaltungHalbleiterspeicherCodePolygonnetzCodierungDatenflussMereologieCookie <Internet>Computeranimation
GoogolExploitPufferüberlaufHalbleiterspeicherKontrollstrukturSpeicherverwaltungDickeSoftwareschwachstellePuffer <Netzplantechnik>Delisches ProblemMereologieFlächeninhaltLesen <Datenverarbeitung>TermersetzungssystemAggregatzustandGruppenoperationÜberlagerung <Mathematik>VariableSpeicherverwaltungHalbleiterspeicherSchlüsselverwaltungFunktionalEinfügungsdämpfungSpeicher <Informatik>TypentheorieSechseckGraphfärbungSchreiben <Datenverarbeitung>PufferüberlaufGarbentheorieComputeranimation
Funktion <Mathematik>Zeiger <Informatik>GoogolDatenstrukturDatenstrukturToken-RingPunktFunktionalZeiger <Informatik>SpeicherverwaltungTopologiePolarkoordinatenOffene MengeDefaultAdressraumEndliche ModelltheorieVariableTabelleAttributierte GrammatikComputeranimation
SpywareHydrostatikGoogolROM <Informatik>Operations ResearchPufferüberlaufOrdnung <Mathematik>SystemzusammenbruchTabelleHalbleiterspeicherNichtlinearer OperatorMathematische LogikFunktionalSpeicherverwaltungEinfügungsdämpfungCodeOffene MengePolarkoordinatenVariableKonditionszahlZeiger <Informatik>SpywareMAPComputeranimation
KontrollstrukturWurm <Informatik>SpeicherverwaltungGoogolTropfenTabelleDigital Rights ManagementAlgorithmusOperations ResearchGruppoidMathematische LogikFeasibility-StudieToken-RingDatenstrukturForcingHalbleiterspeicherWurm <Informatik>Endliche ModelltheorieCodeTabelleMultiplikationNabel <Mathematik>Nichtlinearer OperatorMathematikTropfenFunktionalComputeranimation
GoogolLeckROM <Informatik>AdressraumLeckAuswahlverfahrenSpeicherverwaltungAdressraumInformationNabel <Mathematik>Proxy ServerGarbentheorieCachingMailing-ListeGamecontrollerHalbleiterspeicherComputeranimation
GoogolRechenwerkSpeicherverwaltungStatistikBildschirmmaskeVakuumPrimzahlzwillingeEndliche ModelltheorieRechter WinkelAdressraumToken-RingDatenstrukturTouchscreenGeradeTabelleNabel <Mathematik>AuswahlverfahrenSpeicherverwaltungProgrammVariableCachingExploitSymboltabelleRechenwerkOffene MengeVolumenvisualisierungStichprobenumfangAggregatzustandComputeranimation
GoogolCodeCodep-BlockOpen SourceTouchscreenCodierungBildgebendes VerfahrenFunktionalNavigierenCachingResultanteURLNabel <Mathematik>E-Funktion
URLGoogolRPCTypentheorieInteraktives FernsehenSchnitt <Mathematik>LeckLokales NetzProzess <Informatik>Kartesische KoordinatenProtokoll <Datenverarbeitungssystem>E-FunktionLastGamecontrollerVektorraumGoogolApp <Programm>BenutzerbeteiligungMultiplikationsoperatorComputeranimationDiagramm
GoogolFahne <Mathematik>AbschattungOpen SourceTabelleDefaultGraphische BenutzeroberflächeGraphische BenutzeroberflächeTabelleKartesische KoordinatenSoftwareschwachstelleSoftwareOpen SourceFahne <Mathematik>RouterLokales NetzAbschattungDefaultURLGoogolDifferenz <Mathematik>Güte der AnpassungTotal <Mathematik>StapeldateiSoftwarewartungVerkehrsinformationComputeranimation
ComputersicherheitWeb-SeiteFacebookIntelProdukt <Mathematik>CodeROM <Informatik>Ein-AusgabeSupremum <Mathematik>EindringerkennungMechanismus-Design-TheorieProgrammbibliothekSoftwaretestProgrammbibliothekComputersicherheitTopologieSoftwareschwachstelleUmwandlungsenthalpieEinsSoftwaretestFacebookDifferentePhysikalisches SystemProgrammMechanismus-Design-TheorieMessage-PassingMultiplikationsoperatorComputeranimationXML
Transkript: Englisch(automatisch erzeugt)
These gentlemen have come all the way from China to talk to you guys about breaking Google Home and exploiting it with SQLite. Let's give them a gigantic round of applause. Have a great time. Smile, I'm gonna take pictures. Have fun. Thank you. Hello everyone. Thank
you for coming. We are very excited to share our search at DevCon 27. The title of our talk today is Breaking Google Home, Exploit it with Soil and Imagine and Vulnerability. First, let me introduce my teammates and myself. We are senior security research at
Tensorplay team and this is my teammate Chen Yunxiang. Now he is focusing on brother security and IoT security and this is Niu Xiam. He is focusing on mobile security and IoT security and my name is Wu Hee. I'm a bug hunter and a ping pong runner. I also
speak of uh DevCon and POC. Next, I will introduce the Tensorplay team. Our team was funded by Tensor security platform department at 2017 and now we are focusing on the
security research in areas such as AI, IoT devices, mobile devices, cloud and blockchain. In the past uh years, we have reported more than 200 security vulnerabilities to many companies such as Google, Apple, Amazon, Microsoft and so on. Last year, we
shared how to break Amazon echo at the DevCon 26 so come again, so we come again this year. And you can connect us at blade.tenson.com. Next, let's take a brief look at the
outline. First, we will introduce the attack surface of Google Home smart speaker. Then, we will share the details on how to find and explore satellite and the curve. Finally, we will
summarize our research. Okay, let's start with the first part. Smart speaker are the most popular smart home devices of the past few years. Amazon, Google and some Chinese companies are the main player in this field. In the fourth quarter of 2018, Amazon and
Google, after we shared uh after we shared how to break Amazon echo and Xiaomi AI speaker in DevCon 26, we began to study the security of Google Home smart speaker. The Google Home
family include 4 devices, all of which have similar hardware. We choose the best selling Google Home Mini as the main tester devices. The first part is about hardware
analysis. We found that the Google Home Mini used the one way CPU and the TOSI bus flash chip but we did not did not find any debugging and flashing interface. So, we can only choose to extract the firmware directly from the flash chip. Similar to the Amazon
echo, we first use a heat gun to solder the chip from the board. By aligning the dead sheet of the chip, we find the test circuit of BGA67 chip. And the difference is that
the pins of BGA67 chip are very thin. So, we have not found the adapter that can connect the test circuit to the programmer. So, we designed a new adapter. The main function is to export the pins of the test circuit to a notch pitch. The pins are
so that we can easily connect the chip to the programmer. And this is the finished product that we finally produce it. We connect it to the RT908H programmer which is a universal programmer that supports reading and writing most of flash chips. Finally, we
got the RAM image data in Google Home's uh flash chip. We also needed to pass the OOB data and the ECC trick piece according to the specification in the dead sheet. And
the extract the company system firmware. By aligning the system first, you can know that Google Home is using a net Chromium OS. The main, the main function are implemented by the Chromium OS, by the Chromium browser. And the update speed will
be a-a little slower than the Chromium browser. Okay, my part ends here. And, and my teammate Ni Yu Xiang will continue to share the next part. Uh, thanks for your
introductions. Next, uh, let's introduce the security overviews of Google Home. Uh, firstly, let's look at the security overviews of Google Home. On the OTI mechanisms, the firmware-related resource of Google Home is open to public. This resource include
bootloader kernels and related binaries programs and some even has samples. Google Home uses the HTTP request to download the firmware. We can also simulate the request for device update. The latest OTI package can be obtained by the curse command in
the pictures, uh, below. So, we can easy to gather firmware and then try to analyze the firmware. Um, through the analyze of firmware and related resource, we believe that the
security mechanism adopt by Google Home is worth learning. About LANs, enabling security boot on IoT devices in, is a good example. The bootloader, boot imager, system imager is protected by the security mechanism throughout the boot process. The details as follows. The bootloader and boot imager use the sense nectures methods and, uh,
in place with SHAs and ISAs nectures. The bootloader seen that there is no logic to provide unlocking. Uh, in addictions, Google Home also pro, uh, profound, uh, integrities, uh, veri, verifications on system image. Uh, let's look at the, uh, main
programs in the firmware. The firmware has, uh, memory directories as shown in these pictures. That's contain the main program called cut shell. The program just like Chrome, so it's program is protected by sandbox. On Chrome OS, the sandbox
mechanisms mainly includes that ready, uh, UNN space and sitcom BPF. In addictions, the system also enable ASLRs and the cut shells also add annex and, uh, uh, uh, uh, stack galleries. Next, we will introduce the attack surface on Google Homes. Combined with
existing security research and our attack things, Google Homes, uh, attack surface include the following, uh, four aspects. Go, Google Home has multiple, multiple parts, uh, port opens. One of the port is the A0A0A. It's an HTTP service. Uh, we
can control some basic operations of Google Homes through these ports in the land. There is also a port of A0009. The port is the target of our attacks using the CAD protocol. We will destroy in the following sections. And the wireless protocol is also an attack surface. Google Home used a mobile chip. Some idea about mobile Wi-Fi and VRE firmware
attack can be tried. It is also possible to try to, uh, find, uh, vulnerabilities of the boot loaders and let it load malicious firmware. Finally, we can try to find another, uh, other, uh, hardware interface. In these sections, we will show you how to extend the
attack surface of Google Homes. First, let's introduce the basic knowledge about the CAD protocol. Uh, Google allows developers to develop CAD APIs and publish it to every store. In general, the CAD APIs include senders and receivers. Sender devices may be
mobile devices or PC running on Chrome. Uh, receiver is, uh, Google's IoT devices such as Google Home. The entire architecture is as follows. The user assess the sender application URL and the sender application use the CAD protocol to find the
receivers in the LAN. When the receiver, uh, is discarded, the sender application will communicate directly with the URLs, uh, with the, uh, reader applications on the receivers with the CAD protocol. Uh, in detail, the Google Homes will prove the URL of each
receiver application according to the CAD IP ID and accept the receiver application through the Chrome renders. After our attempt, we found that, uh, CAD protocol will have the following, uh, security, uh, security risk including the CAD IP can be any web page. The CAD IP is the IP store may be malicious. Uh, and, uh, senders can select the
directly triggers, uh, CAD protocol which may even require no user interaction. Based on this, uh, this security risk, we can govern an attack on our Chrome, uh, Google Home into an attack on our browser. Let's take a look at some special states. The attackers is
registered as the CAD developers. CAD application can be developed and distributed. When you publish an application, you need to speak safe, uh, CAD receiver URL. However, Google does not audio link, uh, CAD IPPs. Then we can specific it as a web page in any
context. Remotely trigger the Google Home to accept any web page. If, if the attackers and Google Homes are in the, in the land, the attackers can also send a CAD protocol such as the launch IPPs request. This request view directly triggers Google Home accept to the CAD receiver URL. To make matters worse, if the routers in the victims
house, homes, uh, turn on the UPnP port forwarding, the attacker can also complete a remote sign attacks on the internet. The attackers modify the CAD receiver URL web page to a malicious, uh, page. Land Google Homes may assist in vendors after visiting the
page. So, now we only need to, uh, Chrome assist vulnerability to exploit Google Homes. Now, Wenjian Chen will introduce, uh, Macros and other vulnerabilities. Um, okay, thank you
for, uh, the introduction. Now, I will continue with, uh, part 3. Um, fuzzing and, uh, manual auditing, circuit lights and lab curve. Uh, first, why do I audited these two libraries? Um, because third part libraries are always sweet. They have less code and, uh,
focused functions. And almost every device has them installed. And the most important thing is Google Home or Google Chrome are using them too. Uh, before introducing the code audit part, I would like to mention some previous researches. Uh, first, Michael
Zavitsky's fuzzing has significantly improved the, uh, circuit lights quality. And then there's a talk on black hat in 2017, which also explains the idea of exploiting circuit lights. Uh, after that, there doesn't seem to be a lot of news about the
vulnerabilities of circuit lights, but we have found some. In the next part, we will introduce the code auditing and the exploiting of Magellan, which is a set of vulnerabilities in circuit lights. And Diaz, which is a set of vulnerabilities, vulnerabilities in lab curve. The Chromium project come with a father for circuit
lights. Uh, we have made some simple changes to it, uh, such as adding some text-based fuzz. When we look back, we found that there are, uh, was a lot of crash files generated. However, these test cases can only trigger empty pointer dereferencing. One of
these test crashes is caused by duplicate primary keys. And when I was bugging, I typed the first three create table statements to see what was going on in memory. However, I surprised to find that the dot tables command shows six tables. The question is, uh, what's
those content secdr segments stand for? The circuit light manual shows that the tables are called shadow tables. There are five types of shadow tables. Content secdr segments are for FTS 3 or 4. And state and doc size are FTS 4 only. However, because of those
tables are treated like standard tables, you can create corresponding state and doc size table even you are operating on an FTS 3 table. Uh, you can create state and doc size by simple, uh, by simple create a table statement because the circuit light itself is doing
this too. And FTS 3 and 4 is sharing some code which means state and doc size might change the code flow in some conditions. For example, one of our exploits are simulating an FTS 4 table on FTS 3 environment. Uh, this is useful because some software
like Chromium use only FTS 3 and explicitly disabled FTS 4. This would extend the attack surface by entering some code branch that should never be entered. The shadow table is used as a container to store the contents of the full text search metadata. What is
shown on this slide is the definition and meaning of each shadow table. We can see that almost every shadow table has a field of type blob. That's because to support full text queries, FTS maintains an inverted index that maps from each unique term or word that appears in the data set to the loc- locations in which it appears within the table
contents. It is complicated but all we know is that compared to other fields, those blobs may have some important influence on FTS queries. In Circulite, the raw binary data is typically represented in the form of X, single quotation mark and hexadecimal
numbers. However, the blobs here are binary data to represent the entire B-tree. Since it represents such a complex structure, is it possible to create a memory corruption vulnerability by destroying the data of the structure? Let's read about the documents of the serialized data structure first. You can check the Circulite manual to
easily get the definition. I will show you a simplified version so you can understand what I'm modifying when I'm trying to exploit them. Basically, I'm modifying the bytes with the different functional sections to mislead the code flow. The first segment B-tree
leaves nodes. The first term stored on each node, which is term one in the figure above, is the stored verbatim. Each subsequent term is prefix compressed with respect to its predecessor. In the real nodes, non-leaf nodes have different structure. And then the
doclist format. A doclist consists of an array of 64 bit signed integers, serialized using the FTS var int format. Each doclist entry is made up of a series of two or more integers as follows. One the docid value and two the zero or more term offset list. In
general, those blobs are just serialized B-tree data. When the Circulite wants to perform operations on those tables, it will simply deserialize or parse those blobs and get a complete B-tree. Then I have found some problems. The problems are mainly treated to merge and match because they are deeply related to the B-tree. Two of them merge the node of
the tree and other is to traverse the nodes of the tree to try to find the match of the content. Also, the last one is the crash I have mentioned before. It was that brought this series of problems into my attention. And software must enable FTS3 support and
support external circle query to trigger these problems. Okay, the first one and two oh three four six, which is also the main vulnerability we use later to exploit Google Home. It requires a lot of complex preconditions, that is we have to carefully construct a lot of tables and content. But once the preconditions are met,
vulnerability explosion will be very simple and stable. The vulnerability is located in the function FTS3 append to node. It can be triggered with a special semantic, the merge equals one two, which means the level to be merged. As you can see, this
function will try to append a node to another. The node is stored in the blob, so this function and other function will first parse in the B-tree and then get the start position and the length of binary data of the node that will be processed. And last, perform the memory copy operation to copy them into a new blob that represents a new
tree. Okay, let's go to this caller function, uh, turnkey node. It will get the binary offset and learns from the blob data that will describe the node being processed. Then the node information is returned in our reader object, passed to the vulnerable, uh, uh, FTS3 append to node. To control the memory copy in append to node, we need to
control a ADOC list and a NDOC list, which is returned from node reader next. The ADOC list is the source of the char pointer to the blob data and NDOC list is a node size, which are second and third parameter of memory copy, respectively. To control them
is not a difficult thing. Let's read the code, then you will know why I'm saying that it's easy. To save the space of storing an integer, CircleLite uses a variant integer algorithm. You can just consider fs get variant 32 as a function to convert a bunch of
bytes into an integer. It will store the result in N suffix, then it move the current cursor by adding the content of bytes and re-read it to eye off. The data for a node is stored as a length following by corresponding data with exactly size of length. Normally they should appear in pairs, but we can modify the blob to make the end of the
blob boundary has only the length field but no data field. Okay, let's go to the append to node. Since, uh, in the last step ADOC list and NDOC list is controlled, we can now overflow the buffer of P node A in line 3 1 0. Or we can copy some raw memory
data to it as long as it does not exceed the aligned value. Then we can query the new table to get the leaked raw memory. By setting up adjacent tables, we can overflow the function pointers of the table very uh accurately to exploit a code execution. And here's
another one, uh 506 in functions to get into real node and the precondition of this one is rather simpler. All you need to do is to modify the shadow table, set a node in secdr to non root node. You can change the blob data to change the code flow. Query the modified table by keyword match, then the code will scan every node inside the B tree.
Then the code will trigger memory corruption because it has many constrained conditions. It was considered to be very hard to exploit. Um, but this one is, is, is possible anyway. Uh, you can check the wonderful write up by a Korean researcher named Anki Chen. And last, uh 2 0 0 5 0 5. This one is very like to a combination of the
previous two. The vulnerable function is secdr next. You can modify the shadow table and mislead the code flow. All these three vulnerabilities can be modified to leak raw memories. So we can also use this to leak address of for example functions, structures,
global variables, constant variables to bypass the ASLR. And here's another one, lab core. Um, our target, our target is a remote code execution but the lab core has already been used by a lot of users and their code iterates very quickly too. To find a
vulnerable function, here are some guidelines for finding problems by reading the code quickly. The first, find the big functions. Most functions with a lot of lines is not recommended in software engineering and functions that are too long should be refactored into shorter function fragments. Usually such a large function is difficult to test and
there will be a lot of attack surface. And most of the functions enabled in lab core is related to remote interactions and communicates with the remote server more than once. After carefully sifting through the protocols, we confirm that NTLM over HTTP was what we wanted to test. And here are those problems we have found in lab core. We named them as
DS, uh, name of another famous navigator. The first one, um, 890 is a vulnerability in NTLM type 2 message. It can leak at most 16 4 kilobytes client memory per request to
attacker. The result is very light to the heart bleed but is the client version. And the second one, 3822 is a vulnerability in type 3 message. It will result in a stuck buffer overflow. Lab core also wrote this in his blog and saw this very bad security issue. Ok, let me show you how this happened. The first one, the vulnerable
function is in decoder type 2 target. It reads 32 bit integer from the type 2 message header. Then we know we can set target info offset with a larger value. And target info length to a crafted value which if you add them together, an integer overflow will
happen. The overflow result is very small and will pass the check in line 185. And next, memory copy will copy data out of bounds. For example, if we use the value above, it will actually copies data from the front of variable buffer in 32 bit environment. And then
the data will be sent to the attacker in type 3 message, leaking maximum, uh, 64 kilobytes data per request to the attacker. And let's go to 3822. This vulnerability is located in a big function named core auth create an NTLM type 3 message. In the beginning, this
function declares a lot of variable on stack memory. The NTLM buffer is a big buffer which has around, uh, uh, 4 kilobytes memory. Then the function tries to read the anti-response length from the type 2 response which is sent from the server. Attack could return a value bigger than the buffer size to client. And next, in line 779, this
check should check if the size of the data is bigger than NTLM buffs remaining size. But the in-explete sign unsigned cast prevents the check from operating correctly. This check compares two unsigned variable and a macro NTLM buff size which simply defines a
number 1024. But this value is a signed integer in the view of compiler. When unsigned and, and signed are compared in the same place, some of them must be casted in order to compare correctly. And this is a problem. The compiler prefers to convert signed to
unsigned numbers. So if we have anti-response length greater than the NTLM buff size, the result will be a large unsigned number. And it is of course bigger than the remaining size. We'll pass a check. In line 781, because anti-response length is bigger than the
remaining size of NTLM buff, hence here will be a stack buffer overflow. When the code triggers a stack buffer overflow, the overflow variant is in the middle of a lot of stack variables. Although the program may have stack cookies, an attacker could choose not to
overflow that mesh bytes, but instead override stack variants and control the flow of the code. I am marked the position where the, where it triggers the buffer overflow. You can see in this big function, there are, there are almost 18 lines after it. And many of them are operating heap or stack memory and the operating is based on the value of those stack
variables. That's the reason why I say big function is never a good coding practice. Okay, my part is done. And uh, Li-Xiang will go ahead to introduce how to exploit. Uh, thank you
for my partner's introductions. Now, uh, let's review the following, uh, vulnerabilities. The keys to the vulnerability trigger is how to use the insert state to control the variables used by our memory, memory copy function in group PN, uh, P node A, P node
N, and A double X, N double X. The insert data is as follow. The insert data is as first, the entire data is stored in the buffer of P node A. Uh, we can control the size of the P node A buffers by modifying the length of the insert state. Uh, in heap functions, we
are able to allow P node A to the appreciate areas to cover the, uh, target memory. In this state, uh, the all injury callers in that, indicate that the size of P node N and P, uh, N double X, which is, we are in type. N double X is used to control the length to be
overflow. Uh, P node N, which is the offsets of the right, overwriting memory areas. The green part is the A, A double X status, which can be used for our read or rewrite.
The next sessions, uh, we will, we will introduce the ideas of using these vulnerabilities. We expect, expect to find, uh, uh, function pointers that can be used on the heap. When creating our FTS3 tables, the tokenizer is created by default. And the
tokenizer default is simple tokenizers. Uh, as shown in, uh, following pictures, simple tokenizer is a structures on the heap where is, uh, members base points to the SQL trees tokenizer structures. The members P models or the SQL trees tokenizer
structure points to the tokenizer models. The tokenizer models contain the same interesting function, uh, callback function, such as the X create, X opens. Among that, when inserting the FTS3 tables, the X open callback functions will be
triggers. Uh, if a function address of X opens can be modified to the, uh, attribute, expertise address, the PCs can be hijacked. Uh, how to use the, uh, variables functions, pointers for PC hijacking? Uh, here's two conditions need to be
met. The first, after his overflow is necessary to be able to operate the FTS3 table. In order to be complete before the memory is released, otherwise the crash will be
interrupt. By analyzing the logical, uh, memory copy to freeze, we find an interesting function, uh, which perform, uh, uh, SQL update operation before re-releasing the memory, as shown in the, the blue text code. Finally, we use the SQL triggers to
perform the FTS3 table insert operation before the SQL update operations and free memories. Since, uh, triggering the X open callback functions so that the PCs can be hijacked. The next step is to make a memory, uh, layout. The SQL logical of the
castle shell use TMLock, a feasible memory layout idea as follows. The first, by creating a multiple, first, uh, FTS3 tables, we will create a multi, multiple simple
tokenizer structures. Drop the previous, uh, created FTS3 tables at a appreciated time, uh, the simple tokenizer structures will be free. The, uh, resiling payloads of the same size as simple tokenizers, it, it has the high, uh, prob, probabilities
that payloads will be allowed to the previous release simple tokenizer structures. So, our payloads has a greater chance of writing the simple tokenizer structures of existing FTS3 tables. With, uh, SQL triggers that perform the operations of FTS3 tables
before the free, that is a chance that the tokenizer model callback functions, uh, will be triggers to hijack the PC. Uh, when we have the ability to hijack the PCs and control the R0 registers, we only need to be able to list information and bypass ASLRs.
The previous sections, uh, uh, also introduced, uh, we can try to, uh, adjust the, the underlist P node A and list memory after heap. We need to disclose the following 2 types of address. Leaking the address of cache shells based on, uh, based on this address and
offsets, calculate the required ROP guidance. Uh, leading the address of the last heap, according to this address and offsets, the probabilities of calculating the address of the heap's spread. The latest is the heap's spread and ROPs. After these 3 steps, we can
ask this in Google Home's renders. Uh, cache shell is, uh, large binary program that contains many of the, uh, available ROP guidance. So, the ROP guidance used cache shell is
more stable and convenient. In the, uh, in the pictures on the right, the realized, uh, marks, the red lines mark the heap's spread units which face tokenizer models and ROP guidance. The X create, X open address in the face tokenizer model structures will be aside
the state pivot address. The blue lines marks our face symbol structure, uh, tokenizer structures. When the FTS3 tables operate can be triggered. X create will be get a
magicians X open through the structures of sample tokenizers and then I see. Uh, above, uh, above is the screen source of our RC in cache shells. The red blocks on the left show that the register we can control. That, that they are R0, uh, 11. The function of
JET is read from the R11 and finally is go to BLX. Then, as a result, we have been able to hijack the PC. The image on the right, uh, show, show the result of our shell codes. We execute, uh, Java 3 codes for fetch URLs and, uh, navigators ABP name in the
exp.html code. Normally, uh, negoti- uh, navigators ABP name is read only and, uh, and is next skip but our shell codes change the ABP name to AA. Uh, let's look at some
actual attack sense. There are 3 types of attack vectors that attack Google Homes remotely. The first, the attacker is located in the LAN. The attacker send the launch
ABP ID 1 command through, uh, a cut protocol and Google Homes will prove the leak doc HTMLs on the application, application stop, AB stops according to the ABP ID and control it. At this time, the leak days can be obtained by the attackers. The second, the
attacker send the launch ABP ID 2 command, uh, Google Homes loads the exp.html, so that's the RCE happen. The entire process does not require URL interaction. In the other 2 sense, you don't need to be on the same, uh, on the same LANs to start the attacks. The
attacker inducts the victims to assess the URLs of the same application and we can scan the networks on the routers that, uh, if the router have the UPnP forwarding, try, uh, we can
try to launch remote, remote attacks on the internet. Conclusion. Here the, uh, here is the timelines of the maintenance. We have report LANs in, uh, November and is quickly fixed by SQLite and, uh, Chrome use. In the December, Google's decide to get us a
total 10,000 rewards for the batch of vulnerabilities. And they have, uh, uh, an, an LAN have, uh, in, enhancements, there is the defense in diff flag. This allowing modifying shadow tables from untrusted source. For backwards compatibility, is default
off in the SQLite. So, if you are using SQLite with FTS, you may want to enable this one up to prevent the attacker from the modifying your shadow table. But, uh, the good news is, is default on in, in Chrome from commit in the last November. Here is the, uh,
timelines of Dias. These quickly fixed and released by lab crews in 2 week. Uh, we also, uh, uh, also, we have, uh, not if the sensor to urge vendors to disable the
vulnerabilities, vulnerable FTS trees of that SQL before the patch come out. If they don't use these features. And, uh, we have not notified the security teams of Apple's
interest, Facebook's and Microsoft about how to fix the program and how to mitigate the phrase in the center of their products. Uh, the guidelines, the securities otherwise, the ones enhance your systems with the newest available defense in different mechanism in a time.
To keep your, uh, the, the third pass libraries up to date. Please improve the qualities of security auditing, auditing and testing of the third pass libraries. For, first introduce security specifications into the developments and testings. Thank you.