Home
%3CLINGO-SUB%20id%3D%22lingo-sub-224402%22%20slang%3D%22en-US%22%3EAdvanced%20hunting%20now%20includes%20network%20adapters%20information%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-224402%22%20slang%3D%22en-US%22%3E%3CP%3EWe%20would%20like%20to%20welcome%20a%20new%20table%20to%20the%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fwindows%2Fsecurity%2Fthreat-protection%2Fwindows-defender-atp%2Fadvanced-hunting-windows-defender-advanced-threat-protection%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3EWindows%20Defender%20ATP%20Advanced%20hunting%3C%2FA%3E%20schema%3A%20%3CSTRONG%3EMachineNetworkInfo%3C%2FSTRONG%3E.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EFor%20each%20network%20adapter%20seen%20on%20onboarded%20machines%2C%20this%20table%20provides%20the%20configured%20IP%20addresses%2C%20gateways%2C%20DNS%20servers%2C%20and%20more.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ESounds%20similar%20to%20%3CEM%3Eipconfig%3C%2FEM%3E%3F%20Well%2C%20this%20is%20actually%20the%20intention.%20The%20Windows%20Defender%20ATP%20sensor%20tracks%20this%20network%20configuration%20information%20on%20onboarded%20machines%20every%2015%20minutes.%20With%20this%20comprehensive%20and%20up-to-date%20view%20of%20the%20network%20status%20of%20your%20machines%2C%20you%20can%20just%20imagine%20all%20the%20cool%20stuff%20you%20can%20do%20and%20how%20this%20data%20can%20enrich%20your%20hunting%20activities.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EWhen%20you%E2%80%99re%20ready%2C%20let%E2%80%99s%20explore%20some%20simple%20examples%20of%20how%20you%20can%20use%20this%20new%20set%20of%20data.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId-1735239977%22%20id%3D%22toc-hId-1735239977%22%3EScenario%20%231%3A%20Get%20the%20IP%20addresses%20assigned%20to%20a%20machine%3C%2FH2%3E%0A%3CP%3EBy%20getting%20all%20the%20IP%20addresses%20used%20by%20a%20specific%20machine%20at%20a%20given%20point%20in%20time%2C%20you%20can%20pivot%20your%20investigations%20to%20firewall%2C%20IDS%20or%20network%20logs%2C%20which%20record%20events%20by%20IP%20address.%20This%20query%20returns%20all%20IP%20addresses%20reported%20from%20a%20specific%20computer%20within%20a%2030-minute%20period%3A%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3E%3CFONT%20color%3D%22%23800080%22%3EMachineNetworkInfo%3C%2FFONT%3E%0A%3CFONT%20color%3D%22%23008000%22%3E%2F%2F%20Query%20for%20reports%20sent%20%2B-15%20minutes%20around%20the%20time%20we%20are%20interested%20in%0A%3C%2FFONT%3E%7C%20%3CFONT%20color%3D%22%23FF6600%22%3Ewhere%3C%2FFONT%3E%20EventTime%20%3CFONT%20color%3D%22%230000FF%22%3Ebetween%3C%2FFONT%3E%20((%3CFONT%20color%3D%22%23800000%22%3Edatetime%3C%2FFONT%3E(2018-08-05T09%3A51)-15m)%20..%2030m)%0A%3CFONT%20color%3D%22%23008000%22%3E%2F%2F%20Filter%20by%20machine%20name%20and%20select%20only%20adapters%20that%20are%20enabled%20and%20connected%0A%3C%2FFONT%3E%3CFONT%20color%3D%22%23000000%22%3E%7C%20%3CFONT%20color%3D%22%23FF6600%22%3Ewhere%3C%2FFONT%3E%20ComputerName%20%3D%3D%20%3CFONT%20color%3D%22%23800000%22%3E%22somecomputer.corp.contoso.com%22%3C%2FFONT%3E%20%3CFONT%20color%3D%22%230000FF%22%3Eand%3C%2FFONT%3E%20NetworkAdapterStatus%20%3D%3D%20%3CFONT%20color%3D%22%23800000%22%3E%22Up%22%0A%3C%2FFONT%3E%3C%2FFONT%3E%3CFONT%20color%3D%22%23008000%22%3E%2F%2F%20IPAddresses%20contains%20a%20list%20of%20the%20IP%20addresses%20configured%20on%20the%20network%20adapter%2C%20their%20subnets%2C%20and%20more.%0A%2F%2F%20Here%20we%20expand%20the%20list%20so%20that%20each%20value%20gets%20a%20separate%20row.%20All%20the%20other%20columns%20in%20the%20row%2C%20such%20as%20ComputerName%2C%20are%20duplicated.%0A%3C%2FFONT%3E%3CFONT%20color%3D%22%23000000%22%3E%7C%20%3CFONT%20color%3D%22%23FF6600%22%3Emvexpand%3C%2FFONT%3E%20%3CFONT%20color%3D%22%23800000%22%3Eparse_json%3C%2FFONT%3E(IPAddresses)%0A%7C%20%3CFONT%20color%3D%22%23FF6600%22%3Eproject%20%3C%2FFONT%3EIPAddress%3DIPAddresses.IPAddress%2C%20AddressType%3DIPAddresses.AddressType%2C%20NetworkAdapterType%2C%20TunnelType%2C%20MacAddress%3C%2FFONT%3E%3C%2FPRE%3E%0A%3CP%3EThe%20results%20below%20show%20that%20the%20machine%20has%20two%20connected%20network%20adapters%3A%20a%20Wi-Fi%20adapter%20and%20a%20VPN%20tunnel.%20The%20Wi-Fi%20adapter%20has%20both%20an%20IPv4%20address%20and%20an%20IPv6%20address%20in%20this%20case.%20Note%20that%20the%20%3CEM%3EMacAddress%3C%2FEM%3E%20field%20is%20in%20a%20different%20format%20than%20what%20you%20see%20in%20%3CEM%3Eipconfig%3C%2FEM%3E%2C%20as%20it%20doesn%E2%80%99t%20contain%20colons%20(%3A).%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-left%22%20style%3D%22width%3A%20944px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F38990i7F7691C3D5812582%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22network%20adapters.png%22%20title%3D%22network%20adapters.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId--816916984%22%20id%3D%22toc-hId--816916984%22%3EScenario%20%232%3A%20%3CEM%3EWhere%20did%20the%20compromise%20happen%3F%3C%2FEM%3E%3C%2FH2%3E%0A%3CP%3EAfter%20you%20identify%20a%20compromised%20machine%2C%20you%20might%20wonder%20where%20the%20actual%20compromise%20occurred%2C%20particularly%20if%20the%20machine%20is%20mobile.%3CBR%20%2F%3E%3CEM%3EDid%20the%20compromise%20happen%20in%20your%20headquarters%20or%20in%20some%20remote%20branch%3F%3C%2FEM%3E%20%3CEM%3EDid%20the%20attack%20go%20through%20your%20perimeter%20defenses%20or%20was%20the%20machine%20infected%20off-premise%3F%3C%2FEM%3E%20%3CEM%3EWas%20the%20compromise%20done%20at%20the%20employee%E2%80%99s%20home%2C%20at%20a%20partner%20network%2C%20or%20when%20the%20employee%20connected%20to%20some%20airport%20Wi-Fi%3F%3C%2FEM%3E%20%3CEM%3EWas%20there%20perhaps%20an%20unfamiliar%20network%20configuration%20set%20on%20your%20corpnet-based%20servers%20and%20PCs%3F%3C%2FEM%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThis%20table%20includes%20multiple%20columns%20that%20could%20help%20you%20answer%20these%20questions.%20The%20simplest%20approach%26nbsp%3B%26nbsp%3B%20could%20be%20to%20check%20the%20%3CEM%3EConnectedNetworks%3C%2FEM%3E%20column%2C%20where%20you%20can%20see%20the%20names%20and%20descriptions%20of%20connected%20networks%2C%20that%20are%20typically%20provided%20by%20DHCP%20servers.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EHowever%2C%20this%20may%20not%20give%20you%20the%20info%20you%20need.%20Using%20the%20following%20query%20you%20can%20identify%20the%20relevant%20network%20segment%20in%20your%20organization%20by%20examining%20the%20configured%20DHCP%20servers%2C%20DNS%20servers%2C%20and%20default%20gateways.%20If%20you%20still%20don%E2%80%99t%20have%20an%20answer%2C%20search%26nbsp%3Bfor%20other%20machines%20seen%20with%20those%20settings%2C%20and%20then%20identify%20what%20is%20common%20between%20the%20machines.%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3E%3CFONT%20color%3D%22%23000000%22%3E%3CFONT%20color%3D%22%23800080%22%3EMachineNetworkInfo%3C%2FFONT%3E%0A%7C%20%3CFONT%20color%3D%22%23FF6600%22%3Ewhere%3C%2FFONT%3E%20EventTime%20%3CFONT%20color%3D%22%230000FF%22%3Ebetween%3C%2FFONT%3E%20((%3CFONT%20color%3D%22%23800000%22%3Edatetime%3C%2FFONT%3E(2018-08-05T09%3A51)-15m)%20..%2030m)%3C%2FFONT%3E%3CBR%20%2F%3E%3CFONT%20color%3D%22%23000000%22%3E%3CFONT%20color%3D%22%230000FF%22%3E%20%20%20%20%20%20%20%20and%3C%2FFONT%3E%20MachineId%20%3D%3D%20%3CFONT%20color%3D%22%23800000%22%3E%22c0bfefec0bfefec0bfefec0bfefec0bfefecafe%22%3C%2FFONT%3E%3C%2FFONT%3E%3CBR%20%2F%3E%3CFONT%20color%3D%22%23000000%22%3E%3CFONT%20color%3D%22%230000FF%22%3E%20%20%20%20%20%20%20%20and%3C%2FFONT%3E%20NetworkAdapterStatus%20%3D%3D%20%3CFONT%20color%3D%22%23800000%22%3E%22Up%22%3C%2FFONT%3E%3C%2FFONT%3E%3CBR%20%2F%3E%3CFONT%20color%3D%22%23000000%22%3E%7C%20%3CFONT%20color%3D%22%23FF6600%22%3Eproject%3C%2FFONT%3E%20ConnectedNetworks%2C%20DnsAddresses%2C%20DefaultGateways%2C%20IPv4Dhcp%2C%20IPv6Dhcp%2C%20NetworkAdapterType%0A%7C%20%3CFONT%20color%3D%22%23FF6600%22%3Edistinct%3C%2FFONT%3E%20*%3C%2FFONT%3E%26nbsp%3B%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId-925893351%22%20id%3D%22toc-hId-925893351%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-left%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F38992i216DD2DDBB880B0F%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22network%20settings.png%22%20title%3D%22network%20settings.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FH2%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId--1626263610%22%20id%3D%22toc-hId--1626263610%22%3EScenario%20%233%3A%20Identify%20the%20machine%20using%20an%20IP%20address%3C%2FH2%3E%0A%3CP%3EYou%20might%20want%20to%20pivot%20in%20another%20direction%20by%20starting%20with%20network%20setting%20information%2C%20specifically%20the%20IP%20address%2C%20to%20identify%20the%20machine%20involved%20in%20suspicious%20activity.%20For%20example%2C%20your%20IDS%20alerts%20you%20about%20some%20suspicious%20activity%20originating%20from%20an%20internal%20IP%20address%2C%20and%20you%20want%20to%20identify%20the%20machine%20using%20that%20IP%20address%20during%20the%20time%20of%20the%20reported%20activity.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ETo%20do%20this%2C%20all%20you%20need%20is%20a%20very%20simple%20query%3A%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3E%3CFONT%20color%3D%22%23800080%22%3EMachineNetworkInfo%3C%2FFONT%3E%0A%7C%20%3CFONT%20color%3D%22%23FF6600%22%3Ewhere%3C%2FFONT%3E%20EventTime%20%3CFONT%20color%3D%22%230000FF%22%3Ebetween%3C%2FFONT%3E%20((%3CFONT%20color%3D%22%23800000%22%3Edatetime%3C%2FFONT%3E(2018-08-05T09%3A51)-15m)%20..%2030m)%0A%20%20%20%20%20%20%20%20%3CFONT%20color%3D%22%230000FF%22%3Eand%3C%2FFONT%3E%20IPAddresses%20%3CFONT%20color%3D%22%230000FF%22%3Econtains%3C%2FFONT%3E%20%3CFONT%20color%3D%22%23800000%22%3E'%22192.168.1.5%22'%3C%2FFONT%3E%0A%20%20%20%20%20%20%20%20%3CFONT%20color%3D%22%230000FF%22%3Eand%3C%2FFONT%3E%20NetworkAdapterStatus%20%3D%3D%20%3CFONT%20color%3D%22%23800000%22%3E%22Up%22%3C%2FFONT%3E%0A%7C%20%3CFONT%20color%3D%22%23FF6600%22%3Eproject%3C%2FFONT%3E%20ComputerName%2C%20EventTime%2C%20IPAddresses%3C%2FPRE%3E%0A%3CP%3ENote%20that%20we%20wrap%20the%20IP%20address%20in%20quotes%20in%20our%20filter%2C%20to%20avoid%20matching%20events%20with%20other%20IP%20addresses%20that%20have%20the%20same%20initial%20or%20trailing%20as%20the%20address%20we%20are%20looking%20for.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIt%20also%20helps%20to%20include%20additional%20filters%20in%20the%20query%20that%20identify%20the%20network%2C%20avoiding%20matching%20machines%20with%20the%20same%20IP%20address%20but%20on%20a%20different%20network.%20To%20do%20this%2C%20use%20the%20description%20provided%20in%20the%20%3CEM%3EConnectedNetworks%3C%2FEM%3E%20column%20described%20earlier%20or%20use%20the%20corresponding%20DHCP%20server%20address.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId-116546725%22%20id%3D%22toc-hId-116546725%22%3EScenario%20%234%3A%20Amped%20up%20query%3C%2FH2%3E%0A%3CP%3ELet%E2%80%99s%20take%20the%20simple%20query%20we%20had%20in%20scenario%20%233%20and%20amp%20it%20up.%20The%20first%20thing%20we%20do%20is%20add%20parameters%20to%20our%20query%20so%20that%20it%E2%80%99s%20easy%20for%20different%20people%20in%20your%20team%20to%20use%20it%20over%20long%20periods%20of%20time.%20With%20every%20run%2C%20they%20can%20use%20different%20parameters.%20The%20second%20change%20is%20that%20in%20addition%20to%20getting%20the%20machine%20name%2C%20we%20also%20query%20for%20the%20users%20that%20were%20logged%20on%20to%20that%20machine%20during%20the%20specified%20time%20period.%3C%2FP%3E%0A%3CPRE%3E%3CFONT%20color%3D%22%230000FF%22%3Elet%3C%2FFONT%3E%20%3CFONT%20color%3D%22%23000000%22%3EpivotTime%20%3D%20%3CFONT%20color%3D%22%23800000%22%3Edatetime%3C%2FFONT%3E(2018-08-05%2009%3A51%3A00)%3B%3C%2FFONT%3E%0A%3CFONT%20color%3D%22%230000FF%22%3Elet%3C%2FFONT%3E%20%3CFONT%20color%3D%22%23000000%22%3EipAddress%20%3D%20%3CFONT%20color%3D%22%23800000%22%3E%22192.168.1.5%22%3C%2FFONT%3E%3B%3C%2FFONT%3E%0A%3CFONT%20color%3D%22%230000FF%22%3Elet%3C%2FFONT%3E%20%3CFONT%20color%3D%22%23000000%22%3EmatchingMachines%20%3D%0A%20%20%20%20%3CFONT%20color%3D%22%23800080%22%3EMachineNetworkInfo%3CBR%20%2F%3E%3CFONT%20color%3D%22%23000000%22%3E%20%20%20%20%7C%20%3CFONT%20color%3D%22%23FF6600%22%3Ewhere%3C%2FFONT%3E%20EventTime%20%3CFONT%20color%3D%22%230000FF%22%3Ebetween%3C%2FFONT%3E%20((pivotTime-15m)%20..30m)%3C%2FFONT%3E%3CBR%20%2F%3E%3CFONT%20color%3D%22%23000000%22%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%3CFONT%20color%3D%22%230000FF%22%3Eand%3C%2FFONT%3E%20IPAddresses%20%3CFONT%20color%3D%22%230000FF%22%3Econtains%3C%2FFONT%3E%20%3CFONT%20color%3D%22%23800000%22%3Estrcat%3C%2FFONT%3E(%3CFONT%20color%3D%22%23800000%22%3E%22%5C%22%22%3C%2FFONT%3E%2C%20ipAddress%2C%20%3CFONT%20color%3D%22%23800000%22%3E%22%5C%22%22%3C%2FFONT%3E)%3C%2FFONT%3E%3CBR%20%2F%3E%3CFONT%20color%3D%22%23000000%22%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%3CFONT%20color%3D%22%230000FF%22%3Eand%3C%2FFONT%3E%20NetworkAdapterStatus%20%3D%3D%20%3CFONT%20color%3D%22%23800000%22%3E%22Up%22%0A%3C%2FFONT%3E%3C%2FFONT%3E%3C%2FFONT%3E%3C%2FFONT%3E%3CFONT%20color%3D%22%23000000%22%3E%20%20%20%20%7C%3C%2FFONT%3E%20%3CFONT%20color%3D%22%23FF6600%22%3Eproject%3C%2FFONT%3E%20%3CFONT%20color%3D%22%23000000%22%3EComputerName%2C%20EventTime%2C%20IPAddresses%2C%20%3CBR%20%2F%3E%20%20%20%20%20%20%20%20%20%20%20%20%20%20TimeDifference%3D%3CFONT%20color%3D%22%23800000%22%3Eabs%3C%2FFONT%3E(EventTime-pivotTime)%3B%0A%3CFONT%20color%3D%22%23800080%22%3EMachineInfo%3C%2FFONT%3E%3C%2FFONT%3E%0A%3CFONT%20color%3D%22%23000000%22%3E%7C%3C%2FFONT%3E%20%3CFONT%20color%3D%22%23FF6600%22%3Ewhere%3C%2FFONT%3E%20EventTime%20%3CFONT%20color%3D%22%230000FF%22%3Ebetween%3C%2FFONT%3E%20%3CFONT%20color%3D%22%23000000%22%3E((pivotTime-15m)%20..30m)%0A%7C%3C%2FFONT%3E%20%3CFONT%20color%3D%22%23FF6600%22%3Eproject%3C%2FFONT%3E%20%3CFONT%20color%3D%22%23000000%22%3EComputerName%2C%20EventTime%2C%20LoggedOnUsers%0A%7C%3C%2FFONT%3E%20%3CFONT%20color%3D%22%23FF6600%22%3Ejoin%3C%2FFONT%3E%20%3CFONT%20color%3D%22%230000FF%22%3Ekind%3C%2FFONT%3E%3D%3CFONT%20color%3D%22%230000FF%22%3Einner%3C%2FFONT%3E%20%3CFONT%20color%3D%22%23000000%22%3E(matchingMachines)%3C%2FFONT%3E%20%3CFONT%20color%3D%22%230000FF%22%3Eon%3C%2FFONT%3E%20%3CFONT%20color%3D%22%23000000%22%3EComputerName%2C%20EventTime%0A%7C%3C%2FFONT%3E%20%3CFONT%20color%3D%22%23FF6600%22%3Eproject%3C%2FFONT%3E%20%3CFONT%20color%3D%22%23000000%22%3EEventTime%2C%20ComputerName%2C%20LoggedOnUsers%2C%20TimeDifference%2C%20IPAddresses%3C%2FFONT%3E%0A%3CFONT%20color%3D%22%23008000%22%3E%2F%2F%20In%20case%20multiple%20machines%20have%20reported%20from%20that%20IP%20address%20arround%20that%20time%2C%20start%20with%20the%20ones%20reporting%20closest%20to%20pivotTime%3C%2FFONT%3E%0A%3CFONT%20color%3D%22%23000000%22%3E%7C%3C%2FFONT%3E%20%3CFONT%20color%3D%22%23FF6600%22%3Esort%3C%2FFONT%3E%20%3CFONT%20color%3D%22%230000FF%22%3Eby%3C%2FFONT%3E%20%3CFONT%20color%3D%22%23000000%22%3ETimeDifference%3C%2FFONT%3E%20%3CFONT%20color%3D%22%230000FF%22%3Easc%3C%2FFONT%3E%26nbsp%3B%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId-1859357060%22%20id%3D%22toc-hId-1859357060%22%3EBonus%20scenario%3A%20Querying%20for%20the%20public%20IP%20of%20a%20machine%3C%2FH2%3E%0A%3CP%3EThe%20%3CEM%3EMachineNetworkInfo%3C%2FEM%3E%20table%20includes%20the%20IP%20addresses%20configured%20for%20use%20by%20a%20machine.%20It%20is%20common%2C%20however%2C%20for%20a%20machine%20to%20access%20the%20internet%20through%20a%20different%20IP%20address%20by%20way%20of%20a%20proxy%20or%20a%20NAT.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIn%20any%20of%20the%20scenarios%20we%E2%80%99ve%20described%2C%20you%20might%20actually%20want%20to%20query%20for%20this%20public%20IP%20address%2C%20instead%20of%20the%20local%20IP%20address%20assigned%20to%20the%20machine%20itself.%20This%20can%20be%20necessary%20if%20a%20cloud%20service%20has%20notified%20you%20of%20suspicious%20access%20from%20some%20IP%20address%2C%20or%20if%20your%20national%20CERT%20has%20identified%20some%20suspicious%20activity%20originating%20from%20your%20network.%20This%20could%20also%20be%20useful%20if%20you%20want%20to%20do%20a%20reverse%20IP%20lookup%20for%20a%20certain%20machine%2C%20identifying%20its%20geo-location%20or%20the%20network%20from%20which%20it%20is%20reporting.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ESimply%20query%20for%20the%20%3CEM%3EPublicIP%3C%2FEM%3E%20column%20in%20the%20%3CEM%3EMachineInfo%3C%2FEM%3E%20table%20(note%20the%20difference%20between%20MachineNetworkInfo%20and%20MachineInfo).%20This%20column%20includes%20the%20IP%20address%20that%20is%20communicating%20with%20Windows%20Defender%20ATP%20cloud%20when%20the%20sensor%20sends%20data.%3C%2FP%3E%0A%3CPRE%3E%3CFONT%20color%3D%22%23800080%22%3EMachineInfo%3C%2FFONT%3E%0A%3CFONT%20color%3D%22%23000000%22%3E%7C%20%3CFONT%20color%3D%22%23FF6600%22%3Ewhere%3C%2FFONT%3E%20EventTime%20%3CFONT%20color%3D%22%230000FF%22%3Ebetween%3C%2FFONT%3E%20((%3CFONT%20color%3D%22%23800000%22%3Edatetime%3C%2FFONT%3E(2018-07-15T19%3A51)-15m)%20..%2030m)%20%0A%20%20%20%20%20%20%20%20%3CFONT%20color%3D%22%230000FF%22%3Eand%3C%2FFONT%3E%20MachineId%20%3D%3D%20%3CFONT%20color%3D%22%23800000%22%3E%22c0bfefec0bfefec0bfefec0bfefec0bfefecafe%22%3C%2FFONT%3E%0A%7C%20%3CFONT%20color%3D%22%23FF6600%22%3Eproject%3C%2FFONT%3E%20PublicIP%2C%20LoggedOnUsers%2C%20EventTime%3C%2FFONT%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3BIf%20you%20prefer%20to%20run%20this%20query%20as%20part%20of%20the%20above%20queries%2C%20try%20to%20%3CSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fkusto.azurewebsites.net%2Fdocs%2FqueryLanguage%2Fquery_language_unionoperator.html%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3Eunion%3C%2FA%3E%3C%2FSPAN%3E%20the%20results%20together.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId--692799901%22%20id%3D%22toc-hId--692799901%22%3EMore%20fun.%3C%2FH2%3E%0A%3CP%3EOur%20GitHub%20repository%20includes%20related%20sample%20queries%20such%20as%20%3CSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2FMicrosoft%2FWindowsDefenderATP-Hunting-Queries%2Fblob%2Fmaster%2FGeneral%2520queries%2FMachine%2520info%2520from%2520IP%2520address.txt%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3EMachine%20info%20from%20IP%20address%3C%2FA%3E%3C%2FSPAN%3E%20and%20%3CSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2FMicrosoft%2FWindowsDefenderATP-Hunting-Queries%2Fblob%2Fmaster%2FGeneral%2520queries%2FNetwork%2520info%2520of%2520machine.txt%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3ENetwork%20info%20of%20machine%3C%2FA%3E%3C%2FSPAN%3E.%20If%20you%20have%20an%20interesting%20query%20to%20share%2C%20the%20%3CSPAN%3E%3CA%20href%3D%22http%3A%2F%2Fgithub.com%2FMicrosoft%2FwindowsDefenderATP-Hunting-Queries%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3EGitHub%20repository%20for%20Advanced%20hunting%20queries%3C%2FA%3E%3C%2FSPAN%3E%20is%20your%20friend.%20%3Asmiling_face_with_smiling_eyes%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ETo%20go%20back%20to%20the%20basics%20of%20advanced%20hunting%2C%20take%20a%20look%20at%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fwindows%2Fsecurity%2Fthreat-protection%2Fwindows-defender-atp%2Fadvanced-hunting-windows-defender-advanced-threat-protection%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ethis%20documentation%3C%2FA%3E%20or%20at%20our%20recent%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2FWhat-s-New%2FGetting-Started-with-Windows-Defender-ATP-Advanced-Hunting%2Fm-p%2F215835%23M66%22%20target%3D%22_blank%22%20rel%3D%22noopener%22%3Etutorial%3C%2FA%3E.%20To%20learn%20more%20about%20the%20Kusto%20Query%20Language%2C%20read%20%3CA%20href%3D%22https%3A%2F%2Fdocs.loganalytics.io%2Fdocs%2FLanguage-Reference%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ethe%20documentation%3C%2FA%3E%20or%20watch%20this%20new%20%3CA%20href%3D%22https%3A%2F%2Fwww.pluralsight.com%2Fcourses%2Fkusto-query-language-kql-from-scratch%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3EPluralsight%20training%3C%2FA%3E.%20For%20more%20interesting%20advanced%20hunting%20examples%2C%20check%20out%20the%20newest%26nbsp%3Bhunting%20tip%20of%20the%20month%20posts%20on%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2FThreat-Intelligence%2FHunting-tip-of-the-month-Browser-downloads%2Fm-p%2F220454%23M32%22%20target%3D%22_blank%22%20rel%3D%22noopener%22%3Ebrowser%20downloads%3C%2FA%3E%20or%26nbsp%3Bon%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2FThreat-Intelligence%2FHunting-tip-of-the-month-PowerShell-commands%2Fm-p%2F210898%23M30%22%20target%3D%22_blank%22%20rel%3D%22noopener%22%3EPowerShell%20commands%3C%2FA%3E.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIf%20you%20still%20haven%E2%80%99t%20experienced%20the%20powerful%20breach-hunting%20features%20of%20Windows%20Defender%20ATP%2C%20%3CA%20href%3D%22https%3A%2F%2Fwww.microsoft.com%2Fen-us%2Fwindowsforbusiness%2Fwindows-atp%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3Eget%20your%20free%20trial%20now%3C%2FA%3E.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Microsoft

We would like to welcome a new table to the Windows Defender ATP Advanced hunting schema: MachineNetworkInfo.

 

For each network adapter seen on onboarded machines, this table provides the configured IP addresses, gateways, DNS servers, and more.

 

Sounds similar to ipconfig? Well, this is actually the intention. The Windows Defender ATP sensor tracks this network configuration information on onboarded machines every 15 minutes. With this comprehensive and up-to-date view of the network status of your machines, you can just imagine all the cool stuff you can do and how this data can enrich your hunting activities.

 

When you’re ready, let’s explore some simple examples of how you can use this new set of data.

 

Scenario #1: Get the IP addresses assigned to a machine

By getting all the IP addresses used by a specific machine at a given point in time, you can pivot your investigations to firewall, IDS or network logs, which record events by IP address. This query returns all IP addresses reported from a specific computer within a 30-minute period: 

MachineNetworkInfo
// Query for reports sent +-15 minutes around the time we are interested in
| where EventTime between ((datetime(2018-08-05T09:51)-15m) .. 30m)
// Filter by machine name and select only adapters that are enabled and connected
| where ComputerName == "somecomputer.corp.contoso.com" and NetworkAdapterStatus == "Up"
// IPAddresses contains a list of the IP addresses configured on the network adapter, their subnets, and more.
// Here we expand the list so that each value gets a separate row. All the other columns in the row, such as ComputerName, are duplicated.
| mvexpand parse_json(IPAddresses)
| project IPAddress=IPAddresses.IPAddress, AddressType=IPAddresses.AddressType, NetworkAdapterType, TunnelType, MacAddress

The results below show that the machine has two connected network adapters: a Wi-Fi adapter and a VPN tunnel. The Wi-Fi adapter has both an IPv4 address and an IPv6 address in this case. Note that the MacAddress field is in a different format than what you see in ipconfig, as it doesn’t contain colons (:).network adapters.png

 

Scenario #2: Where did the compromise happen?

After you identify a compromised machine, you might wonder where the actual compromise occurred, particularly if the machine is mobile.
Did the compromise happen in your headquarters or in some remote branch? Did the attack go through your perimeter defenses or was the machine infected off-premise? Was the compromise done at the employee’s home, at a partner network, or when the employee connected to some airport Wi-Fi? Was there perhaps an unfamiliar network configuration set on your corpnet-based servers and PCs?

 

This table includes multiple columns that could help you answer these questions. The simplest approach   could be to check the ConnectedNetworks column, where you can see the names and descriptions of connected networks, that are typically provided by DHCP servers.

 

However, this may not give you the info you need. Using the following query you can identify the relevant network segment in your organization by examining the configured DHCP servers, DNS servers, and default gateways. If you still don’t have an answer, search for other machines seen with those settings, and then identify what is common between the machines. 

MachineNetworkInfo
| where EventTime between ((datetime(2018-08-05T09:51)-15m) .. 30m)
and MachineId == "c0bfefec0bfefec0bfefec0bfefec0bfefecafe"
and NetworkAdapterStatus == "Up"
| project ConnectedNetworks, DnsAddresses, DefaultGateways, IPv4Dhcp, IPv6Dhcp, NetworkAdapterType | distinct * 

 

network settings.png

 

Scenario #3: Identify the machine using an IP address

You might want to pivot in another direction by starting with network setting information, specifically the IP address, to identify the machine involved in suspicious activity. For example, your IDS alerts you about some suspicious activity originating from an internal IP address, and you want to identify the machine using that IP address during the time of the reported activity.

 

To do this, all you need is a very simple query: 

MachineNetworkInfo
| where EventTime between ((datetime(2018-08-05T09:51)-15m) .. 30m)
        and IPAddresses contains '"192.168.1.5"'
        and NetworkAdapterStatus == "Up"
| project ComputerName, EventTime, IPAddresses

Note that we wrap the IP address in quotes in our filter, to avoid matching events with other IP addresses that have the same initial or trailing as the address we are looking for.

 

It also helps to include additional filters in the query that identify the network, avoiding matching machines with the same IP address but on a different network. To do this, use the description provided in the ConnectedNetworks column described earlier or use the corresponding DHCP server address.

 

Scenario #4: Amped up query

Let’s take the simple query we had in scenario #3 and amp it up. The first thing we do is add parameters to our query so that it’s easy for different people in your team to use it over long periods of time. With every run, they can use different parameters. The second change is that in addition to getting the machine name, we also query for the users that were logged on to that machine during the specified time period.

let pivotTime = datetime(2018-08-05 09:51:00);
let ipAddress = "192.168.1.5";
let matchingMachines =
    MachineNetworkInfo
| where EventTime between ((pivotTime-15m) ..30m)
            and IPAddresses contains strcat("\"", ipAddress, "\"")
            and NetworkAdapterStatus == "Up"
| project ComputerName, EventTime, IPAddresses,
TimeDifference=abs(EventTime-pivotTime); MachineInfo
| where EventTime between ((pivotTime-15m) ..30m) | project ComputerName, EventTime, LoggedOnUsers | join kind=inner (matchingMachines) on ComputerName, EventTime | project EventTime, ComputerName, LoggedOnUsers, TimeDifference, IPAddresses // In case multiple machines have reported from that IP address arround that time, start with the ones reporting closest to pivotTime | sort by TimeDifference asc 

 

Bonus scenario: Querying for the public IP of a machine

The MachineNetworkInfo table includes the IP addresses configured for use by a machine. It is common, however, for a machine to access the internet through a different IP address by way of a proxy or a NAT.

 

In any of the scenarios we’ve described, you might actually want to query for this public IP address, instead of the local IP address assigned to the machine itself. This can be necessary if a cloud service has notified you of suspicious access from some IP address, or if your national CERT has identified some suspicious activity originating from your network. This could also be useful if you want to do a reverse IP lookup for a certain machine, identifying its geo-location or the network from which it is reporting.

 

Simply query for the PublicIP column in the MachineInfo table (note the difference between MachineNetworkInfo and MachineInfo). This column includes the IP address that is communicating with Windows Defender ATP cloud when the sensor sends data.

MachineInfo
| where EventTime between ((datetime(2018-07-15T19:51)-15m) .. 30m) 
        and MachineId == "c0bfefec0bfefec0bfefec0bfefec0bfefecafe"
| project PublicIP, LoggedOnUsers, EventTime

 If you prefer to run this query as part of the above queries, try to union the results together.

 

More fun.

Our GitHub repository includes related sample queries such as Machine info from IP address and Network info of machine. If you have an interesting query to share, the GitHub repository for Advanced hunting queries is your friend. :smiling_face_with_smiling_eyes:

 

To go back to the basics of advanced hunting, take a look at this documentation or at our recent tutorial. To learn more about the Kusto Query Language, read the documentation or watch this new Pluralsight training. For more interesting advanced hunting examples, check out the newest hunting tip of the month posts on browser downloads or on PowerShell commands.

 

If you still haven’t experienced the powerful breach-hunting features of Windows Defender ATP, get your free trial now.