Home
%3CLINGO-SUB%20id%3D%22lingo-sub-1138273%22%20slang%3D%22en-US%22%3EExplorer%20Notebook%20Series%3A%20The%20Linux%20Host%20Explorer%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1138273%22%20slang%3D%22en-US%22%3E%3CP%3EAzure%20Sentinel%20has%20integrated%20Azure%20Notebooks%20to%20allow%20security%20analysts%20to%20use%20Jupyter%20Notebooks%20to%20hunt%20and%20investigate%20threats.%20To%20learn%20more%20about%20using%20Jupyter%20Notebooks%20in%20security%20investigations%20check%20out%20the%203%20part%20blog%20we%20released%20last%20year%3A%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fazure-sentinel%2Fsecurity-investigation-with-azure-sentinel-and-jupyter-notebooks%2Fba-p%2F432921%22%20target%3D%22_self%22%3EPart%201%3C%2FA%3E%2C%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fazure-sentinel%2Fsecurity-investigation-with-azure-sentinel-and-jupyter-notebooks%2Fba-p%2F483466%22%20target%3D%22_self%22%3EPart%202%3C%2FA%3E%2C%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fazure-sentinel%2Fsecurity-investigation-with-azure-sentinel-and-jupyter-notebooks%2Fba-p%2F561413%22%20target%3D%22_self%22%3EPart%203%3C%2FA%3E.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ETo%20support%20usage%20of%20Jupyter%20Notebooks%2C%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2FAzure%2FAzure-Sentinel-Notebooks%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3EMicrosoft%20has%20produced%20a%20range%20of%20Explorer%20Notebooks%3C%2FA%3E%20to%20allow%20analysts%20to%20leverage%20the%20capabilities%20and%20power%20of%20Notebooks%20to%20investigate%20common%20entities%20including%3A%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3ELinux%20Host%3C%2FLI%3E%0A%3CLI%3EWindows%20Host%3C%2FLI%3E%0A%3CLI%3EDomains%20%26amp%3B%20URL%3C%2FLI%3E%0A%3CLI%3EIP%20Address%3C%2FLI%3E%0A%3CLI%3EProcess%3C%2FLI%3E%0A%3CLI%3EOffice%20365%20activity%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%3CIMG%20src%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fsentinel%2Fmedia%2Fnotebooks%2Fsentinel-azure-notebooks-launch.png%22%20border%3D%220%22%20%2F%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EEach%20of%20these%20notebooks%20is%20built%20using%20Microsoft%20Threat%20Intelligence%20Center%E2%80%99s%20(MSTIC)%20Python%20security%20tool%20library%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fmicrosoft%2Fmsticpy%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3EMSTICpy%26nbsp%3B%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThis%20blog%20will%20look%20in%20detail%20at%20the%20Linux%20Host%20Explorer%20Notebook%2C%20explain%20what%20each%20section%20of%20the%20Notebook%20is%20intended%20to%20do%20and%20how%20it%20should%20be%20used.%20Further%20blogs%20covering%20the%20other%20explorer%20Notebooks%20will%20be%20released%20over%20time.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%20style%3D%22padding-left%3A%2030px%3B%22%3E%3CEM%3ENote%3A%20These%20Notebooks%20are%20still%20under%20active%20development%20and%20will%20be%20updated%20over%20time%20with%20new%20features%2C%20therefore%20the%20Notebook%20presented%20in%20this%20blog%20may%20vary%20slightly%20from%20the%20current%20Notebook%20presented%20via%20the%20Azure%20Sentinel%20portal.%3C%2FEM%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EYou%20can%20use%20the%20animated%20images%20in%20this%20document%20to%20help%20understand%20what%20is%20happening%20at%20each%20stage%2C%20however%20a%20better%20experience%20will%20be%20had%20if%20you%20run%20the%20Notebook%20yourself%20as%20you%20read%20through%20this%20blog.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId--1413453366%22%20id%3D%22toc-hId--1413453366%22%20id%3D%22toc-hId--1413453366%22%3EAzure%20Notebooks%20Setup%3C%2FH2%3E%0A%3CP%3EBefore%20using%20the%20Notebooks%20a%20number%20of%20setup%20steps%20are%20required%20to%20configure%20the%20Azure%20Notebooks%20environment%2C%20details%20of%20these%20steps%20can%20be%20found%20here%3A%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fsentinel%2Fnotebooks%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fsentinel%2Fnotebooks%3C%2FA%3E%3CA%20href%3D%22%23_ftn1%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%20name%3D%22_ftnref1%22%3E%3CSPAN%3E%5B1%5D%3C%2FSPAN%3E%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EOnce%20you%20have%20completed%20these%20setup%20steps%20you%20can%20launch%20the%20Entity%20Explorer%20%E2%80%93%20Linux%20Host%20Notebook.%20Note%20that%20all%20the%20Notebooks%20provided%20use%20Python%203.6%20so%20please%20make%20sure%20your%20Azure%20Notebooks%20kernel%20is%20set%20to%20Python%203.6%20once%20loaded.%20This%20can%20be%20done%20by%20selecting%20Kernel%20%26gt%3B%20Change%20kernel%20%26gt%3B%20Python%203.6.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIf%20this%20is%20the%20first%20time%20running%20this%20Notebook%20the%20first%20thing%20you%20will%20need%20to%20do%20is%20ensure%20the%20required%20packages%20are%20installed%2C%20these%20packages%20are%20detailed%20in%20the%20Setup%20Cell%20at%20the%20end%20of%20the%20Notebook.%20You%20can%20navigate%20there%20via%20the%20Table%20of%20Contents%20or%20by%20scrolling%20to%20the%20end%20of%20the%20Notebook.%20Running%20the%20setup%20cell%20will%20install%20MSTICpy%20and%20any%20other%20required%20packages.%20It%20can%20take%20a%20number%20of%20minutes%20to%20download%20and%20install%20the%20required%20packages.%20Once%20complete%20make%20sure%20you%20restart%20the%20kernel%20the%20Notebook%20is%20running%20in%20to%20ensure%20the%20latest%20packages%20are%20used.%20This%20can%20be%20done%20using%20the%20menu%20button%20at%20the%20top%20of%20the%20Notebook.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F167950i4FA2A68F848A8902%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22Setup.gif%22%20title%3D%22Setup.gif%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EAnimated%20image%20of%20running%20the%20Notebook%20setup%20cells%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId-1074059467%22%20id%3D%22toc-hId-1074059467%22%20id%3D%22toc-hId-1074059467%22%3E%26nbsp%3B%3C%2FH2%3E%0A%3CH2%20id%3D%22toc-hId--733394996%22%20id%3D%22toc-hId--733394996%22%20id%3D%22toc-hId--733394996%22%3EConfiguring%20the%20Explorer%20Notebook%3C%2FH2%3E%0A%3CP%3EOnce%20you%20have%20run%20the%20required%20setup%20you%20can%20return%20to%20the%20top%20of%20the%20Notebook%2C%20here%20you%20will%20find%20details%20about%20the%20data%20sources%20used%20by%20the%20Notebook%2C%20what%20the%20Notebook%20is%20trying%20to%20achieve%2C%20and%20the%20Hunting%20Hypothesis.%20This%20hypothesis%20details%20the%20focus%20of%20the%20Notebook%E2%80%99s%20investigate%20features%20and%20guides%20path%20that%20it%20takes.%20For%20the%20Linux%20Explorer%20the%20hypothesis%20is%20as%20follows%3A%3C%2FP%3E%0A%3CP%20style%3D%22padding-left%3A%2030px%3B%22%3E%3CEM%3E%E2%80%9COur%20broad%20initial%20hunting%20hypothesis%20is%20that%20a%20particular%20Linux%20host%20in%20our%20environment%20has%20been%20compromised%2C%20we%20will%20need%20to%20hunt%20from%20a%20range%20of%20different%20positions%20to%20validate%20or%20disprove%20this%20hypothesis.%E2%80%9D%3C%2FEM%3E%3C%2FP%3E%0A%3CP%3EThis%20is%20a%20broad%20hypothesis%20to%20ensure%20the%20Notebook%20remains%20relevant%20for%20a%20large%20number%20of%20investigations%20and%20threat%20hunts.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20next%20cell%20is%20titled%20Notebook%20Setup%2C%20this%20cell%20imports%20a%20number%20of%20packages%20to%20be%20used%20in%20the%20Notebook%20and%20sets%20some%20variables%20to%20be%20used%20later.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F167954i687C8539E447E818%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22Imports.gif%22%20title%3D%22Imports.gif%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EAnimated%20image%20showing%20running%20the%20Notebook%20import%20cells%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId-1754117837%22%20id%3D%22toc-hId-1754117837%22%20id%3D%22toc-hId-1754117837%22%3E%3CSPAN%20style%3D%22color%3A%20inherit%3B%20font-family%3A%20inherit%3B%20font-size%3A%2024px%3B%22%3EAuthenticating%20to%20Azure%20Sentinel%3C%2FSPAN%3E%3C%2FH2%3E%0A%3CP%3EOnce%20the%20configuration%20is%20done%20we%20can%20connect%20to%20Azure%20Sentinel%20to%20collect%20the%20data%20needed%20for%20the%20Notebook%E2%80%99s%20investigation%20features.%20The%20connections%20are%20handled%20by%20MSTICpy%E2%80%99s%20data%20connector%20features.%20The%20two%20cells%20in%20the%20Explorer%20Notebook%20under%20%E2%80%98Get%20WorkspaceId%20and%20Authenticate%20to%20Log%20Analytics%E2%80%99%20first%20get%20the%20details%20of%20the%20Azure%20Sentinel%20Workspace%20from%20configuration%20files%20(or%20if%20they%20are%20not%20present%20prompt%20the%20user%20to%20enter%20them).%20Details%20on%20these%20configuration%20files%20can%20be%20found%20here%3A%20%3CA%20href%3D%22https%3A%2F%2Fmsticpy.readthedocs.io%2Fen%2Flatest%2Fgetting_started%2Fmsticpyconfig.html%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fmsticpy.readthedocs.io%2Fen%2Flatest%2Fgetting_started%2Fmsticpyconfig.html%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EOnce%20the%20Workspace%20details%20are%20collected%20the%20next%20cell%20connects%20to%20the%20Workspace.%20During%20this%20connection%20the%20Notebook%20will%20load%20a%20feature%20called%20KQLMagic%20and%20you%20will%20be%20provided%20a%20device%20code%20and%20instructions%20to%20copy%20the%20code%20and%20authenticate.%20Clicking%20this%20button%20will%20open%20a%20new%20browser%20window%20where%20you%20can%20paste%20the%20provided%20code%2C%20after%20which%20you%20will%20be%20prompted%20to%20authenticate%20to%20the%20Workspace.%20You%20can%20authenticate%20with%20any%20account%20with%20which%20you%20would%20normally%20authenticate%20if%20accessing%20the%20Workspace%20via%20the%20Azure%20Portal.%20Once%20you%20have%20successfully%20connected%20the%20new%20browser%20window%20will%20automatically%20close%20and%20you%20can%20continue%20with%20the%20Notebook.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F167953i798A336CF565BA1D%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22Auth.gif%22%20title%3D%22Auth.gif%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EAnimated%20image%20showing%20the%20running%20of%20the%20Notebook%20authentication%20cells%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId--53336626%22%20id%3D%22toc-hId--53336626%22%20id%3D%22toc-hId--53336626%22%3EScoping%20the%20Investigation%3C%2FH2%3E%0A%3CP%3EOnce%20connected%20we%20need%20to%20select%20the%20host%20we%20are%20investigating%20and%20the%20timeframe%20we%20are%20investigating%20it%20in.%20To%20set%20the%20timescale%20run%20the%20cell%20under%20%E2%80%9CSet%20Hunting%20Time%20Frame%E2%80%9D%20this%20will%20provide%20you%20with%20a%20time%20slider%20that%20you%20can%20drag%20to%20set%20the%20timeframe%20you%20wish%20to%20investigate.%20If%20you%20need%20to%20adjust%20this%20timeframe%20later%20simply%20rerun%20this%20cell%20and%20change%20the%20slider.%3C%2FP%3E%0A%3CP%3EThe%20cell%20under%20the%20time%20slider%20will%20prompt%20you%20to%20enter%20the%20name%20of%20the%20host%20you%20wish%20to%20investigate%2C%20you%20can%20choose%20to%20enter%20a%20full%20name%2C%20partial%20name%2C%20or%20no%20name.%20If%20a%20full%20or%20partial%20name%20is%20entered%20the%20next%20cell%20will%20search%20across%20all%20Linux%20host%20data%20in%20your%20workspace%20in%20order%20to%20identify%20a%20match%20of%20that%20hostname.%20If%20a%20unique%20match%20is%20found%20that%20host%20is%20set%20as%20the%20focus%20for%20the%20investigation.%20Alternatively%20if%20multiple%20hosts%20are%20found%20matching%20the%20partial%20or%20full%20name%20these%20will%20be%20displayed%20for%20you%20to%20select%20which%20one%20you%20wish%20to%20focus%20on.%20If%20no%20host%20is%20entered%20all%20the%20hosts%20for%20which%20data%20is%20present%20in%20the%20timeframe%20set%20will%20be%20presented%20for%20you%20to%20choose%20from.%20Please%20note%20this%20Explorer%20Notebooks%20is%20designed%20to%20be%20focused%20on%20one%20host%20at%20a%20time%20therefore%20only%20a%20single%20host%20can%20be%20selected.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F167955iA0BC539C7E5C98F8%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22scope.gif%22%20title%3D%22scope.gif%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EAnimated%20image%20showing%20running%20of%20Notebook%20scoping%20cells%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId--1860791089%22%20id%3D%22toc-hId--1860791089%22%20id%3D%22toc-hId--1860791089%22%3EHost%20Overview%3C%2FH2%3E%0A%3CP%3EThe%20next%20three%20cells%20provide%20an%20overview%20of%20the%20host.%20The%20first%20will%20collect%20a%20range%20of%20information%20about%20the%20host%20including%20details%20on%20OS%2C%20IP%20address%2C%20location%2C%20and%20installed%20services.%20This%20is%20intended%20to%20provide%20some%20context%20on%20the%20host%20being%20investigated%2C%20what%20role%20it%20might%20fulfill%20and%20where%20in%20the%20environment%20it%20resides.%20The%20granularity%20of%20this%20data%20will%20depend%20on%20whether%20the%20host%20is%20running%20in%20Azure%20and%20what%20extensions%20are%20enabled.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EFollowing%20this%20are%20two%20cells%20providing%20details%20on%20alerts%20associated%20with%20the%20host%20in%20the%20last%2030%20days.%20The%20first%20cell%20will%20present%20these%20alerts%20in%20an%20%3CA%20href%3D%22https%3A%2F%2Fmsticpy.readthedocs.io%2Fen%2Flatest%2Fvisualization%2FEventTimeline.html%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Einteractive%20timeline%20view%3C%2FA%3E%2C%20this%20helps%20provide%20a%20visual%20representation%20of%20recent%20alert%20activity%20with%20the%20host%20and%20identifies%20potentially%20relevant%20alert%20patterns.%20You%20can%20pan%20and%20zoom%20on%20the%20timeline%20and%20hovering%20over%20a%20point%20will%20provide%20you%20with%20more%20details%20of%20the%20alert.%20Below%20this%20you%20are%20presented%20with%20a%20list%20view%20of%20all%20the%20alerts%20in%20the%20timeline%2C%20you%20can%20select%20an%20alert%20from%20the%20list%20to%20see%20the%20full%20details%20of%20the%20alert%20from%20Azure%20Sentinel.%20To%20view%20details%20of%20a%20different%20alert%20simply%20select%20another%20alert%20from%20the%20list.%20Before%20continuing%20with%20the%20Notebook%20select%20the%20alert%20you%20wish%20to%20focus%20on%20further%2C%20details%20of%20this%20alert%20will%20be%20used%20to%20scope%20elements%20of%20the%20investigation%20going%20forward.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F167961i5C58BD9DB4D190B7%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22host_alerts.gif%22%20title%3D%22host_alerts.gif%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EAnimated%20image%20showing%20running%20the%20Notebook%20host%20cells%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EFrom%20this%20point%20the%20Notebook%20provides%20a%20series%20if%20analytics%20and%20visualizations%20focused%20on%20different%20areas%2C%20you%20can%20choose%20to%20run%20these%20sections%20in%20order%20or%20jump%20to%20a%20specific%20area%20of%20interest.%20At%20various%20points%20in%20this%20Notebook%20menu%20items%20are%20provided%20to%20allow%20you%20to%20jump%20to%20specific%20sections%20(you%20can%20also%20use%20the%20Table%20of%20Contents%26nbsp%3B%20at%20the%20top%20of%20the%20Notebook).%20Whilst%20all%20the%20sections%20can%20be%20run%20independently%20each%20cell%20within%20the%20section%20ties%20to%20previous%20cells%20and%20therefore%20cells%20within%20each%20section%20must%20be%20run%20in%20order.%20In%20addition%20all%20sections%20require%20you%20to%20complete%20the%20initial%20cells%20of%20authentication%2C%20scoping%2C%20and%20host%20overview.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId-626721744%22%20id%3D%22toc-hId-626721744%22%20id%3D%22toc-hId-626721744%22%3EHost%20Logons%3C%2FH2%3E%0A%3CP%3EMost%20Linux%20based%20intrusions%20involve%20attackers%20authenticating%20against%20infrastructure%20at%20some%20point%2C%20either%20as%20part%20of%20an%20initial%20compromise%20or%20later%20during%20lateral%20movement.%20Therefore%20the%20first%20analytics%20section%20in%20the%20Notebook%20is%20focused%20on%20Host%20Logons.%20Running%20this%20section%20will%20return%20a%20number%20of%20visualizations%20to%20help%20you%20understand%20the%20types%20of%20logons%20observed%20by%20the%20host%20within%20the%20time%20frame%20being%20investigated.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20first%20thing%20you%20will%20see%20when%20running%20cell%20under%20%E2%80%98Host%20Logon%20Events%E2%80%99%20is%20another%20timeline.%20This%20timeline%20provides%20a%20breakdown%20of%20failed%20and%20successful%20logon%20attempts%20to%20the%20host.%20Overlaid%20on%20this%20is%20a%20marker%20showing%20the%20time%20of%20the%20alert%20you%20selected%20previously%20to%20provide%20a%20reference%20marker.%20As%20with%20the%20alert%20timeline%20you%20can%20scroll%2C%20pan%2C%20zoom%20and%20hover%20on%20items%20in%20the%20timeline%20in%20order%20to%20get%20more%20details.%20This%20timeline%20is%20particularly%20useful%20for%20identifying%20anomalous%20logon%20patterns%20such%20as%20brute%20force%20attempts.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F167965iF14393716D0072A0%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22host_logons_2.gif%22%20title%3D%22host_logons_2.gif%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EAnimated%20image%20of%20the%20host%20logons%20timeline%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EBelow%20this%20are%20a%20number%20of%20graphs%20showing%20a%20breakdown%20of%20logon%20attempts%20by%20various%20factors%20including%20whether%20they%20were%20successful%20or%20not%2C%20what%20user%20account%20was%20involved%2C%20and%20what%20process%20was%20involved.%20Again%2C%20these%20help%20quickly%20identify%20any%20elements%20that%20may%20stand%20out%20due%20to%20volume%20or%20scarcity.%3C%2FP%3E%0A%3CP%3EFinally%2C%20there%20is%20a%20map%20showing%20the%20location%20of%20the%20source%20IP%20address%20associated%20with%20each%20logon%20attempt.%20The%20location%20is%20based%20on%20IP%20geolocation%20and%20therefore%20the%20accuracy%20should%20not%20be%20considered%20100%25%20reliable.%20However%2C%20it%20provides%20a%20useful%20guide%20to%20where%20logon%20attempts%20are%20coming%20from%20and%20can%20easily%20highlight%20logons%20from%20anomalous%20locations.%20Red%20markers%20are%20used%20to%20show%20failed%20logons%2C%20and%20green%20ones%20to%20show%20successful%20logons.%20You%20can%20zoom%20and%20pan%20the%20map%20to%20view%20these%20events%20as%20you%20wish.%20Please%20note%20that%20if%20failed%20logons%20have%20occurred%20from%20the%20same%20location%20as%20successful%20ones%20the%20red%20marker%20will%20be%20behind%20the%20green%20maker%20meaning%20that%20it%20may%20not%20be%20visible.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F167966i36AB0EF93C58E90B%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22host_logons_3.gif%22%20title%3D%22host_logons_3.gif%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EAnimated%20image%20showing%20the%20host%20logon%20graphs%20and%20map%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId--1180732719%22%20id%3D%22toc-hId--1180732719%22%20id%3D%22toc-hId--1180732719%22%3ESession%20Investigations%3C%2FH2%3E%0A%3CP%3EAfter%20looking%20at%20all%20logon%20events%20for%20the%20host%20we%20can%20choose%20to%20look%20closer%20at%20specific%20logon%20sessions.%20Running%20the%20cell%20under%20%E2%80%98Logon%20Sessions%E2%80%99%20will%20return%20a%20list%20of%20all%20logon%20sessions%2C%20the%20session%20start%20time%20and%20end%20time%2C%20and%20the%20user%20involved.%20It%20will%20also%20show%20if%20the%20account%20is%20a%20root%20account%20on%20the%20host%2C%20if%20there%20was%20an%20alert%20associated%20with%20the%20host%20during%20that%20logon%20session%2C%20and%20the%20ratio%20of%20successful%20to%20failed%20logon%20events%20for%20that%20user%20account.%20If%20any%20of%20these%20elements%20are%20highlighted%20in%20yellow%20this%20indicates%20they%20may%20be%20logon%20sessions%20to%20focus%20on.%26nbsp%3B%20Below%20the%20list%20of%20logons%20sessions%20is%20a%20selection%20box%20from%20which%20you%20can%20select%20the%20session%20you%20wish%20to%20focus%20further%20investigation%20on.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EOnce%20you%20have%20selected%20a%20session%20the%20next%20cell%20will%20return%20a%20range%20of%20details%20on%20host%20activity%20during%20that%20session.%20This%20includes%20a%20breakdown%20of%20cron%20activity%2C%20sudo%20commands%20run%2C%20and%20users%20added%2C%20removed%2C%20or%20modified.%20If%20there%20are%20multiple%20users%20on%20the%20host%20simultaneously%20this%20activity%20will%20relate%20to%20all%20logon%20sessions%20during%20that%20host%20during%20the%20session%20time%20window.%20This%20is%20due%20to%20the%20fact%20this%20Notebook%20relies%20on%20syslog%20data%20which%20means%20associating%20host%20activity%20with%20specific%20logon%20sessions%20is%20not%20possible%20in%20a%20reliable%20manner.%20At%20the%20bottom%20of%20this%20cell%20is%20another%20timeline%20providing%20an%20overview%20of%20all%20the%20activity%20detailed%20in%20the%20cell.%20This%20again%20provides%20a%20very%20useful%20visual%20reference%20as%20to%20the%20chronology%20of%20events%20and%20what%20relationship%20they%20may%20have%20to%20each%20other.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F167970i33A6B45E20282E20%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22session_logons.gif%22%20title%3D%22session_logons.gif%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EAnimated%20image%20showing%20session%20selection%20cells%20running%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20two%20cells%20at%20the%20end%20of%20the%20section%20return%20raw%20syslog%20data%20to%20allow%20for%20further%20investigation%2C%20the%20first%20focusses%20on%20syslog%20associated%20with%20sudo%20events%20and%20is%20filtered%20by%20the%20sudo%20command%20run.%20To%20change%20the%20displayed%20syslog%20simply%20select%20the%20command%20you%20wish%20to%20focus%20on%20and%20the%20table%20will%20update.%20The%20next%20cell%20does%20the%20same%20but%20for%20all%20syslog%20generated%20during%20the%20logon%20session%20and%20is%20broken%20down%20by%20facility.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CBR%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F167971iFFFE2AC4C3A6B02F%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22session_logs.gif%22%20title%3D%22session_logs.gif%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EAnimated%20image%20showing%20cells%20outputting%20user%20session%20log%20data%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAnother%20useful%20datapoint%20for%20security%20analysts%20is%20process%20creation%20activity.%20Therefore%20the%20next%20cell%20produces%20a%20process%20tree%20for%20the%20analyst%20to%20interact%20with.%20The%20tree%20is%20created%20from%20auditd%20data%2C%20therefore%20you%20must%20have%20auditd%20enabled%20for%20this%20host%20and%20auditd%20data%20must%20be%20being%20collected%20by%20Azure%20Sentinel%3CA%20href%3D%22%23_ftn2%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%20name%3D%22_ftnref2%22%3E%3CSPAN%3E%5B2%5D%3C%2FSPAN%3E%3C%2FA%3E.%20In%20addition%20due%20to%20the%20volume%20of%20data%20generated%20by%20auditd%20this%20cell%20can%20take%20some%20time%20to%20execute%2C%20if%20you%20are%20unsure%20if%20the%20cell%20is%20still%20executing%20or%20not%20you%20can%20use%20the%20kernel%20indicator%20in%20the%20top%20right%20of%20the%20Notebook%20window.%20If%20the%20indicator%20is%20a%20solid%20color%20this%20indicates%20that%20kernel%20is%20still%20executing.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EOnce%20complete%20the%20process%20tree%20displayed%20can%20be%20interacted%20with%20in%20the%20same%20way%20as%20the%20timelines%20seen%20previously%2C%20you%20can%20hover%20to%20get%20more%20details%2C%20scroll%2C%20pan%2C%20zoom%20%2C%20and%20use%20the%20sidebar%20to%20get%20a%20broader%20overview%20of%20the%20whole%20process%20tree.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F167972i9029451C0EA7886C%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22session_proc_tree.gif%22%20title%3D%22session_proc_tree.gif%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EAnimated%20image%20showing%20running%20of%20the%20session%20process%20tree%20cells%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId-1306780114%22%20id%3D%22toc-hId-1306780114%22%20id%3D%22toc-hId-1306780114%22%3ESudo%20session%20investigation%3C%2FH2%3E%0A%3CP%3ESyslog%20provides%20us%20only%20limited%20details%20of%20user%20activity%20on%20the%20host%2C%20the%20exception%20being%20when%20a%20user%20conducts%20actions%20with%20elevated%20privileges%20using%20sudo.%20Given%20the%20power%20of%20sudo%20this%20provides%20a%20useful%20insight%20into%20potential%20attacker%20activity%2C%20therefore%20the%20next%20cells%20provide%20an%20insight%20into%20sudo%20activity%20within%20the%20user%20logon%20session%20selected%20previously.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EGiven%20that%20multiple%20sudo%20sessions%20may%20occur%20during%20a%20single%20logon%20session%20the%20first%20cell%20allows%20you%20to%20select%20a%20particular%20sudo%20session%20to%20focus%20on%2C%20with%20the%20subsequent%20cell%20providing%20details%20of%20all%20syslog%20associated%20with%20this%20session.%20In%20addition%2C%20any%20Indicators%20of%20Compromise%20(IoCs)%20present%20in%20the%20syslog%20messages%20related%20to%20the%20sudo%20session%20will%20be%20extracted%20and%20looked%20up%20in%20Threat%20Intelligence%20feeds%20to%20help%20identify%20any%20sudo%20activity%20that%20may%20be%20malicious.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%20style%3D%22padding-left%3A%2030px%3B%22%3E%3CEM%3ENote%3A%20The%20IoC%20extraction%20can%20occasionally%20generate%20false%20positives%2C%20this%20is%20due%20to%20the%20difficulty%20in%20identifying%20the%20difference%20between%20say%20a%20domain%20name%20and%20a%20file%20name%20e.g.%20google.sh%20is%20a%20valid%20domain%20but%20could%20also%20be%20the%20name%20of%20a%20shell%20script%3C%2FEM%3E.%3C%2FP%3E%0A%3CP%20style%3D%22padding-left%3A%2030px%3B%22%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3BThis%20cell%20provides%20details%20on%20a%20single%20sudo%20session%20at%20a%20time%2C%20to%20view%20details%20on%20another%20session%20select%20it%20from%20the%20list%20in%20the%20first%20cell%20and%20rerun%20the%20analysis%20cell.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F167962i676B8B23C20E8A66%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22sudo.gif%22%20title%3D%22sudo.gif%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EAnimated%20image%20showing%20sudo%20session%20selection%20cells%20running%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId--500674349%22%20id%3D%22toc-hId--500674349%22%20id%3D%22toc-hId--500674349%22%3EUser%20Activity%3C%2FH2%3E%0A%3CP%3EDuring%20the%20course%20of%20your%20investigation%20or%20hunting%20activity%20you%20may%20identify%20a%20specific%20user%20to%20focus%20on%2C%20the%20next%20section%20of%20the%20Notebook%20is%20designed%20to%20cater%20for%20this.%20You%20can%20run%20this%20section%20individually%20or%20as%20a%20follow%20on%20from%20the%20host%20session%20cells%20we%20have%20just%20covered.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThis%20section%20has%20a%20broader%20timeframe%20than%20the%20session%20only%20section%20and%20instead%20covers%20all%20user%20activity%20in%20the%20timeframe%20set%20initially%20in%20the%20Notebook%20(under%20the%20%E2%80%9CSelect%20Host%20to%20Investigate%E2%80%9D%20heading).%20The%20initial%20cell%20provides%20a%20list%20of%20users%20observed%20in%20the%20logs%20from%20which%20you%20can%20select%20a%20user%20to%20focus%20on.%20The%20follow%20on%20cell%20provides%20an%20overview%20of%20the%20users%20activity.%20This%20is%20similar%20to%20the%20host%20logon%20view%20but%20is%20focused%20on%20activity%20only%20from%20the%20selected%20user.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F167975iB9E2C5FD0040602D%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22user1.gif%22%20title%3D%22user1.gif%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EAnimated%20image%20showing%20the%20user%20investigation%20selection%20cells%20and%20user%20logon%20timeline%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThere%20is%20also%20a%20summary%20of%20all%20sudo%20activity%20associated%20with%20that%20user.%20This%20section%20helps%20highlight%20specific%20user%20activity%20that%20may%20be%20anomalous%20and%20therefore%20warrant%20further%20investigation%20using%20the%20session%20investigation%20cells.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F167976i3E840CE42069A9AD%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22user2.gif%22%20title%3D%22user2.gif%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EAnimated%20image%20showing%20the%20user%20investigation%20graphs%20and%20map%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20final%20cell%20of%20the%20section%20extracts%20IoCs%20from%20all%20syslog%20messages%20associated%20with%20the%20user%20and%20looks%20them%20up%20in%20threat%20intelligence%20feeds%20in%20order%20to%20identify%20any%20known%20malicious%20activity.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId--634359073%22%20id%3D%22toc-hId--634359073%22%20id%3D%22toc-hId--634359073%22%3EApplication%20Activity%3C%2FH2%3E%0A%3CP%3EIn%20a%20similar%20fashion%20as%20the%20User%20Activity%20section%20the%20Application%20Activity%20section%20allows%20you%20to%20focus%20your%20investigation%20on%20a%20specific%20application%2C%20this%20is%20particularly%20useful%20if%20you%20are%20searching%20for%20potential%20exploitation%20of%20a%20specific%20application%20or%20if%20you%20suspect%20an%20attacker%20may%20have%20run%20an%20application%20during%20their%20attack.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20first%20cell%20presents%20a%20list%20of%20applications%20for%20which%20logs%20are%20present%20that%20you%20can%20select%20from.%20The%20following%20cell%20presents%20an%20interactive%20graph%20of%20log%20volume%20from%20the%20application%20over%20time.%20This%20helps%20identify%20anomalous%20patterns%20or%20spikes%20over%20time.%20The%20first%20graph%20show%20the%20volume%20off%20all%20logs%20generated%20by%20the%20application%2C%20the%20second%20one%20shows%20only%20high%20priority%20messages%20generated%20('emerg'%2C%20'alert'%2C%20'crit'%2C%20'err'%2C%20and%20'warning').%20This%20separation%20can%20allow%20you%20to%20identify%20spikes%20in%20particularly%20interesting%20activity%20by%20removing%20the%20baseline%20of%20normal%20activity%20that%20might%20appear%20only%20as%20low%20priority%20messages.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F167977i65F0F7DE5F392122%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22app1.gif%22%20title%3D%22app1.gif%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EAnimated%20image%20showing%20the%20application%20investigation%20cells%20running%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20other%20two%20cells%20in%20this%20section%20produce%20a%20process%20tree%20for%20the%20selected%20application.%20Due%20to%20the%20fact%20that%20process%20tree%20generation%20relies%20on%20auditd%20data%2C%20and%20the%20potential%20for%20large%20data%20volumes%2C%20there%20is%20a%20cell%20to%20change%20the%20timeframe%20to%20query%20to%20select%20a%20smaller%20window.%20The%20following%20cell%20that%20generates%20the%20process%20tree%20checks%20how%20many%20logs%20are%20being%20returned%20and%20if%20it%20surpasses%20100%2C000%20then%20it%20will%20prompt%20you%20to%20confirm%20if%20you%20wish%20to%20continue.%20Due%20to%20the%20high%20likelihood%20of%20a%20timeout%20with%20more%20than%20100%2C000%20lines%20of%20data%20it%20is%20strongly%20suggested%20that%20you%20adjust%20your%20timeframe%20if%20you%20are%20presented%20with%20this%20warning.%20If%20you%20need%20to%20query%20more%20data%20than%20this%20you%20can%20run%20this%20cell%20multiple%20times%20to%20generate%20process%20trees%20for%20different%20timeframes.%20The%20process%20tree%20returned%20is%20the%20same%20format%20as%20the%20one%20generated%20in%20the%20session%20section%20and%20can%20be%20interacted%20with%20in%20the%20same%20way.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F167978i5B7ED8317FD52B87%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22app2.gif%22%20title%3D%22app2.gif%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EAnimated%20image%20showing%20application%20process%20tree%20cell%20running%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20final%20cell%20will%20extract%20IoCs%20from%20all%20logs%20associated%20with%20the%20selected%20application%2C%20look%20up%20these%20IoCs%20in%20threat%20intelligence%20feeds%20and%20if%20a%20match%20is%20made%20then%20return%20that%20matched%20IoC%20and%20the%20syslog%20message%20it%20was%20present%20in.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F167979iF336B4E10621C6A2%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22app3.gif%22%20title%3D%22app3.gif%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EAnimated%20image%20showing%20application%20data%20IoC%20extraction%20cells%20running%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId-1853153760%22%20id%3D%22toc-hId-1853153760%22%20id%3D%22toc-hId-1853153760%22%3ENetwork%20Activity%3C%2FH2%3E%0A%3CP%3EThe%20final%20analytical%20section%20of%20this%20Notebook%20focusses%20on%20Network%20activity.%20This%20section%20utilizes%20Azure%20Network%20Flow%20data%2C%20as%20well%20as%20identifying%20network%20activity%20present%20in%20syslog%20(such%20as%20SSH%20connection%20attempts).%20If%20Azure%20Flow%20Data%20is%20present%20the%20first%20cell%20will%20display%20a%20number%20of%20visualizations%20detailing%20network%20flow%20broken%20down%20by%20protocol%20and%20direction%2C%20if%20only%20syslog%20data%20is%20available%20these%20visualizations%20are%20not%20shown%20due%20to%20a%20lack%20of%20reliable%20data%20regarding%20flow%20direction%20or%20protocol.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20next%20cells%20allow%20you%20to%20focus%20your%20investigation%20on%20specific%20IP%20addresses%2C%20due%20to%20the%20volume%20of%20IP%20addresses%20often%20seen%20the%20first%20cell%20will%20resolve%20the%20ASN%20owner%20for%20each%20address%20and%20present%20a%20list%20of%20ASNs%20for%20you%20to%20select%20from.%20The%20cell%20after%20this%20will%20list%20all%20the%20IP%20addresses%20observed%20associated%20with%20that%20ASN%2C%20from%20which%20you%20can%20select%20a%20specific%20IP%20address%20to%20look%20at%20further.%20The%20final%20cell%20will%20then%20look%20up%20the%20selected%20IP%20address%20in%20threat%20intelligence%2C%20return%20details%20on%20any%20matches%20and%20also%20return%20details%20on%20all%20syslog%20messages%20containing%20the%20IP%20address%20to%20help%20you%20identify%20where%20malicious%20activity%20may%20have%20occured.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId-45699297%22%20id%3D%22toc-hId-45699297%22%20id%3D%22toc-hId-45699297%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F167963iFF0CCC4C460C6B2E%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22network.gif%22%20title%3D%22network.gif%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EAnimated%20image%20showing%20network%20analysis%20cells%20running%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FH2%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId--1761755166%22%20id%3D%22toc-hId--1761755166%22%20id%3D%22toc-hId--1761755166%22%3ESummary%3C%2FH2%3E%0A%3CP%3EThe%20Linux%20Explorer%20Notebook%20is%20a%20powerful%20tool%20for%20investigating%20a%20Linux%20host%20or%20hunting%20for%20threats.%20It%20can%20be%20used%20as%20an%20end%20to%20end%20investigation%20flow%20or%20used%20in%20sections%20as%20required%20based%20on%20the%20flow%20and%20focus%20of%20the%20investigation.%20However%2C%20it%20does%20not%20cover%20every%20conceivable%20scenario%20or%20environment%2C%20the%20real%20value%20of%20Notebooks%20is%20that%20this%20isn%E2%80%99t%20a%20limitation%20as%20you%20can%20customize%20these%20Notebooks%20to%20fit%20your%20needs%2C%20or%20you%20can%20create%20your%20own%20Notebook%20using%20elements%20from%20the%20Notebooks%20we%20have%20provided%20or%20entirely%20from%20scratch.%20There%20are%20virtually%20endless%20possibilities.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIf%20you%20are%20looking%20to%20create%20your%20own%20Notebooks%20please%20make%20sure%20you%20check%20out%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fmicrosoft%2Fmsticpy%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3EMSTICpy%3C%2FA%3E%20as%20there%20is%20a%20good%20chance%20that%20it%20will%20contain%20features%20that%20will%20save%20you%20time%20and%20effort%20in%20creating%20what%20you%20need.%20Also%2C%20we%20are%20keen%20for%20any%20input%2C%20suggestions%2C%20issues%20or%20contributions%20to%20MSTICpy%20so%20please%20do%20feel%20free%20to%20contribute%20if%20you%20wish.%20In%20the%20same%20vein%20if%20you%20have%20Notebook%20that%20you%20would%20like%20to%20see%20included%20in%20the%20Azure%20Sentinel%20portal%20please%20let%20us%20know%20in%20the%20comments%20below%20or%20raise%20a%20issue%20on%20Github%2C%20we%20are%20always%20keen%20to%20get%20feedback%20and%20ideas%20from%20our%20customers.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22%23_ftnref1%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%20name%3D%22_ftn1%22%3E%3CSPAN%3E%5B1%5D%3C%2FSPAN%3E%3C%2FA%3E%20If%20you%20don%E2%80%99t%20want%20to%20use%20Azure%20Notebooks%20you%20can%20also%20download%20the%20Explorer%20Notebook%20and%20run%20it%20from%20a%20local%20Jupyter%20instance.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22%23_ftnref2%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%20name%3D%22_ftn2%22%3E%3CSPAN%3E%5B2%5D%3C%2FSPAN%3E%3C%2FA%3E%20%3CA%20href%3D%22https%3A%2F%2Fmsticpy.readthedocs.io%2Fen%2Flatest%2Fdata_acquisition%2FCollectingLinuxAuditLogs.html%23configure-auditing-on-your-linux-vms%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fmsticpy.readthedocs.io%2Fen%2Flatest%2Fdata_acquisition%2FCollectingLinuxAuditLogs.html%23configure-auditing-on-your-linux-vms%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-1138273%22%20slang%3D%22en-US%22%3E%3CP%3EAzure%20Sentinel%20has%20integrated%20Azure%20Notebooks%20to%20allow%20security%20analysts%20to%20use%20Jupyter%20Notebooks%20to%20hunt%20and%20investigate%20threats.%26nbsp%3B%3C%2FP%3E%0A%3CP%3ETo%20support%20usage%20of%20Jupyter%20Notebooks%20Microsoft%20has%20produced%20a%20range%20of%20explorer%20notebooks%20to%20allow%20analysts%20to%20leverage%20the%20capabilities%20and%20power%20of%20Notebooks%20to%20investigate%20common%20entities%20including%3A%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3ELinux%20Host%3C%2FLI%3E%0A%3CLI%3EWindows%20Host%3C%2FLI%3E%0A%3CLI%3EDomains%20%26amp%3B%20URL%3C%2FLI%3E%0A%3CLI%3EIP%20Address%3C%2FLI%3E%0A%3CLI%3EProcess%3C%2FLI%3E%0A%3CLI%3EOffice%20365%20activity%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThis%20blog%20will%20look%20in%20detail%20at%20the%20Linux%20Host%20Explorer%20Notebook%2C%20explain%20what%20each%20section%20of%20the%20Notebook%20is%20intended%20to%20do%20and%20how%20it%20should%20be%20used.%20Further%20blogs%20covering%20the%20other%20explorer%20Notebooks%20will%20be%20released%20over%20time.%3C%2FP%3E%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1138273%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EHunting%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ENotebooks%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1149468%22%20slang%3D%22en-US%22%3ERe%3A%20Explorer%20Notebook%20Series%3A%20The%20Linux%20Host%20Explorer%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1149468%22%20slang%3D%22en-US%22%3E%3CP%3EThank%20you%20Pete%20for%20Sharing%20with%20the%20community%26nbsp%3B%3CIMG%20class%3D%22lia-deferred-image%20lia-image-emoji%22%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Fhtml%2Fimages%2Femoticons%2Fcool_40x40.gif%22%20alt%3D%22%3Acool%3A%22%20title%3D%22%3Acool%3A%22%20%2F%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E
Microsoft

Azure Sentinel has integrated Azure Notebooks to allow security analysts to use Jupyter Notebooks to hunt and investigate threats. To learn more about using Jupyter Notebooks in security investigations check out the 3 part blog we released last year: Part 1, Part 2, Part 3.

 

To support usage of Jupyter Notebooks, Microsoft has produced a range of Explorer Notebooks to allow analysts to leverage the capabilities and power of Notebooks to investigate common entities including:

  • Linux Host
  • Windows Host
  • Domains & URL
  • IP Address
  • Process
  • Office 365 activity

 

Each of these notebooks is built using Microsoft Threat Intelligence Center’s (MSTIC) Python security tool library MSTICpy  

 

This blog will look in detail at the Linux Host Explorer Notebook, explain what each section of the Notebook is intended to do and how it should be used. Further blogs covering the other explorer Notebooks will be released over time.

 

Note: These Notebooks are still under active development and will be updated over time with new features, therefore the Notebook presented in this blog may vary slightly from the current Notebook presented via the Azure Sentinel portal.

 

You can use the animated images in this document to help understand what is happening at each stage, however a better experience will be had if you run the Notebook yourself as you read through this blog.

 

Azure Notebooks Setup

Before using the Notebooks a number of setup steps are required to configure the Azure Notebooks environment, details of these steps can be found here: https://docs.microsoft.com/en-us/azure/sentinel/notebooks[1]

 

Once you have completed these setup steps you can launch the Entity Explorer – Linux Host Notebook. Note that all the Notebooks provided use Python 3.6 so please make sure your Azure Notebooks kernel is set to Python 3.6 once loaded. This can be done by selecting Kernel > Change kernel > Python 3.6.

 

If this is the first time running this Notebook the first thing you will need to do is ensure the required packages are installed, these packages are detailed in the Setup Cell at the end of the Notebook. You can navigate there via the Table of Contents or by scrolling to the end of the Notebook. Running the setup cell will install MSTICpy and any other required packages. It can take a number of minutes to download and install the required packages. Once complete make sure you restart the kernel the Notebook is running in to ensure the latest packages are used. This can be done using the menu button at the top of the Notebook.

 

Animated image of running the Notebook setup cellsAnimated image of running the Notebook setup cells

 

Configuring the Explorer Notebook

Once you have run the required setup you can return to the top of the Notebook, here you will find details about the data sources used by the Notebook, what the Notebook is trying to achieve, and the Hunting Hypothesis. This hypothesis details the focus of the Notebook’s investigate features and guides path that it takes. For the Linux Explorer the hypothesis is as follows:

“Our broad initial hunting hypothesis is that a particular Linux host in our environment has been compromised, we will need to hunt from a range of different positions to validate or disprove this hypothesis.”

This is a broad hypothesis to ensure the Notebook remains relevant for a large number of investigations and threat hunts.

 

The next cell is titled Notebook Setup, this cell imports a number of packages to be used in the Notebook and sets some variables to be used later.

 

Animated image showing running the Notebook import cellsAnimated image showing running the Notebook import cells

 

 

Authenticating to Azure Sentinel

Once the configuration is done we can connect to Azure Sentinel to collect the data needed for the Notebook’s investigation features. The connections are handled by MSTICpy’s data connector features. The two cells in the Explorer Notebook under ‘Get WorkspaceId and Authenticate to Log Analytics’ first get the details of the Azure Sentinel Workspace from configuration files (or if they are not present prompt the user to enter them). Details on these configuration files can be found here: https://msticpy.readthedocs.io/en/latest/getting_started/msticpyconfig.html

 

Once the Workspace details are collected the next cell connects to the Workspace. During this connection the Notebook will load a feature called KQLMagic and you will be provided a device code and instructions to copy the code and authenticate. Clicking this button will open a new browser window where you can paste the provided code, after which you will be prompted to authenticate to the Workspace. You can authenticate with any account with which you would normally authenticate if accessing the Workspace via the Azure Portal. Once you have successfully connected the new browser window will automatically close and you can continue with the Notebook.

 

Animated image showing the running of the Notebook authentication cellsAnimated image showing the running of the Notebook authentication cells

 

 

Scoping the Investigation

Once connected we need to select the host we are investigating and the timeframe we are investigating it in. To set the timescale run the cell under “Set Hunting Time Frame” this will provide you with a time slider that you can drag to set the timeframe you wish to investigate. If you need to adjust this timeframe later simply rerun this cell and change the slider.

The cell under the time slider will prompt you to enter the name of the host you wish to investigate, you can choose to enter a full name, partial name, or no name. If a full or partial name is entered the next cell will search across all Linux host data in your workspace in order to identify a match of that hostname. If a unique match is found that host is set as the focus for the investigation. Alternatively if multiple hosts are found matching the partial or full name these will be displayed for you to select which one you wish to focus on. If no host is entered all the hosts for which data is present in the timeframe set will be presented for you to choose from. Please note this Explorer Notebooks is designed to be focused on one host at a time therefore only a single host can be selected.

 

Animated image showing running of Notebook scoping cellsAnimated image showing running of Notebook scoping cells

 

 

Host Overview

The next three cells provide an overview of the host. The first will collect a range of information about the host including details on OS, IP address, location, and installed services. This is intended to provide some context on the host being investigated, what role it might fulfill and where in the environment it resides. The granularity of this data will depend on whether the host is running in Azure and what extensions are enabled.

 

Following this are two cells providing details on alerts associated with the host in the last 30 days. The first cell will present these alerts in an interactive timeline view, this helps provide a visual representation of recent alert activity with the host and identifies potentially relevant alert patterns. You can pan and zoom on the timeline and hovering over a point will provide you with more details of the alert. Below this you are presented with a list view of all the alerts in the timeline, you can select an alert from the list to see the full details of the alert from Azure Sentinel. To view details of a different alert simply select another alert from the list. Before continuing with the Notebook select the alert you wish to focus on further, details of this alert will be used to scope elements of the investigation going forward.

 

Animated image showing running the Notebook host cellsAnimated image showing running the Notebook host cells

 

 

From this point the Notebook provides a series if analytics and visualizations focused on different areas, you can choose to run these sections in order or jump to a specific area of interest. At various points in this Notebook menu items are provided to allow you to jump to specific sections (you can also use the Table of Contents  at the top of the Notebook). Whilst all the sections can be run independently each cell within the section ties to previous cells and therefore cells within each section must be run in order. In addition all sections require you to complete the initial cells of authentication, scoping, and host overview.

 

Host Logons

Most Linux based intrusions involve attackers authenticating against infrastructure at some point, either as part of an initial compromise or later during lateral movement. Therefore the first analytics section in the Notebook is focused on Host Logons. Running this section will return a number of visualizations to help you understand the types of logons observed by the host within the time frame being investigated.

 

The first thing you will see when running cell under ‘Host Logon Events’ is another timeline. This timeline provides a breakdown of failed and successful logon attempts to the host. Overlaid on this is a marker showing the time of the alert you selected previously to provide a reference marker. As with the alert timeline you can scroll, pan, zoom and hover on items in the timeline in order to get more details. This timeline is particularly useful for identifying anomalous logon patterns such as brute force attempts.

 

Animated image of the host logons timelineAnimated image of the host logons timeline

 

 

 

Below this are a number of graphs showing a breakdown of logon attempts by various factors including whether they were successful or not, what user account was involved, and what process was involved. Again, these help quickly identify any elements that may stand out due to volume or scarcity.

Finally, there is a map showing the location of the source IP address associated with each logon attempt. The location is based on IP geolocation and therefore the accuracy should not be considered 100% reliable. However, it provides a useful guide to where logon attempts are coming from and can easily highlight logons from anomalous locations. Red markers are used to show failed logons, and green ones to show successful logons. You can zoom and pan the map to view these events as you wish. Please note that if failed logons have occurred from the same location as successful ones the red marker will be behind the green maker meaning that it may not be visible.

 

Animated image showing the host logon graphs and mapAnimated image showing the host logon graphs and map

 

 

Session Investigations

After looking at all logon events for the host we can choose to look closer at specific logon sessions. Running the cell under ‘Logon Sessions’ will return a list of all logon sessions, the session start time and end time, and the user involved. It will also show if the account is a root account on the host, if there was an alert associated with the host during that logon session, and the ratio of successful to failed logon events for that user account. If any of these elements are highlighted in yellow this indicates they may be logon sessions to focus on.  Below the list of logons sessions is a selection box from which you can select the session you wish to focus further investigation on.

 

Once you have selected a session the next cell will return a range of details on host activity during that session. This includes a breakdown of cron activity, sudo commands run, and users added, removed, or modified. If there are multiple users on the host simultaneously this activity will relate to all logon sessions during that host during the session time window. This is due to the fact this Notebook relies on syslog data which means associating host activity with specific logon sessions is not possible in a reliable manner. At the bottom of this cell is another timeline providing an overview of all the activity detailed in the cell. This again provides a very useful visual reference as to the chronology of events and what relationship they may have to each other.

 

Animated image showing session selection cells runningAnimated image showing session selection cells running

 

 

 

The two cells at the end of the section return raw syslog data to allow for further investigation, the first focusses on syslog associated with sudo events and is filtered by the sudo command run. To change the displayed syslog simply select the command you wish to focus on and the table will update. The next cell does the same but for all syslog generated during the logon session and is broken down by facility.

 


Animated image showing cells outputting user session log dataAnimated image showing cells outputting user session log data

 

 

 

Another useful datapoint for security analysts is process creation activity. Therefore the next cell produces a process tree for the analyst to interact with. The tree is created from auditd data, therefore you must have auditd enabled for this host and auditd data must be being collected by Azure Sentinel[2]. In addition due to the volume of data generated by auditd this cell can take some time to execute, if you are unsure if the cell is still executing or not you can use the kernel indicator in the top right of the Notebook window. If the indicator is a solid color this indicates that kernel is still executing.

 

Once complete the process tree displayed can be interacted with in the same way as the timelines seen previously, you can hover to get more details, scroll, pan, zoom , and use the sidebar to get a broader overview of the whole process tree.

 

Animated image showing running of the session process tree cellsAnimated image showing running of the session process tree cells

 

 

Sudo session investigation

Syslog provides us only limited details of user activity on the host, the exception being when a user conducts actions with elevated privileges using sudo. Given the power of sudo this provides a useful insight into potential attacker activity, therefore the next cells provide an insight into sudo activity within the user logon session selected previously.

 

Given that multiple sudo sessions may occur during a single logon session the first cell allows you to select a particular sudo session to focus on, with the subsequent cell providing details of all syslog associated with this session. In addition, any Indicators of Compromise (IoCs) present in the syslog messages related to the sudo session will be extracted and looked up in Threat Intelligence feeds to help identify any sudo activity that may be malicious.

 

Note: The IoC extraction can occasionally generate false positives, this is due to the difficulty in identifying the difference between say a domain name and a file name e.g. google.sh is a valid domain but could also be the name of a shell script.

 

 This cell provides details on a single sudo session at a time, to view details on another session select it from the list in the first cell and rerun the analysis cell.

 

Animated image showing sudo session selection cells runningAnimated image showing sudo session selection cells running

 

 

User Activity

During the course of your investigation or hunting activity you may identify a specific user to focus on, the next section of the Notebook is designed to cater for this. You can run this section individually or as a follow on from the host session cells we have just covered.

 

This section has a broader timeframe than the session only section and instead covers all user activity in the timeframe set initially in the Notebook (under the “Select Host to Investigate” heading). The initial cell provides a list of users observed in the logs from which you can select a user to focus on. The follow on cell provides an overview of the users activity. This is similar to the host logon view but is focused on activity only from the selected user.

 

Animated image showing the user investigation selection cells and user logon timelineAnimated image showing the user investigation selection cells and user logon timeline

 

There is also a summary of all sudo activity associated with that user. This section helps highlight specific user activity that may be anomalous and therefore warrant further investigation using the session investigation cells.

 

Animated image showing the user investigation graphs and mapAnimated image showing the user investigation graphs and map

 

The final cell of the section extracts IoCs from all syslog messages associated with the user and looks them up in threat intelligence feeds in order to identify any known malicious activity.

 

Application Activity

In a similar fashion as the User Activity section the Application Activity section allows you to focus your investigation on a specific application, this is particularly useful if you are searching for potential exploitation of a specific application or if you suspect an attacker may have run an application during their attack.

 

The first cell presents a list of applications for which logs are present that you can select from. The following cell presents an interactive graph of log volume from the application over time. This helps identify anomalous patterns or spikes over time. The first graph show the volume off all logs generated by the application, the second one shows only high priority messages generated ('emerg', 'alert', 'crit', 'err', and 'warning'). This separation can allow you to identify spikes in particularly interesting activity by removing the baseline of normal activity that might appear only as low priority messages.

 

Animated image showing the application investigation cells runningAnimated image showing the application investigation cells running

 

 

 

The other two cells in this section produce a process tree for the selected application. Due to the fact that process tree generation relies on auditd data, and the potential for large data volumes, there is a cell to change the timeframe to query to select a smaller window. The following cell that generates the process tree checks how many logs are being returned and if it surpasses 100,000 then it will prompt you to confirm if you wish to continue. Due to the high likelihood of a timeout with more than 100,000 lines of data it is strongly suggested that you adjust your timeframe if you are presented with this warning. If you need to query more data than this you can run this cell multiple times to generate process trees for different timeframes. The process tree returned is the same format as the one generated in the session section and can be interacted with in the same way.

 

Animated image showing application process tree cell runningAnimated image showing application process tree cell running

 

 

 

The final cell will extract IoCs from all logs associated with the selected application, look up these IoCs in threat intelligence feeds and if a match is made then return that matched IoC and the syslog message it was present in.

 

Animated image showing application data IoC extraction cells runningAnimated image showing application data IoC extraction cells running

 

 

Network Activity

The final analytical section of this Notebook focusses on Network activity. This section utilizes Azure Network Flow data, as well as identifying network activity present in syslog (such as SSH connection attempts). If Azure Flow Data is present the first cell will display a number of visualizations detailing network flow broken down by protocol and direction, if only syslog data is available these visualizations are not shown due to a lack of reliable data regarding flow direction or protocol.

 

The next cells allow you to focus your investigation on specific IP addresses, due to the volume of IP addresses often seen the first cell will resolve the ASN owner for each address and present a list of ASNs for you to select from. The cell after this will list all the IP addresses observed associated with that ASN, from which you can select a specific IP address to look at further. The final cell will then look up the selected IP address in threat intelligence, return details on any matches and also return details on all syslog messages containing the IP address to help you identify where malicious activity may have occured.

 

Animated image showing network analysis cells runningAnimated image showing network analysis cells running

 

 

Summary

The Linux Explorer Notebook is a powerful tool for investigating a Linux host or hunting for threats. It can be used as an end to end investigation flow or used in sections as required based on the flow and focus of the investigation. However, it does not cover every conceivable scenario or environment, the real value of Notebooks is that this isn’t a limitation as you can customize these Notebooks to fit your needs, or you can create your own Notebook using elements from the Notebooks we have provided or entirely from scratch. There are virtually endless possibilities.

 

If you are looking to create your own Notebooks please make sure you check out MSTICpy as there is a good chance that it will contain features that will save you time and effort in creating what you need. Also, we are keen for any input, suggestions, issues or contributions to MSTICpy so please do feel free to contribute if you wish. In the same vein if you have Notebook that you would like to see included in the Azure Sentinel portal please let us know in the comments below or raise a issue on Github, we are always keen to get feedback and ideas from our customers.

 

 

[1] If you don’t want to use Azure Notebooks you can also download the Explorer Notebook and run it from a local Jupyter instance.

 

[2] https://msticpy.readthedocs.io/en/latest/data_acquisition/CollectingLinuxAuditLogs.html#configure-au...

1 Comment

Thank you Pete for Sharing with the community :cool: