%3CLINGO-SUB%20id%3D%22lingo-sub-1594169%22%20slang%3D%22en-US%22%3EMSTIC%20Notebooklets%20-%20Fast%20Tracking%20CyberSec%20Jupyter%20Notebooks%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1594169%22%20slang%3D%22en-US%22%3E%3CP%3EWe%E2%80%99re%20very%20happy%20to%20announce%2C%20after%20a%20several%20months%20work%2C%20the%20release%20of%20a%20new%20Python%2FJupyter%20notebooks%20package%20%E2%80%94%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fmsticnb.readthedocs.io%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%3CSTRONG%3EMSTICnb%3C%2FSTRONG%3E%3C%2FA%3E%2C%20or%20MSTIC%26nbsp%3B%3CEM%3Enotebooklets%3C%2FEM%3E.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EMSTICnb%26nbsp%3B%3C%2FSTRONG%3Eis%20a%20companion%20package%20to%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fmsticpy.readthedocs.io%2Fen%2Flatest%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%3CSTRONG%3EMSTICpy%3C%2FSTRONG%3E%3C%2FA%3E.%20It%20is%20designed%20to%20be%20used%20in%20Jupyter%20notebooks%20by%20security%20operations%20engineers%20and%20analysts%2C%20to%20allow%20them%20to%20quickly%2C%20and%20easily%2C%20run%20common%20notebook%20patterns%20such%20as%20retrieving%20summary%20information%20about%20a%20host%2C%20an%20account%20or%20IP%20address.%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%20image-alt%3D%22msticnb-browser.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F212835iC57DDA5437307033%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22msticnb-browser.png%22%20alt%3D%22msticnb-browser.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EEach%20notebooklet%20is%20equivalent%20to%20multiple%20cells%20and%20many%20lines%20of%20code%20in%20a%20traditional%20notebook.%20By%20contrast%2C%20you%20can%20import%20and%20run%20a%20notebooklet%20in%20just%20two%20lines%20of%20code%20(or%20even%20one%20line%2C%20if%20you%20are%20impatient!).%20Typically%2C%20the%20input%20parameters%20to%20a%20notebooklet%20will%20be%20an%26nbsp%3B%3CEM%3Eidentifier%26nbsp%3B%3C%2FEM%3E(e.g.%20a%20host%20name)%20and%20a%26nbsp%3B%3CEM%3Etime%20range%3C%2FEM%3E%26nbsp%3B(over%20which%20to%20query%20data).%20Although%20some%20notebooklets%20(primarily%20packaged%20analytics)%20will%20take%20a%20pandas%26nbsp%3B%3CEM%3EDataFrame%26nbsp%3B%3C%2FEM%3Eas%20input.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20notebooklets%20that%20we%20have%20created%20so%20far%20are%20derived%20from%20the%20some%20of%20the%20notebooks%20published%20on%20the%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2FAzure%2FAzure-Sentinel-Notebooks%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%3CSTRONG%3EAzure-Sentinel-Notebooks%3C%2FSTRONG%3E%3C%2FA%3E%26nbsp%3BGitHub%20repo.%20This%20makes%20it%20easy%20for%20you%20to%20use%20these%20patterns%20without%20a%20lot%20of%20tedious%20copying%20and%20pasting.%20You%20can%20also%20create%20your%20own%20notebooklets%20and%20use%20them%20in%20the%20same%20framework%20as%20the%20ones%20already%20in%20the%20package.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIt%20you%20want%20to%20dive%20straight%20into%20the%20details%20of%20what%20notebooklets%20are%20available%20you%20can%20skip%20the%20next%20section%20but%20if%20you%20are%20interested%20in%20the%20philosophy%20and%20some%20of%20the%20frequent%20questions%20and%20answers%20around%20MSTICnb%20read%20on.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId--1293516724%22%20id%3D%22toc-hId--1293516724%22%3E%3CSTRONG%3ENotebooklets%20Background%3C%2FSTRONG%3E%3C%2FH2%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId--602955250%22%20id%3D%22toc-hId--602955250%22%3E%3CSTRONG%3EWhat%20are%20notebooklets%3F%3C%2FSTRONG%3E%3C%2FH3%3E%0A%3CP%3ENotebooklets%20are%20collections%20of%20notebook%20cells%20that%20implement%20some%20useful%20reusable%20sequence.%20They%20are%20extensions%20of%2C%20and%20build%20upon%20the%20MSTICpy%20package%20and%20are%20designed%20to%20streamline%20authoring%20of%20Jupyter%20notebooks%20for%20security%20operations%20engineers%20and%20analysts%20conducting%20hunting%20and%20investigations.%20The%20goal%20of%20notebooklets%20is%20to%20replace%20repetitive%20and%20lengthy%20boilerplate%20code%20in%20notebooks%20for%20common%20operations.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ESome%20examples%20of%20these%20operations%20are%3A%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EGet%20a%20host%20summary%20for%20a%20named%20host%20(IP%20address%2C%20cloud%20registration%20information%2C%20recent%20alerts)%3C%2FLI%3E%0A%3CLI%3EGet%20account%20activity%20for%20an%20account%20(host%20and%20cloud%20logons%20and%20failures%2C%20summary%20of%20recent%20activity%20and%20any%20related%20alerts)%3C%2FLI%3E%0A%3CLI%3ETriage%20alerts%20with%20Threat%20Intel%20data%20(prioritize%20your%20alerts%20by%20correlating%20with%20Threat%20intel%20sources)%20and%20browse%20through%20them.%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CH3%20id%3D%22toc-hId-1884557583%22%20id%3D%22toc-hId-1884557583%22%3E%3CSTRONG%3EIntended%20Audience%3C%2FSTRONG%3E%3C%2FH3%3E%0A%3CUL%3E%0A%3CLI%3ECyber%20security%20investigators%20and%20hunters%20using%20Jupyter%20notebooks%20for%20their%20work%3C%2FLI%3E%0A%3CLI%3ESecurity%20Ops%20Center%20(SOC)%20engineers%2FSecDevOps%20building%20reusable%20notebooks%20for%20SOC%20analysts%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CH3%20id%3D%22toc-hId-77103120%22%20id%3D%22toc-hId-77103120%22%3E%3CSTRONG%3EWhy%20did%20we%20create%20notebooklets%3F%3C%2FSTRONG%3E%3C%2FH3%3E%0A%3COL%3E%0A%3CLI%3E%3CP%3ENotebook%20code%20can%20quickly%20become%20complex%20and%20lengthy%20so%20that%20it%3A%3C%2FP%3E%0A%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%20class%3D%22lia-indent-padding-left-60px%22%3E-%20obscures%20the%20information%20you%20are%20trying%20to%20display%3C%2FP%3E%0A%3CP%20class%3D%22lia-indent-padding-left-60px%22%3E-%20can%20be%20intimidating%20to%20non-developers%3C%2FP%3E%0A%3CP%20class%3D%22lia-indent-padding-left-60px%22%3E%26nbsp%3B%3C%2FP%3E%0A%3COL%20start%3D%222%22%3E%0A%3CLI%3ECode%20in%20notebook%20code%20cells%20is%20not%20easily%20re-useable%3A%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%20class%3D%22lia-indent-padding-left-60px%22%3E-%20You%20can%20copy%20and%20paste%20but%20how%20do%20you%20sync%20changes%20back%20to%20the%20original%20notebook%3F%3C%2FP%3E%0A%3CP%20class%3D%22lia-indent-padding-left-60px%22%3E-%20Difficult%20to%20discover%20code%20snippets%20in%20notebooks%3C%2FP%3E%0A%3CP%20class%3D%22lia-indent-padding-left-60px%22%3E%26nbsp%3B%3C%2FP%3E%0A%3COL%20start%3D%223%22%3E%0A%3CLI%3ENotebook%20code%20is%20fragile%20if%20you%20try%20to%20re-use%20it%3A%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%20class%3D%22lia-indent-padding-left-60px%22%3E-%20Often%20not%20parameterized%20or%20modular%3C%2FP%3E%0A%3CP%20class%3D%22lia-indent-padding-left-60px%22%3E-%20Code%20blocks%20are%20frequently%20dependent%20on%20global%20values%20assigned%20earlier%20in%20the%20notebook.%3C%2FP%3E%0A%3CP%20class%3D%22lia-indent-padding-left-60px%22%3E-%20Output%20data%20is%20not%20in%20any%20standard%20format%3C%2FP%3E%0A%3CP%20class%3D%22lia-indent-padding-left-60px%22%3E-%20The%20code%20is%20difficult%20to%20test%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId--1730351343%22%20id%3D%22toc-hId--1730351343%22%3E%3CSTRONG%3EWhy%20aren%E2%80%99t%20notebooklets%20part%20of%20MSTICpy%3F%3C%2FSTRONG%3E%3C%2FH3%3E%0A%3CUL%3E%0A%3CLI%3EMSTICpy%20aims%20to%20be%20platform-independent%2C%20whereas%20most%2C%20if%20not%20all%2C%20notebooklets%20assume%20a%20data%20schema%20that%20is%20specific%20to%20their%20data%20provider%2FSIEM.%3C%2FLI%3E%0A%3CLI%3EMSTICpy%20is%20mostly%20for%20discrete%20functions%20such%20as%20data%20acquisition%2C%20analysis%20and%20visualization.%20MSTICnb%20implements%20common%20SOC%20scenarios%20using%20this%20functionality.%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CH3%20id%3D%22toc-hId-757161490%22%20id%3D%22toc-hId-757161490%22%3E%3CSTRONG%3ETraditional%20Notebook%20vs.%20one%20using%20a%20notebooklets%3C%2FSTRONG%3E%3C%2FH3%3E%0A%3CP%3EThe%20notebook%20on%20the%20left%20is%20using%20mostly%20inline%20code%20(occupying%20more%20than%2050%25%20of%20the%20notebook).%20The%20one%20on%20the%20right%20is%20using%20a%20single%20notebooklet%20with%20only%203%20or%204%20lines%20of%20code.%20The%20second%20notebook%20is%20actually%20doing%20much%20more%20than%20the%20first%20one%20but%20we%E2%80%99d%20have%20ended%20up%20with%204-foot%20high%20graphic%20if%20we%20displayed%20equivalent%20functionality%20side-by-side!%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%20image-alt%3D%22NBComparison.png%22%20style%3D%22width%3A%20510px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F212838i7C11EC2F2E56515F%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22NBComparison.png%22%20alt%3D%22Notebook%20comparison%20without%20and%20with%20notebooklets%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3ENotebook%20comparison%20without%20and%20with%20notebooklets%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId-746658386%22%20id%3D%22toc-hId-746658386%22%3E%3CSTRONG%3EUsing%20Notebooklets%3C%2FSTRONG%3E%3C%2FH2%3E%0A%3CP%3EThere%20are%20a%20few%20simple%20steps%20to%20using%20notebooklets%3A%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EInstall%20the%20package%20(obviously!)%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CPRE%20class%3D%22lia-indent-padding-left-30px%22%3Epip%20install%20msticnb%3C%2FPRE%3E%0A%3CUL%3E%0A%3CLI%3E%0A%3CP%3EImport%3C%2FP%3E%0A%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CPRE%20class%3D%22lia-indent-padding-left-30px%22%3Eimport%20msticnb%20as%20nb%3C%2FPRE%3E%0A%3CUL%3E%0A%3CLI%3EInitialize%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CPRE%20class%3D%22lia-indent-padding-left-30px%22%3Enb.init(%22AzureSentinel%22)%26nbsp%3B%3C%2FPRE%3E%0A%3CP%20class%3D%22lia-indent-padding-left-30px%22%3E(what%20you%20type%20here%20will%20depend%20on%20your%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fmsticpy.readthedocs.io%2Fen%2Flatest%2Fdata_acquisition%2FDataProviders.html%23description%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Edata%20provider%3C%2FA%3E%2C%20you%20might%20also%20need%20some%20additional%20initialization%20info).%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20notebooklets%20are%20read%20into%20the%20package%20and%20can%20be%20accessed%20using%20the%20browser%20(shown%20in%20the%20first%20image%20in%20the%20article)%20or%20by%20typing%2Fautocompleting.%20The%20notebooklets%20are%20organized%20in%20a%20hierarchical%20structure%3A%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-indent-padding-left-30px%22%3Enb.%7B%3CEM%3EDataProvider%3C%2FEM%3E%7D.%7B%3CEM%3ECategory%3C%2FEM%3E%7D.%7B%3CEM%3Enotebooklet%3C%2FEM%3E%7D%3C%2FPRE%3E%0A%3CP%3EThe%26nbsp%3B%3CEM%3ECategory%26nbsp%3B%3C%2FEM%3Eelement%20will%20generally%20refer%20to%20the%20type%20of%20entity%20the%20notebooklet%20is%20focused%20on.%20Currently%20we%20have%20categories%20of%20host%2C%20network%2C%20alert%20and%20account.%3C%2FP%3E%0A%3CP%3EEach%20notebooklet%20has%20a%26nbsp%3B%3CEM%3Erun()%3C%2FEM%3E%26nbsp%3Bmethod%20which%20executes%20the%20main%20code%20(and%20usually%20requires%20parameters%20such%20as%20an%20identifier%20(e.g.%20a%20host%20name%20%E2%80%94%20what%20you%20want%20to%20look%20at)%20and%20a%20time%20span%20(when%20do%20you%20want%20to%20look%20at%20it).%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22msticnb-run-cell.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F212842i49DD4BFBDF576F14%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20title%3D%22msticnb-run-cell.png%22%20alt%3D%22msticnb-run-cell.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EMany%20notebooklets%20have%20additional%20methods%20to%20do%20further%20drill-down%2C%20data%20retrieval%2C%20visualization%20or%20other%20operations%20once%20the%26nbsp%3B%3CEM%3Erun%3C%2FEM%3E%26nbsp%3Bmethod%20has%20completed.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20notebooklet%20displays%20output%20directly%20to%20the%20notebook%20(although%20this%20can%20be%20suppressed)%20%E2%80%94%20showing%20text%2C%20data%20tables%20and%20visualizations.%20This%20data%20is%20all%20saved%20to%20a%26nbsp%3B%3CEM%3EResults%26nbsp%3B%3C%2FEM%3Eobject.%20The%20data%20items%20are%20simple%20properties%20of%20this%20results%20object%2C%20for%20example%2C%20DataFrames%2C%20plots%2C%20or%20simple%20Python%20objects.%20You%20can%20access%20these%20individually%20to%20get%20at%20the%20data.%20The%20results%20objects%20also%20know%20how%20to%20display%20themselves%20in%20a%20notebook%20%E2%80%94%20you%20can%20just%20type%20its%20name%20into%20and%20empty%20cell%20and%20run%20the%20cell.%20Here%E2%80%99s%20an%20example%20of%20what%20the%20output%20might%20look%20like%3A%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%20image-alt%3D%22msticnb-run.png%22%20style%3D%22width%3A%20628px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F212843iA3D48179DB004D07%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22msticnb-run.png%22%20alt%3D%22Partial%20output%20from%20WinEventSummary%20notebooklet%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EPartial%20output%20from%20WinEventSummary%20notebooklet%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EEach%20notebooklet%20has%20extensive%20built-in%20help%2C%20which%20is%20displayed%20in%20the%20browser%20or%20can%20be%20displayed%20using%20the%20%3CEM%3Eshow_help()%3C%2FEM%3E%26nbsp%3Bfunction.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22msticnb-help.png%22%20style%3D%22width%3A%20850px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F212845i964B34AC2E881CC4%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22msticnb-help.png%22%20alt%3D%22msticnb-help.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId--1060796077%22%20id%3D%22toc-hId--1060796077%22%3E%3CSTRONG%3ECurrent%20Notebooklets%3C%2FSTRONG%3E%3C%2FH2%3E%0A%3CP%3EOur%20notebooklet%20authoring%20is%20at%20an%20early%20stage%20but%20we%20intend%20to%20keep%20adding%20them%20(we%20have%20a%20lot%20of%20candidate%20patterns%20currently%20stranded%20in%20their%20original%20notebooks).%20All%20of%20the%20current%20notebooklets%20are%20specific%20to%20Azure%20Sentinel%20data%20but%20we%20would%20welcome%20contributions%20of%20equivalent%20or%20other%20functionality%20for%20other%20SIEM%20platforms%20(we%E2%80%99re%20always%20willing%20to%20work%20with%20you%20on%20this).%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId--370234603%22%20id%3D%22toc-hId--370234603%22%3E%3CSTRONG%3EAccountSummary%3C%2FSTRONG%3E%3C%2FH3%3E%0A%3CP%3ERetrieves%20account%20summary%20for%20an%20account%20name.%20You%20can%20see%20an%20example%20of%20the%20use%20of%20this%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fnbviewer.jupyter.org%2Fgithub%2Fmicrosoft%2Fmsticnb%2Fblob%2Fmaster%2Fdocs%2Fnotebooks%2FAccountSummary.ipynb%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Enotebooklet%20in%20an%20notebook%20here%3C%2FA%3E%26nbsp%3B(all%20in%2013%20lines%20of%20Python%20code).%20The%20notebooklet%3A%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3ESearches%20for%20matches%20for%20the%20account%20name%20in%20Active%20Directory%2C%20Windows%20and%20Linux%20host%20logs.%3C%2FLI%3E%0A%3CLI%3EIf%20one%20or%20more%20matches%20are%20found%20it%20will%20return%20a%20selection%20widget%20that%20you%20can%20use%20to%20pick%20the%20account.%3C%2FLI%3E%0A%3CLI%3ESelecting%20the%20account%20displays%20a%20summary%20of%20recent%20activity%20and%20retrieves%20any%20alerts%20and%20hunting%20bookmarks%20related%20to%20the%20account%3C%2FLI%3E%0A%3CLI%3EThe%20alerts%20and%20bookmarks%20are%20browsable%20using%20the%26nbsp%3Bbrowse_alerts%26nbsp%3Band%26nbsp%3Bbrowse_bookmarks%26nbsp%3Bmethods%3C%2FLI%3E%0A%3CLI%3EYou%20can%20call%20the%26nbsp%3Bfind_additional_datamethod%20to%20retrieve%20and%20display%20more%20detailed%20activity%20information%20for%20the%20account.%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId-2117278230%22%20id%3D%22toc-hId-2117278230%22%3E%3CSTRONG%3EEnrichAlerts%3C%2FSTRONG%3E%3C%2FH3%3E%0A%3CP%3EThis%20simple%20notebooklet%20takes%20all%20alerts%20for%20a%20given%20time%20frame%20and%20enriches%20them%20with%20a%20number%20of%20external%20Threat%20Intelligence%20(TI)%20providers.%20From%20here%20users%20can%20select%20an%20alert%20to%20see%20additional%20details%20on%20the%20alert%20itself%20as%20well%20as%20the%20associated%20TI%20results.%20This%20helps%20analysts%20triage%20and%20prioritize%20alerts%20quickly%20and%20effectively.%20This%20notebooklet%20uses%20the%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fmsticpy.readthedocs.io%2Fen%2Flatest%2Fdata_acquisition%2FTIProviders.html%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3ETI%20providers%20feature%20of%20MSTICpy%3C%2FA%3E%2C%20and%20as%20such%2C%20users%20will%20need%20to%20configure%20TI%20providers%20before%20using%20this%20notebooklet.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22EnrichAlerts.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F212850iC95F7D9110F121E0%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22EnrichAlerts.png%22%20alt%3D%22Alert%20enrichment%20notebooklet%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EAlert%20enrichment%20notebooklet%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId--385339712%22%20id%3D%22toc-hId--385339712%22%3E%3CSTRONG%3EHostSummary%3C%2FSTRONG%3E%3C%2FH3%3E%0A%3CP%3EThe%20HostSummary%20notebooklet%20queries%20and%20displays%20information%20about%20a%20host%20(Windows%20or%20Linux)%20including%3A%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EIP%20address%20assignment%3C%2FLI%3E%0A%3CLI%3ERelated%20alerts%3C%2FLI%3E%0A%3CLI%3ERelated%20hunting%2Finvestigation%20bookmarks%3C%2FLI%3E%0A%3CLI%3EAzure%20subscription%2Fresource%20data.%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22HostSummary.png%22%20style%3D%22width%3A%20860px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F212852i3FB90C455114529F%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22HostSummary.png%22%20alt%3D%22Host%20summary%20notebooklet%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EHost%20summary%20notebooklet%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId-2102173121%22%20id%3D%22toc-hId-2102173121%22%3E%3CSTRONG%3EHostLogonsSummary%3C%2FSTRONG%3E%3C%2FH3%3E%0A%3CP%3EThis%20notebooklet%20provides%20a%20summary%20of%20logon%20events%20for%20a%20given%20host%20in%20a%20specified%20time%20frame.%20The%20notebooklet%20supports%20both%20Windows%20and%20Linux%20hosts%2C%20all%20that%20needs%20to%20be%20provided%20is%20a%20full%20or%20partial%20hostname.%20The%20purpose%20of%20this%20notebooklet%20is%20to%20give%20analysts%20a%20high%20level%20overview%20of%20all%20logon%20activity%20on%20a%20host%20during%20a%20timeframe%20of%20interest%20and%20help%20them%20identify%20specific%20logon%20sessions%20that%20warrant%20additional%20investigation.%20The%20notebooklet%20contains%20several%20sections%20including%3A%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3ELogon%20timeline%20%E2%80%94%20a%20timeline%20of%20all%20logon%20attempts%20(both%20failed%20and%20successful)%20to%20the%20host%20broken%20down%20by%20the%20logon%20result.%20This%20visual%20guide%20makes%20it%20easy%20to%20identify%20brute%20force%20attempts%20or%20other%20suspicious%20logon%20patterns.%3C%2FLI%3E%0A%3CLI%3ELogon%20map%20%E2%80%94%20an%20interactive%20geospatial%20representation%20of%20logon%20events%20based%20on%20the%20IP%20geolocation%20of%20the%20remote%20IP%20addresses%20involved.%20This%20helps%20identify%20logon%20events%20from%20anomalous%20or%20suspicious%20locations.%3C%2FLI%3E%0A%3CLI%3EUser%20and%20process%20graphs%20%E2%80%94%20visual%20breakdowns%20of%20logon%20attempts%20by%20user%20and%20by%20process%20to%20help%20identify%20primary%20logon%20vectors.%3C%2FLI%3E%0A%3CLI%3ELogon%20matrix%20%E2%80%94%20a%20heatmap%20of%20user%2C%20process%2C%20and%20logon%20results%20to%20help%20identify%20any%20specifically%20high%20or%20low%20volume%20logon%20cases%20for%20additional%20investigation.%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22HostLogonsSummary.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F212851i6BBB93B86C2947F9%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22HostLogonsSummary.png%22%20alt%3D%22HostLogonsSummary.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId-294718658%22%20id%3D%22toc-hId-294718658%22%3E%3CSTRONG%3EWinHostEvents%3C%2FSTRONG%3E%3C%2FH3%3E%0A%3CP%3EThe%20WindowsHostEvents%20notebooklet%20queries%20and%20displays%20Windows%20Security%20Events.%20This%20focuses%20on%20events%20other%20than%20the%20common%20process%20creation%20(4688)%20and%20account%20logon%20(4624%2C%204625)%20events%2C%20aiming%20to%20give%20you%20a%20better%20idea%20of%20what%20else%20was%20going%20on%20on%20this%20host.%20Some%20features%3A%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3ESummarized%20display%20of%20all%20security%20events%20and%20accounts%20that%20triggered%20them.%3C%2FLI%3E%0A%3CLI%3EExtracting%20and%20displaying%20account%20management%20events%3C%2FLI%3E%0A%3CLI%3EAccount%20management%20event%20timeline%3C%2FLI%3E%0A%3CLI%3EOptionally%20parsing%20packed%20XML%20event%20data%20into%20DataFrame%20columns%20for%20specific%20event%20types.%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22WinHostEvents.png%22%20style%3D%22width%3A%20902px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F212854i73CD956699FDCED1%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22WinHostEvents.png%22%20alt%3D%22Windows%20Security%20Events%20notebooklet%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EWindows%20Security%20Events%20notebooklet%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId--1512735805%22%20id%3D%22toc-hId--1512735805%22%3E%3CSTRONG%3ENetworkFlowSummary%3C%2FSTRONG%3E%3C%2FH3%3E%0A%3CP%3EThe%20network%20flow%20summary%20notebooklet%20queries%20Azure%20network%20data%20and%20plots%20time%20lines%20for%20network%20traffic%20to%2Ffrom%20a%20host%20or%20IP%20address.%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EPlot%20flows%20events%20by%20protocol%20and%20direction%3C%2FLI%3E%0A%3CLI%3EPlot%20flow%20count%20by%20protocol%3C%2FLI%3E%0A%3CLI%3EDisplay%20flow%20summary%20table%3C%2FLI%3E%0A%3CLI%3EDisplay%20flow%20summary%20by%20ASN%3C%2FLI%3E%0A%3CLI%3EDisplay%20IP%20location%20results%20on%20a%20map%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22NetworkFlowSummary.png%22%20style%3D%22width%3A%20923px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F212853iEA2337A41DA4F2D6%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22NetworkFlowSummary.png%22%20alt%3D%22NetworkFlowSummary.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-845694309%22%20id%3D%22toc-hId-845694309%22%3E%3CSTRONG%3EConclusion%3C%2FSTRONG%3E%3C%2FH2%3E%0A%3CP%3EIf%20you%E2%80%99ve%20made%20it%20this%20far%20in%20the%20document%2C%20congratulations!%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EOver%20the%20next%20few%20months%20we%E2%80%99ll%20be%20adding%20to%20the%20the%20repository%20of%20notebooklets.%20One%20of%20the%20things%20we%20most%20want%20to%20do%20is%20package%20some%20of%20our%20analytics%20into%20an%20easy-to-use%20format%20in%20notebooklets.%20We%E2%80%99d%20love%20any%20input%20on%20notebooklets%20you%E2%80%99d%20like%20to%20see.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIf%20you%20are%20eager%20to%20read%20more%2C%20there%20is%20more%20detailed%20documentation%20on%20our%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fmsticnb.readthedocs.io%2Fen%2Flatest%2Findex.html%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3EReadtheDocs%20pages%3C%2FA%3E.%20The%20code%20is%20all%20open%20source%20and%20can%20be%20seen%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fmicrosoft%2Fmsticnb%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehere%3C%2FA%3E.%20You%20can%20install%20the%20package%20from%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fpypi.org%2Fproject%2Fmsticnb%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3EPyPi%3C%2FA%3E%26nbsp%3Busing%26nbsp%3Bpip.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIf%20you%20want%20to%20explore%20creating%20your%20own%20notebooklets%20and%2C%20either%20contribute%20them%20to%20the%20package%2C%20or%20just%20use%20them%20yourself%2C%20we%E2%80%99ve%20created%20a%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fmicrosoft%2Fmsticnb%2Ftree%2Fmaster%2Fmsticnb%2Fnb%2Ftemplate%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3Etemplate%20notebooklet%3C%2FA%3E%20and%20accompanying%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fmsticnb.readthedocs.io%2Fen%2Flatest%2Fcreatingnotebooklets.html%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Edocumentation%26nbsp%3B%3C%2FA%3Eto%20guide%20you%20through%20the%20process.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EPlease%20post%20any%20issues%2C%20questions%2C%20or%20requests%20for%20new%20notebooklets%20on%20the%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fmicrosoft%2Fmsticnb%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3Emsticnb%20GitHub%20repo%3C%2FA%3E%26nbsp%3Bor%20reach%20out%20directly%20on%20Twitter%20to%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftwitter.com%2Fianhellen%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Eianhellen%3C%2FA%3E%2C%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftwitter.com%2Fmsspete%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3EMSSPete%3C%2FA%3E%2C%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftwitter.com%2Fashwinpatil%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3EAshwinPatil%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIan%20Hellen%3C%2FP%3E%0A%3CP%3EPrincipal%20software%20engineer%20at%20Microsoft%20and%20one%20of%20the%20authors%2Fmaintainers%20of%20MSTICpy%20and%20MSTICnb%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-1594169%22%20slang%3D%22en-US%22%3E%3CP%3E%3CSTRONG%3EMSTICnb%26nbsp%3B%3C%2FSTRONG%3Eis%20a%20companion%20package%20to%26nbsp%3B-ERR%3AREF-NOT-FOUND-%3CSTRONG%3EMSTICpy%3C%2FSTRONG%3E.%20It%20is%20designed%20to%20be%20used%20in%20Jupyter%20notebooks%20by%20security%20operations%20engineers%20and%20analysts%2C%20to%20allow%20them%20to%20quickly%2C%20and%20easily%2C%20run%20common%20notebook%20patterns%20such%20as%20retrieving%20summary%20information%20about%20a%20host%2C%20an%20account%20or%20IP%20address.%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%20image-alt%3D%22msticnb-browser.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F212835iC57DDA5437307033%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22msticnb-browser.png%22%20alt%3D%22msticnb-browser.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20class%3D%22ic%20id%20bi%20ie%20b%20if%20ig%20ih%20ii%20ij%20ik%20il%20im%20in%20io%20ip%20iq%20ir%20is%20it%20iu%20iv%20iw%20ix%20iy%20iz%20gf%20cw%22%20style%3D%22box-sizing%3A%20inherit%3B%20margin%3A%202em%200px%20-0.46em%3B%20font-weight%3A%20400%3B%20font-style%3A%20normal%3B%20color%3A%20%23292929%3B%20word-break%3A%20break-word%3B%20line-height%3A%2032px%3B%20letter-spacing%3A%20-0.003em%3B%20font-family%3A%20medium-content-serif-font%2C%20Georgia%2C%20Cambria%2C%20'Times%20New%20Roman'%2C%20Times%2C%20serif%3B%20font-size%3A%2021px%3B%20font-variant-ligatures%3A%20normal%3B%20font-variant-caps%3A%20normal%3B%20orphans%3A%202%3B%20text-align%3A%20start%3B%20text-indent%3A%200px%3B%20text-transform%3A%20none%3B%20white-space%3A%20normal%3B%20widows%3A%202%3B%20word-spacing%3A%200px%3B%20-webkit-text-stroke-width%3A%200px%3B%20background-color%3A%20%23ffffff%3B%20text-decoration-style%3A%20initial%3B%20text-decoration-color%3A%20initial%3B%22%20data-selectable-paragraph%3D%22%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22msticnb-browser.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F212835iC57DDA5437307033%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22msticnb-browser.png%22%20alt%3D%22msticnb-browser.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1594169%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EHunting%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EInvestigation%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EWhat's%20New%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Microsoft

We’re very happy to announce, after a several months work, the release of a new Python/Jupyter notebooks package — MSTICnb, or MSTIC notebooklets.

 

MSTICnb is a companion package to MSTICpy. It is designed to be used in Jupyter notebooks by security operations engineers and analysts, to allow them to quickly, and easily, run common notebook patterns such as retrieving summary information about a host, an account or IP address.

 

msticnb-browser.png

 

Each notebooklet is equivalent to multiple cells and many lines of code in a traditional notebook. By contrast, you can import and run a notebooklet in just two lines of code (or even one line, if you are impatient!). Typically, the input parameters to a notebooklet will be an identifier (e.g. a host name) and a time range (over which to query data). Although some notebooklets (primarily packaged analytics) will take a pandas DataFrame as input.

 

The notebooklets that we have created so far are derived from the some of the notebooks published on the Azure-Sentinel-Notebooks GitHub repo. This makes it easy for you to use these patterns without a lot of tedious copying and pasting. You can also create your own notebooklets and use them in the same framework as the ones already in the package.

 

It you want to dive straight into the details of what notebooklets are available you can skip the next section but if you are interested in the philosophy and some of the frequent questions and answers around MSTICnb read on.

 

Notebooklets Background

 

What are notebooklets?

Notebooklets are collections of notebook cells that implement some useful reusable sequence. They are extensions of, and build upon the MSTICpy package and are designed to streamline authoring of Jupyter notebooks for security operations engineers and analysts conducting hunting and investigations. The goal of notebooklets is to replace repetitive and lengthy boilerplate code in notebooks for common operations.

 

Some examples of these operations are:

  • Get a host summary for a named host (IP address, cloud registration information, recent alerts)
  • Get account activity for an account (host and cloud logons and failures, summary of recent activity and any related alerts)
  • Triage alerts with Threat Intel data (prioritize your alerts by correlating with Threat intel sources) and browse through them.

Intended Audience

  • Cyber security investigators and hunters using Jupyter notebooks for their work
  • Security Ops Center (SOC) engineers/SecDevOps building reusable notebooks for SOC analysts

Why did we create notebooklets?

  1. Notebook code can quickly become complex and lengthy so that it:

- obscures the information you are trying to display

- can be intimidating to non-developers

 

  1. Code in notebook code cells is not easily re-useable:

- You can copy and paste but how do you sync changes back to the original notebook?

- Difficult to discover code snippets in notebooks

 

  1. Notebook code is fragile if you try to re-use it:

- Often not parameterized or modular

- Code blocks are frequently dependent on global values assigned earlier in the notebook.

- Output data is not in any standard format

- The code is difficult to test

Why aren’t notebooklets part of MSTICpy?

  • MSTICpy aims to be platform-independent, whereas most, if not all, notebooklets assume a data schema that is specific to their data provider/SIEM.
  • MSTICpy is mostly for discrete functions such as data acquisition, analysis and visualization. MSTICnb implements common SOC scenarios using this functionality.

Traditional Notebook vs. one using a notebooklets

The notebook on the left is using mostly inline code (occupying more than 50% of the notebook). The one on the right is using a single notebooklet with only 3 or 4 lines of code. The second notebook is actually doing much more than the first one but we’d have ended up with 4-foot high graphic if we displayed equivalent functionality side-by-side!

 

Notebook comparison without and with notebookletsNotebook comparison without and with notebooklets

 

Using Notebooklets

There are a few simple steps to using notebooklets:

  • Install the package (obviously!)
pip install msticnb
  • Import

import msticnb as nb
  • Initialize
nb.init("AzureSentinel") 

(what you type here will depend on your data provider, you might also need some additional initialization info).

 

The notebooklets are read into the package and can be accessed using the browser (shown in the first image in the article) or by typing/autocompleting. The notebooklets are organized in a hierarchical structure:

nb.{DataProvider}.{Category}.{notebooklet}

The Category element will generally refer to the type of entity the notebooklet is focused on. Currently we have categories of host, network, alert and account.

Each notebooklet has a run() method which executes the main code (and usually requires parameters such as an identifier (e.g. a host name — what you want to look at) and a time span (when do you want to look at it).

msticnb-run-cell.png

 

Many notebooklets have additional methods to do further drill-down, data retrieval, visualization or other operations once the run method has completed.

 

The notebooklet displays output directly to the notebook (although this can be suppressed) — showing text, data tables and visualizations. This data is all saved to a Results object. The data items are simple properties of this results object, for example, DataFrames, plots, or simple Python objects. You can access these individually to get at the data. The results objects also know how to display themselves in a notebook — you can just type its name into and empty cell and run the cell. Here’s an example of what the output might look like:

 

Partial output from WinEventSummary notebookletPartial output from WinEventSummary notebooklet

 

Each notebooklet has extensive built-in help, which is displayed in the browser or can be displayed using the show_help() function.

msticnb-help.png

Current Notebooklets

Our notebooklet authoring is at an early stage but we intend to keep adding them (we have a lot of candidate patterns currently stranded in their original notebooks). All of the current notebooklets are specific to Azure Sentinel data but we would welcome contributions of equivalent or other functionality for other SIEM platforms (we’re always willing to work with you on this).

 

AccountSummary

Retrieves account summary for an account name. You can see an example of the use of this notebooklet in an notebook here (all in 13 lines of Python code). The notebooklet:

  • Searches for matches for the account name in Active Directory, Windows and Linux host logs.
  • If one or more matches are found it will return a selection widget that you can use to pick the account.
  • Selecting the account displays a summary of recent activity and retrieves any alerts and hunting bookmarks related to the account
  • The alerts and bookmarks are browsable using the browse_alerts and browse_bookmarks methods
  • You can call the find_additional_datamethod to retrieve and display more detailed activity information for the account.

 

EnrichAlerts

This simple notebooklet takes all alerts for a given time frame and enriches them with a number of external Threat Intelligence (TI) providers. From here users can select an alert to see additional details on the alert itself as well as the associated TI results. This helps analysts triage and prioritize alerts quickly and effectively. This notebooklet uses the TI providers feature of MSTICpy, and as such, users will need to configure TI providers before using this notebooklet.

Alert enrichment notebookletAlert enrichment notebooklet

 

HostSummary

The HostSummary notebooklet queries and displays information about a host (Windows or Linux) including:

  • IP address assignment
  • Related alerts
  • Related hunting/investigation bookmarks
  • Azure subscription/resource data.

Host summary notebookletHost summary notebooklet

 

HostLogonsSummary

This notebooklet provides a summary of logon events for a given host in a specified time frame. The notebooklet supports both Windows and Linux hosts, all that needs to be provided is a full or partial hostname. The purpose of this notebooklet is to give analysts a high level overview of all logon activity on a host during a timeframe of interest and help them identify specific logon sessions that warrant additional investigation. The notebooklet contains several sections including:

  • Logon timeline — a timeline of all logon attempts (both failed and successful) to the host broken down by the logon result. This visual guide makes it easy to identify brute force attempts or other suspicious logon patterns.
  • Logon map — an interactive geospatial representation of logon events based on the IP geolocation of the remote IP addresses involved. This helps identify logon events from anomalous or suspicious locations.
  • User and process graphs — visual breakdowns of logon attempts by user and by process to help identify primary logon vectors.
  • Logon matrix — a heatmap of user, process, and logon results to help identify any specifically high or low volume logon cases for additional investigation.

HostLogonsSummary.png

 

WinHostEvents

The WindowsHostEvents notebooklet queries and displays Windows Security Events. This focuses on events other than the common process creation (4688) and account logon (4624, 4625) events, aiming to give you a better idea of what else was going on on this host. Some features:

  • Summarized display of all security events and accounts that triggered them.
  • Extracting and displaying account management events
  • Account management event timeline
  • Optionally parsing packed XML event data into DataFrame columns for specific event types.

Windows Security Events notebookletWindows Security Events notebooklet

 

NetworkFlowSummary

The network flow summary notebooklet queries Azure network data and plots time lines for network traffic to/from a host or IP address.

  • Plot flows events by protocol and direction
  • Plot flow count by protocol
  • Display flow summary table
  • Display flow summary by ASN
  • Display IP location results on a map

NetworkFlowSummary.png

 

Conclusion

If you’ve made it this far in the document, congratulations!

 

Over the next few months we’ll be adding to the the repository of notebooklets. One of the things we most want to do is package some of our analytics into an easy-to-use format in notebooklets. We’d love any input on notebooklets you’d like to see.

 

If you are eager to read more, there is more detailed documentation on our ReadtheDocs pages. The code is all open source and can be seen here. You can install the package from PyPi using pip.

 

If you want to explore creating your own notebooklets and, either contribute them to the package, or just use them yourself, we’ve created a template notebooklet and accompanying documentation to guide you through the process.

 

Please post any issues, questions, or requests for new notebooklets on the msticnb GitHub repo or reach out directly on Twitter to ianhellenMSSPeteAshwinPatil

 

Ian Hellen

Principal software engineer at Microsoft and one of the authors/maintainers of MSTICpy and MSTICnb