Home
%3CLINGO-SUB%20id%3D%22lingo-sub-1086566%22%20slang%3D%22en-US%22%3EIngesting%20Alien%20Vault%20OTX%20Threat%20Indicators%20into%20Azure%20Sentinel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1086566%22%20slang%3D%22en-US%22%3E%3CP%3EOne%20of%20the%20key%20capabilities%20of%20Azure%20Sentinel%20has%20always%20been%20its%20ability%20to%20work%20with%20data%20from%20multiple%20sources%20including%20Threat%20Indicator%20Providers%20who%20can%20provide%20their%20data%20directly%20into%20the%20environment%20via%20the%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fgraph%2Fapi%2Fresources%2Fsecurity-api-overview%3Fview%3Dgraph-rest-beta%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3EMicrosoft%20Security%20Graph%3C%2FA%3E.%20But%20what%20if%20you%20have%20a%20source%20of%20indicators%20or%20other%20enrichment%20data%20that%20you%20want%20to%20use%20in%20Azure%20Sentinel%20but%20no%20connector%20to%20ingest%20it%20with%3F%20While%20Ofer%20Shezaf%20has%20written%20a%20great%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2FAzure-Sentinel%2FAzure-Sentinel-Creating-Custom-Connectors%2Fba-p%2F864060%22%20target%3D%22_blank%22%20rel%3D%22noopener%22%3Eblog%20post%3C%2FA%3E%20about%20creating%20custom%20connectors%20and%20Ian%20Hellen%20wrote%20up%20an%20outstanding%20blog%20about%20using%20OTX%20data%20in%3CA%20href%3D%22https%3A%2F%2Fnam06.safelinks.protection.outlook.com%2F%3Furl%3Dhttps%253A%252F%252Ftechcommunity.microsoft.com%252Ft5%252FAzure-Sentinel%252FUsing-Threat-Intelligence-in-your-Jupyter-Notebooks%252Fba-p%252F860239%26amp%3Bdata%3D02%257C01%257Cmattegen%2540microsoft.com%257Cbfdff935ce96436356df08d784aac7c3%257C72f988bf86f141af91ab2d7cd011db47%257C1%257C0%257C637123741374507762%26amp%3Bsdata%3DQLARfm89uRLYWSXswsDgPdT7fTdLuHAplB0atuR0fio%253D%26amp%3Breserved%3D0%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%20Jupyter%20Notebooks%20in%20Sentinel%3C%2FA%3E%2C%20this%20blog%20post%20is%20going%20to%20expand%20upon%20their%20work%20by%20walking%20through%20adding%20a%20custom%20Sentinel%20Playbook%20(Azure%20Logic%20App)%20to%20connect%20to%20%3CA%20href%3D%22https%3A%2F%2Fwww.alienvault.com%2Fopen-threat-exchange%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3EAlien%20Vault%E2%80%99s%20Open%20Threat%20Exchange%20(OTX)%3C%2FA%3E%20REST%20API%20to%20ingest%20threat%20indicators%20for%20use%20in%20hunting%20and%20alerts.%20While%20this%20blog%20is%20specifically%20about%20using%20AlienVault%20OTX%2C%20one%20could%20use%20this%20same%20methodology%20with%20most%20any%20API%20based%20data%20source.%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId--1437490893%22%20id%3D%22toc-hId--1437490893%22%20id%3D%22toc-hId--1437490893%22%20id%3D%22toc-hId--1437490893%22%20id%3D%22toc-hId--1437490893%22%20id%3D%22toc-hId--1437490893%22%3E%3CFONT%20size%3D%224%22%3EWhat%20is%20OTX%3F%3C%2FFONT%3E%3C%2FH2%3E%0A%3CP%3EOTX%20is%20an%20open%20community%20sharing%20various%20indicators%20of%20compromise%20(IOC%E2%80%99s)%20such%20as%20IP%20addresses%2C%20domains%2C%20hostnames%2C%20URL%E2%80%99s%2C%20SHAs%2C%20etc.%20For%20this%20example%2C%20we%E2%80%99re%20going%20to%20limit%20our%20ingestion%20to%20just%20IP%E2%80%99s%2C%20URLs%2C%20and%20hostnames%2C%20but%20many%20of%20the%20IOC's%20in%20OTX%20can%20be%20imported%20into%20the%20Azure%20Sentinel%20and%20Microsoft%20Defender%20ATP%20as%20indicators.%3C%2FP%3E%0A%3CH1%20id%3D%22toc-hId--1447993997%22%20id%3D%22toc-hId--1447993997%22%20id%3D%22toc-hId--1447993997%22%20id%3D%22toc-hId--1447993997%22%20id%3D%22toc-hId--1447993997%22%20id%3D%22toc-hId--1447993997%22%3E%3CFONT%20size%3D%224%22%3EEstablish%20an%20OTX%20account%3C%2FFONT%3E%3C%2FH1%3E%0A%3CP%3ETo%20utilize%20the%20OTX%20API%20feed%2C%20you%E2%80%99ll%20want%20to%20head%20over%20to%20%3CA%20href%3D%22https%3A%2F%2Fotx.alienvault.com%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fotx.alienvault.com%2F%3C%2FA%3E%20to%20establish%20an%20account.%20Once%20you%E2%80%99ve%20signed%20up%20you%20will%20be%20able%20to%20access%20detailed%20documentation%20as%20well%20as%20your%20API%20key%20via%20the%20dashboard.%20On%20the%20dashboard%2C%20select%20the%20%E2%80%9CAPI%20Integration%E2%80%9D%20link%20to%20get%20to%20your%20API%20key.%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F163595i0FCB2D4C2B6E61C4%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20alt%3D%22clipboard_image_0.png%22%20title%3D%22clipboard_image_0.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EThis%20section%20of%20the%20panel%20is%20also%20where%20you%E2%80%99ll%20be%20able%20to%20confirm%20from%20the%20OTX%20side%20that%20your%20connection%20is%20functional.%3C%2FP%3E%0A%3CH1%20id%3D%22toc-hId-1039518836%22%20id%3D%22toc-hId-1039518836%22%20id%3D%22toc-hId-1039518836%22%20id%3D%22toc-hId-1039518836%22%20id%3D%22toc-hId-1039518836%22%20id%3D%22toc-hId-1039518836%22%3E%3CFONT%20size%3D%224%22%3ECreate%20a%20new%20playbook%20in%20Sentinel%3C%2FFONT%3E%3C%2FH1%3E%0A%3CP%3ENow%20that%20we%20have%20a%20key%20for%20the%20OTX%20API%2C%20we%E2%80%99re%20going%20to%20need%20to%20create%20a%20new%20Playbook%20in%20Sentinel.%20To%20start%2C%20navigate%20to%20the%20Playbooks%20tab%20in%20Sentinel%20and%20select%20%E2%80%9CAdd%20Playbook%E2%80%9D.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F163596iCAB3302AF28508E7%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20alt%3D%22clipboard_image_1.png%22%20title%3D%22clipboard_image_1.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EGive%20your%20playbook%20a%20descriptive%20name%20and%20select%20the%20correct%20Azure%20Subscription%20to%20attach%20it%20to.%20For%20the%20Resource%20Group%20field%2C%20you%20can%20either%20create%20a%20new%20Resource%20Group%20or%20attach%20it%20to%20an%20existing%20one.%20The%20best%20practice%20would%20be%20to%20attach%20it%20to%20the%20same%20Resource%20Group%20you%E2%80%99re%20using%20for%20Sentinel(you%20can%20determine%20the%20Resource%20Group%20for%20your%20Sentinel%20instance%20by%20going%20to%20Settings%2C%20Workspace%20Settings%20and%20then%20select%20%E2%80%9CProperties%E2%80%9D).%20Finally%2C%20choose%20the%20geographic%20location%20%26nbsp%3Byou%20wish%20your%20Playbook%20to%20run%20in.%20After%20clicking%20%E2%80%9CCreate%E2%80%9D%2C%20your%20new%20Playbook%20will%20be%20added%20to%20the%20Playbooks%20tab%20and%20you%20will%20be%20taken%20to%20the%20Logic%20Apps%20Designer%20workspace.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F163597iB41AC074221AB1B2%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20alt%3D%22clipboard_image_2.png%22%20title%3D%22clipboard_image_2.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CH1%20id%3D%22toc-hId--767935627%22%20id%3D%22toc-hId--767935627%22%20id%3D%22toc-hId--767935627%22%20id%3D%22toc-hId--767935627%22%20id%3D%22toc-hId--767935627%22%20id%3D%22toc-hId--767935627%22%3E%3CFONT%20size%3D%224%22%3EConfigure%20your%20Playbook%3C%2FFONT%3E%3C%2FH1%3E%0A%3CP%3ESince%20we%E2%80%99re%20going%20to%20be%20creating%20a%20custom%20connector%2C%20we%E2%80%99re%20going%20to%20be%20manually%20defining%20the%20values%20for%20our%20Playbook.%20To%20do%20this%2C%20select%20%E2%80%9CBlank%20Logic%20App%E2%80%9D%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F163600i5145390464FD692C%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20alt%3D%22clipboard_image_3.png%22%20title%3D%22clipboard_image_3.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId--77374153%22%20id%3D%22toc-hId--77374153%22%20id%3D%22toc-hId--77374153%22%20id%3D%22toc-hId--77374153%22%20id%3D%22toc-hId--77374153%22%20id%3D%22toc-hId--77374153%22%3E%3CFONT%20size%3D%224%22%3ESelect%20a%20trigger%20%5Bmanual%20or%20scheduled%5D%3C%2FFONT%3E%3C%2FH2%3E%0A%3CP%3EAs%20you%20can%20see%2C%20there%20are%20multiple%20options%20available%20for%20us%20to%20choose%20from.%20In%20this%20case%2C%20we%E2%80%99re%20going%20to%20choose%20a%20%E2%80%9CScheduled%E2%80%9D%20trigger.%20Scheduled%20triggers%20come%20in%20two%20flavors%3A%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3E%E2%80%9CRecurrence%E2%80%9D%20where%20the%20trigger%20will%20fire%20on%20a%20regular%20basis%2C%20and%3C%2FLI%3E%0A%3CLI%3E%E2%80%9CSliding%20Window%E2%80%9D%20where%20the%20triggers%20are%20a%20series%20of%20fixed-sized%2C%20non-overlapping%2C%20and%20contiguous%20time%20intervals%20from%20a%20specified%20start%20time.%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3EFor%20this%20example%2C%20we%E2%80%99re%20going%20to%20use%20a%20simple%20Recurrence%20trigger%20and%20set%20the%20frequency%20to%201%20day%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F163598i043A9D929050F6AE%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20alt%3D%22clipboard_image_4.png%22%20title%3D%22clipboard_image_4.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--1884828616%22%20id%3D%22toc-hId--1884828616%22%20id%3D%22toc-hId--1884828616%22%20id%3D%22toc-hId--1884828616%22%20id%3D%22toc-hId--1884828616%22%20id%3D%22toc-hId--1884828616%22%3E%3CFONT%20size%3D%224%22%3EGet%20the%20data%3C%2FFONT%3E%3C%2FH2%3E%0A%3CP%3EGreat!%20Now%20that%20we%E2%80%99ve%20defined%20%3CEM%3Ewhen%3C%2FEM%3E%20we%20want%20to%20go%20get%20our%20data%2C%20now%20it%E2%80%99s%20time%20to%20go%20get%20it.%20Click%20the%20%E2%80%9CNew%20Step%E2%80%9D%20button%20below%20the%20Trigger.%20This%20will%20present%20us%20with%20the%20%E2%80%9CChoose%20an%20action%E2%80%9D%20window%20to%20choose%20our%20next%20step.%20We%E2%80%99re%20going%20to%20be%20seeing%20more%20of%20this%20page%20in%20the%20future%20so%20I%E2%80%99ll%20only%20include%20it%20this%20once.%20For%20retrieving%20the%20OTX%20data%2C%20we%E2%80%99re%20going%20to%20choose%20the%20%E2%80%9CHTTP%20Built-in%E2%80%9D%20connector%20and%20then%20the%20%E2%80%9CHTTP%E2%80%9D%20action.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F163599i501EC707F34A8C5D%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20alt%3D%22clipboard_image_5.png%22%20title%3D%22clipboard_image_5.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EThis%20will%20then%20open%20the%20parameters%20page%20for%20the%20HTTP%20action.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F163602iF448DA8E51A7B5F3%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20alt%3D%22clipboard_image_6.png%22%20title%3D%22clipboard_image_6.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CFONT%20size%3D%223%22%3EWe%E2%80%99re%20going%20to%20use%20the%20following%20settings%20for%20this%20connection%3A%3C%2FFONT%3E%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3E%3CFONT%20size%3D%223%22%3EMethod%3A%20GET%3C%2FFONT%3E%3C%2FLI%3E%0A%3CLI%3E%3CFONT%20size%3D%223%22%3EURI%3A%20%3CA%20href%3D%22https%3A%2F%2Fotx.alienvault.com%2Fapi%2Fv1%2Findicators%2Fexport%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fotx.alienvault.com%2Fapi%2Fv1%2Findicators%2Fexport%3C%2FA%3E%3C%2FFONT%3E%3C%2FLI%3E%0A%3CLI%3E%3CFONT%20size%3D%223%22%3EHeaders%3A%20The%20headers%20field%20is%20broken%20out%20into%20name%20%2F%20value%20fields.%20In%20the%20first%20field%20enter%20%E2%80%9CX-OTX-API-KEY%E2%80%9D%20(minus%20the%20quotes)%20and%20in%20the%20second%20field%20enter%20your%20API%20key%20from%20the%20OTX%20Dashboard.%3C%2FFONT%3E%3C%2FLI%3E%0A%3CLI%3E%3CFONT%20size%3D%223%22%3EQueries%3A%20This%20is%20where%20we%E2%80%99re%20going%20to%20add%20in%20the%20parameters%20of%20the%20actual%20query%20itself.%20These%20are%20defined%20in%20the%20%E2%80%9CDocs%E2%80%9D%20page%20for%20OTX%20and%20we%E2%80%99re%20using%20the%20%E2%80%9Cindicators%2Fexport%E2%80%9D%20call.%20This%20has%20a%20number%20of%20parameters%20available%2C%20but%20we%E2%80%99re%20only%20going%20to%20be%20using%20two%20of%20them.%3C%2FFONT%3E%3CUL%3E%0A%3CLI%3E%3CFONT%20size%3D%223%22%3Emodified_since%3A%20This%20is%20an%20ISO%20format%20datetime%20string.%20For%20this%20scenario%2C%20we%E2%80%99re%20taking%20advantage%20of%20an%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Flogic-apps%2Fworkflow-definition-language-functions-reference%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3EExpression%3C%2FA%3E%20in%20LogicApps.%20Expressions%20allow%20us%20to%20create%20programmatic%20values%20in%20lieu%20of%20fixed%20values.%20We%20can%20use%20the%20GUI%20to%20click%20each%20of%20the%20expression%20variables%20or%20just%20enter%20it%20directly.%20In%20this%20case%20we%E2%80%99re%20using%20the%20expression%20%E2%80%9CaddDays(utcNow()%2C-1)%E2%80%9D.%20Since%20we%E2%80%99re%20running%20our%20Trigger%20to%20fire%20once%20a%20day%2C%20we%E2%80%99re%20going%20to%20look%20at%20new%20indicators%20since%20the%20last%20time%20we%20ran.%3C%2FFONT%3E%3C%2FLI%3E%0A%3CLI%3E%3CFONT%20size%3D%223%22%3Etypes%3A%20These%20are%20the%20indicator%20types%20that%20we%20want%20to%20retrieve%20from%20the%20OTX%20feed.%20OTX%20has%20a%20lot%20of%20different%20types%2C%20but%20for%20this%20example%20we%E2%80%99re%20going%20to%20use%20the%20domain%2C%20hostname%2C%20and%20IPv4%20types.%20You%20can%20get%20a%20JSON%20file%20of%20all%20of%20the%20supported%20types%20by%20navigating%20to%20%3CA%20href%3D%22https%3A%2F%2Fotx.alienvault.com%2Fapi%2Fv1%2Fpulses%2Findicators%2Ftypes%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fotx.alienvault.com%2Fapi%2Fv1%2Fpulses%2Findicators%2Ftypes%3C%2FA%3E.%3C%2FFONT%3E%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3EAt%20this%20point%20it%E2%80%99s%20probably%20a%20good%20call%20to%20save%20our%20work%20as%20well%20as%20test%20our%20connection%20to%20see%20if%20we%E2%80%99re%20getting%20back%20the%20data%20we%20want.%20This%20is%20also%20a%20good%20time%20to%20collect%20an%20example%20of%20the%20output%20of%20the%20call%20as%20we%E2%80%99re%20going%20to%20use%20that%20to%20build%20a%20schema%20for%20the%20next%20step.%20To%20save%20our%20work%2C%20just%20click%20the%20%E2%80%9CSave%E2%80%9D%20button.%20This%20will%20now%20enable%20the%20%E2%80%9CRun%E2%80%9D%20button%20which%20we%20can%20click%20to%20have%20our%20connection%20fire.%20Assuming%20everything%20went%20as%20expected%2C%20we%20should%20see%20a%20page%20like%20the%20following%3A%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F163604iA5E0325F0F062D89%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20alt%3D%22clipboard_image_7.png%22%20title%3D%22clipboard_image_7.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CBR%20%2F%3EYou%E2%80%99ll%20want%20to%20copy%20the%20%E2%80%9CBody%E2%80%9D%20section%20(highlighted%20above)%20to%20use%20in%20the%20next%20step.%3C%2FP%3E%0A%3CP%3E(Note%3A%20If%20the%20%E2%80%9CBody%E2%80%9D%20section%20is%20empty%2C%20it%20may%20just%20be%20that%20there%20haven%E2%80%99t%20been%20any%20new%20indicators%20added%20in%20the%20last%20day.%20You%20might%20want%20to%20consider%20removing%20or%20changing%20the%20%E2%80%9Cmodified_since%E2%80%9D%20parameter%20to%20get%20a%20list%20of%20indicators)%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId-602684217%22%20id%3D%22toc-hId-602684217%22%20id%3D%22toc-hId-602684217%22%20id%3D%22toc-hId-602684217%22%20id%3D%22toc-hId-602684217%22%20id%3D%22toc-hId-602684217%22%3E%3CFONT%20size%3D%224%22%3EParse%20the%20data%3C%2FFONT%3E%3C%2FH2%3E%0A%3CP%3ENow%20that%20we%20have%20our%20HTTP%20data%20connection%2C%20it%E2%80%99s%20time%20to%20parse%20the%20JSON%20that%E2%80%99s%20returned.%20If%20you%20did%20a%20test%20run%20of%20the%20Playbook%20so%20far%2C%20click%20the%20%E2%80%9CDesigner%E2%80%9D%20button%20to%20go%20back%20to%20the%20designer%20page.%20Now%20select%20the%20%E2%80%9CNew%20step%E2%80%9D%20button%20that%20is%20below%20the%20HTTP%20section.%20From%20the%20page%20that%20opens%2C%20choose%20%E2%80%9CData%20Operations%E2%80%9D%20and%20then%20%E2%80%9C%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Flogic-apps%2Flogic-apps-perform-data-operations%23parse-json-action%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3EParse%20JSON%3C%2FA%3E%E2%80%9D.%20In%20the%20panel%20that%20opens%2C%20you%E2%80%99ll%20see%20two%20fields%3A%20Content%20and%20Schema.%20Clicking%20in%20the%20%E2%80%9CContent%E2%80%9D%20field%20will%20open%20the%20Dynamic%20Content%20flyout%20panel%20from%20which%20we%E2%80%99re%20going%20to%20select%20the%20pre-built%20%E2%80%9CBody%E2%80%9D%20option.%20This%20is%20telling%20the%20Parse%20JSON%20connector%20to%20parse%20the%20body%20content%20from%20the%20HTTP%20connector%20we%20defined%20earlier.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F163601i3E0B29F3ED20CFE6%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20alt%3D%22clipboard_image_8.png%22%20title%3D%22clipboard_image_8.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EFor%20the%20Schema%20field%2C%20we%E2%80%99re%20going%20to%20use%20the%20body%20data%20that%20we%20copied%20earlier.%20Below%20the%20Schema%20box%2C%20there%20is%20a%20link%20to%20%E2%80%9CUse%20sample%20payload%20to%20generate%20schema%E2%80%9D%20click%20that%20link%20and%20then%20paste%20the%20body%20data%20into%20the%20%E2%80%9CEnter%20or%20paste%20a%20sample%20JSON%20payload%E2%80%9D%20box%20and%20then%20click%20%E2%80%9CDone%E2%80%9D.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F163605i28CF6C3402B923DE%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20alt%3D%22clipboard_image_9.png%22%20title%3D%22clipboard_image_9.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EThis%20will%20create%20the%20schema%20for%20the%20data%3A%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F163606i02E8517D5EA46390%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20alt%3D%22clipboard_image_10.png%22%20title%3D%22clipboard_image_10.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EOne%20small%20change%20that%20I%20had%20to%20make%20from%20using%20this%20method%20was%20to%20modify%20the%20%E2%80%9Cnext%E2%80%9D%20value%20to%20be%20an%20empty%20set%20of%20braces%20instead%20of%20the%20values%20the%20schema%20generator%20created%20to%20account%20for%20scenarios%20where%20the%20%E2%80%9Cnext%E2%80%9D%20link%20isn%E2%80%99t%20populated.%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId--1204770246%22%20id%3D%22toc-hId--1204770246%22%20id%3D%22toc-hId--1204770246%22%20id%3D%22toc-hId--1204770246%22%20id%3D%22toc-hId--1204770246%22%20id%3D%22toc-hId--1204770246%22%3E%3CFONT%20size%3D%224%22%3ESend%20the%20data%20to%20the%20Graph%3C%2FFONT%3E%3C%2FH2%3E%0A%3CP%3ENow%20that%20we%E2%80%99ve%20connected%20to%20the%20OTX%20API%2C%20retrieved%20our%20data%2C%20and%20parsed%20it%2C%20we%20need%20to%20send%20this%20data%20to%20the%20%3CA%20href%3D%22https%3A%2F%2Fwww.microsoft.com%2Fen-us%2Fsecurity%2Fpartnerships%2Fgraph-security-api%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3EMicrosoft%20Security%20Graph%20API%3C%2FA%3E.%20The%20Microsoft%20Graph%20supports%20the%20ingestion%20of%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fgraph%2Fapi%2Fresources%2Ftiindicator%3Fview%3Dgraph-rest-beta%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3EThreat%20Intelligence%20Indicators%20(tiIndicators)%3C%2FA%3E%20which%20can%20be%20shared%20to%20both%20Azure%20Sentinel%20and%20Microsoft%20Defender%20ATP.%20Let%E2%80%99s%20add%20this%20functionality%20to%20the%20ingestion%20playbook%20we%20just%20created.%20Because%20we%E2%80%99re%20%3CEM%3Ewriting%3C%2FEM%3E%20to%20the%20Graph%2C%20we%20first%20need%20to%20create%20an%20application%20registration%20in%20Azure%20AD%20that%20has%20the%20%E2%80%9CThreatIndicators.ReadWrite.OwnedBy%E2%80%9D%20permissions.%20The%20process%20of%20creating%20a%20new%20application%20has%20been%20very%20well%20documented%2C%20so%20I%20am%20not%20going%20to%20reproduce%20it%20in%20detail%20here%2C%20but%20instead%20point%20you%20to%20the%20docs.microsoft.com%20page%3A%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fpowerapps%2Fdeveloper%2Fcommon-data-service%2Fwalkthrough-register-app-azure-active-directory%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3EWalkthrough%3A%20Register%20an%20app%20with%20Azure%20Active%20Directory%20%3C%2FA%3E.%20%26nbsp%3BJust%20make%20sure%20that%20when%20you%20grant%20the%20application%20permissions%20that%20you%20give%20it%20the%20%E2%80%9CThreatIndicators.ReadWrite.OwnedBy%E2%80%9D%20permissions.%20Once%20you%E2%80%99ve%20registered%20the%20application%2C%20we%E2%80%99re%20going%20to%20need%20three%20pieces%20of%20information%3A%20The%20Tenant%20ID%2C%20Application%20(client)%20ID%2C%20and%20the%20Client%20Secret.%3CBR%20%2F%3E%3CBR%20%2F%3EThe%20first%20thing%20we%E2%80%99re%20going%20to%20do%20is%20add%20a%20%E2%80%9C%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Flogic-apps%2Flogic-apps-control-flow-switch-statement%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3ESwitch%3C%2FA%3E%E2%80%9D%20step%20after%20the%20Parse%20JSON%20step.%20Click%20the%20%E2%80%9C%2B%E2%80%9D%20symbol%20after%20the%20Parse%20JSON%20step.%20From%20the%20options%20presented%20choose%20%E2%80%9CControl%E2%80%9D%20and%20then%20select%20%E2%80%9CSwitch%E2%80%9D.%20A%20Switch%20statement%20allows%20us%20to%20make%20a%20branching%20action%20based%20on%20the%20value%20of%20a%20field.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F163607iF4AA19EB74D0917A%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20alt%3D%22clipboard_image_11.png%22%20title%3D%22clipboard_image_11.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EFor%20this%20Switch%20block%2C%20we%E2%80%99re%20going%20to%20evaluate%20the%20%E2%80%9Ctype%E2%80%9D%20field%20from%20our%20parsed%20JSON%20data%2C%20so%20click%20in%20the%20%E2%80%9CChoose%20a%20value%E2%80%9D%20field%20and%20select%20the%20%E2%80%9Ctype%E2%80%9D%20value%20from%20the%20JSON%20dynamic%20data%20set%3A%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F163608i13DA43AEAEF7D7F1%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20alt%3D%22clipboard_image_12.png%22%20title%3D%22clipboard_image_12.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EWhen%20you%20select%20the%20%E2%80%9Ctype%E2%80%9D%20field%20from%20the%20Parse%20JSON%20step%2C%20the%20Logic%20App%20page%20is%20going%20to%20embed%20the%20Switch%20block%20into%20a%20%E2%80%9C%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Flogic-apps%2Flogic-apps-control-flow-loops%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3EFor-Each%3C%2FA%3E%E2%80%9D%20control%20flow%20block.%20This%20is%20because%20we%E2%80%99re%20going%20to%20be%20iterating%20over%20each%20of%20the%20records%20returned%20from%20the%20OTX%20API%20and%20Logic%20Apps%20is%20smart%20enough%20to%20realize%20this%20and%20automatically%20take%20care%20of%20this%20for%20us.%3C%2FP%3E%0A%3CP%3ENow%20that%20we%20know%20what%20we%E2%80%99re%20going%20to%20switch%20our%20actions%20on%2C%20we%20need%20to%20choose%20actions%20for%20each%20type%20of%20data%20we%20want%20to%20act%20on.%20I%E2%80%99m%20only%20going%20to%20walk%20through%20creating%20the%20switch%20case%20for%20the%20URL%20response%2C%20but%20the%20other%20data%20types%20use%20the%20same%20pattern%20so%20you%20can%20reproduce%20it%20for%20them.%3C%2FP%3E%0A%3CP%3EIn%20the%20Case%20window%2C%20click%20on%20the%20%E2%80%9CEquals%E2%80%9D%20field%20and%20enter%20%E2%80%9CURL%E2%80%9D%20(without%20the%20quotes).%20The%20Switch%20comparison%20is%20%3CU%3Ecase%20sensitive%2C%3C%2FU%3E%20so%20we%20need%20to%20make%20sure%20we%E2%80%99re%20using%20the%20proper%20case%20that%E2%80%99s%20returned%20and%20for%20URL%E2%80%99s%20from%20OTX%20it%E2%80%99s%20upper%20case.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F163609i5F5744BDBD0A874D%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20alt%3D%22clipboard_image_13.png%22%20title%3D%22clipboard_image_13.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3ENow%20we%20just%20need%20to%20add%20an%20action.%20We%E2%80%99re%20already%20familiar%20with%20the%20HTTP%20API%20call%20to%20%3CEM%3Eget%3C%2FEM%3E%20data%20from%20OTX%2C%20and%20we%E2%80%99re%20going%20to%20use%20it%20again%20here%20to%3CEM%3E%20put%3C%2FEM%3E%20data%20into%20the%20Microsoft%20Graph.%20%3CBR%20%2F%3ESelect%20the%20HTTP%20action%20from%20the%20actions%20list.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F163610i0EF764F7F2823373%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20alt%3D%22clipboard_image_14.png%22%20title%3D%22clipboard_image_14.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EJust%20like%20we%20did%20when%20we%20connected%20to%20OTX%2C%20we%E2%80%99re%20going%20to%20need%20to%20supply%20some%20values%20to%20the%20HTTP%20connector%20as%20well%20as%20the%20Body%20of%20the%20request%3A%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EMethod%3A%20POST%3C%2FLI%3E%0A%3CLI%3EURI%3A%20%3CA%20href%3D%22https%3A%2F%2Fgraph.microsoft.com%2Fbeta%2Fsecurity%2FtiIndicators%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fgraph.microsoft.com%2Fbeta%2Fsecurity%2FtiIndicators%3C%2FA%3E%3C%2FLI%3E%0A%3CLI%3EHeaders%3A%20The%20headers%20field%20is%20broken%20out%20into%20name%20%2F%20value%20fields.%20In%20the%20first%20field%20enter%20%E2%80%9Ccontent-type%E2%80%9D%20(minus%20the%20quotes)%20and%20in%20the%20second%20field%20enter%20%E2%80%9Capplication%2Fjson%E2%80%9D%20(again%2C%20without%20the%20quotes)%3C%2FLI%3E%0A%3CLI%3EBody%3A%20Here%20is%20where%20we%20make%20the%20actual%20API%20call%20into%20the%20Graph.%20By%20way%20of%20example%2C%20here%20is%20what%20I%20am%20using%20for%20the%20Sentinel%20connection%20(you%20can%20see%20what%20it%20looks%20like%20in%20the%20playbook%20in%20the%20image%20above).%26nbsp%3B%20These%20are%20the%20minimum%26nbsp%3B%3CEM%3Erequired%3C%2FEM%3E%20fields%20for%20the%20tiIndicators%20data%20type.%26nbsp%3B%20You%20can%20add%20more%20fields%20as%20appropriate%20for%20your%20use%20case%3A%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%7B%3CBR%20%2F%3E%22action%22%3A%20%22alert%22%2C%3CBR%20%2F%3E%22activityGroupNames%22%3A%20%5B%5D%2C%3CBR%20%2F%3E%22confidence%22%3A%200%2C%3CBR%20%2F%3E%22description%22%3A%20%22OTX%20Threat%20Indicator%20-%20%40%7Bitems('For_each')%3F%5B'type'%5D%7D%22%2C%3CBR%20%2F%3E%22expirationDateTime%22%3A%20%22%40%7BaddDays(utcNow()%2C7)%7D%22%2C%3CBR%20%2F%3E%22externalId%22%3A%20%22%40%7Bitems('For_each')%3F%5B'id'%5D%7D%22%2C%3CBR%20%2F%3E%22killChain%22%3A%20%5B%5D%2C%3CBR%20%2F%3E%22malwareFamilyNames%22%3A%20%5B%5D%2C%3CBR%20%2F%3E%22severity%22%3A%200%2C%3CBR%20%2F%3E%22tags%22%3A%20%5B%5D%2C%3CBR%20%2F%3E%22targetProduct%22%3A%20%22Azure%20Sentinel%22%2C%3CBR%20%2F%3E%22threatType%22%3A%20%22WatchList%22%2C%3CBR%20%2F%3E%22tlpLevel%22%3A%20%22white%22%2C%3CBR%20%2F%3E%22url%22%3A%20%22%40%7Bitems('For_each')%3F%5B'indicator'%5D%7D%22%3CBR%20%2F%3E%7D%3C%2FP%3E%0A%3CP%3EThe%20%E2%80%9Cexpiration%20date%20time%E2%80%9D%20value%20is%20using%20an%20expression%20to%20expire%20the%20custom%20TI%20seven%20days%20after%20ingestion.%3C%2FP%3E%0A%3CP%3E%E2%80%9CtlpLevel%E2%80%9D%20is%20referring%20to%20the%20Traffic%20Light%20Protocol%20(%3CA%20href%3D%22https%3A%2F%2Fwww.us-cert.gov%2Ftlp%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwww.us-cert.gov%2Ftlp%3C%2FA%3E)%20that%20defines%20the%20shareability%20of%20the%20information%20%2F%20indicator.%20Since%20this%20is%20all%20public%20information%2C%20I%20went%20ahead%20and%20hardcoded%20my%20entries%20to%20%E2%80%9Cwhite%E2%80%9D%20which%20means%20it%20has%20an%20unrestricted%20distribution.%3C%2FP%3E%0A%3CP%3EThere%20are%20other%20values%20that%20we%20could%20be%20supplying%20in%20the%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fgraph%2Fapi%2Fresources%2Ftiindicator%3Fview%3Dgraph-rest-beta%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3EThreat%20Intelligence%20Indicators%20(tiIndicators)%3C%2FA%3E%20call%2C%20like%20the%20%E2%80%9C%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fgraph%2Fapi%2Fresources%2Ftiindicator%3Fview%3Dgraph-rest-beta%23diamondmodel-values%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3EDiamond%20Model%3C%2FA%3E%E2%80%9D%20or%20%E2%80%9C%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fgraph%2Fapi%2Fresources%2Ftiindicator%3Fview%3Dgraph-rest-beta%23killchain-values%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3EKill%20Chain%3C%2FA%3E%E2%80%9D%20values%2C%20however%20for%20this%20example%20I%20am%20just%20using%20the%20required%20minimums.%3C%2FP%3E%0A%3CP%3ESince%20we%E2%80%99re%20writing%20to%20the%20graph%20though%2C%20we%20also%20need%20to%20provide%20our%20authentication%20information.%20We%20get%20this%20information%20from%20the%20Azure%20AD%20application%20we%20registered%20earlier.%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EAuthentication%3A%20Active%20Directory%20OAuth%3C%2FLI%3E%0A%3CLI%3ETenant%3A%20Your%20Azure%20tenant%20ID%3C%2FLI%3E%0A%3CLI%3EAudience%3A%20%3CA%20href%3D%22https%3A%2F%2Fgraph.microsoft.com%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fgraph.microsoft.com%3C%2FA%3E%3C%2FLI%3E%0A%3CLI%3EClient%20ID%3A%20The%20client%20id%20from%20the%20Azure%20AD%20application%20registration%20you%20did%20earlier.%3C%2FLI%3E%0A%3CLI%3ECredential%20Type%3A%3C%2FLI%3E%0A%3CLI%3ESecret%3A%20The%20secret%20from%20the%20Azure%20AD%20application%20registration%20you%20did%20earlier.%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3EOnce%20you%E2%80%99ve%20created%20this%20step%20we%E2%80%99re%20done%20and%20the%20connector%20is%20ready%20to%20test.%20%3CBR%20%2F%3E%3CBR%20%2F%3EThis%20first%20connector%20will%20make%20the%20TI%20indicators%20available%20only%20to%20Sentinel%2C%20however%2C%20you%20could%20create%20%3CU%3Eanother%3C%2FU%3E%20HTTP%20connection%20to%20supply%20the%20indicators%20to%20Microsoft%20Defender%20ATP.%26nbsp%3B%20However%2C%20you%20must%20separate%20these%20calls%20as%20the%20API%20requires%20that%20the%20%E2%80%9CtargetProduct%E2%80%9D%20value%20be%20set%20to%20either%20%E2%80%9CMicrosoft%20Defender%20ATP%E2%80%9D%20or%20%E2%80%9CAzure%20Sentinel%E2%80%9D.%20A%20%3CU%3Ereally%3C%2FU%3E%20cool%20benefit%26nbsp%3B%20of%20sending%20the%20data%20to%20MDATP%20as%20well%20as%20to%20Azure%20Sentinel%20is%20that%20if%20you%20change%20the%20%E2%80%9Caction%E2%80%9D%20parameter%20from%20%E2%80%9Calert%E2%80%9D%20to%20%E2%80%9Cblock%E2%80%9D%20and%20if%20you%E2%80%99ve%20enabled%20Network%20Protection%2C%20your%20Windows%2010%20clients%20(%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fwindows%2Fsecurity%2Fthreat-protection%2Fmicrosoft-defender-atp%2Fmanage-indicators%23create-indicators-for-ips-and-urlsdomains-preview%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ev1709%20and%20higher%3C%2FA%3E)%20enrolled%20in%20MDATP%20will%20be%20%3CU%3Eautomatically%20%3C%2FU%3Eblocked%20from%20accessing%20those%20URL%E2%80%99s!%20Making%20the%20MDATP%20connector%20is%20the%20same%20as%20making%20the%20Azure%20Sentinel%20connector%20except%20for%20a%20minor%20tweak%20on%20the%20Ip%20addresses.%20Microsoft%20Defender%20ATP%20supports%20destination%20IPv4%2FIPv6%20only.%20This%20means%20that%20for%20IPv4%2FIPv6%20indicators%20you%20need%20to%20set%20the%20%E2%80%9CnetworkDestinationIPv4%E2%80%9D%20or%20%E2%80%9CnetworkDestinationIPv6%E2%80%9D%20properties.%26nbsp%3B%20To%20add%20a%20second%20REST%20API%20call%20to%20the%20graph%2C%20just%20click%20the%20%22%2B%22%20sign%20after%20the%20Sentinel%20API%20call.%26nbsp%3B%20Make%20sure%20to%20change%20the%20%22targetProduct%22%20field%20value%20to%20%22Microsoft%20Defender%20ATP%22.%3C%2FP%3E%0A%3CH1%20id%3D%22toc-hId--1215273350%22%20id%3D%22toc-hId--1215273350%22%20id%3D%22toc-hId--1215273350%22%20id%3D%22toc-hId--1215273350%22%20id%3D%22toc-hId--1215273350%22%20id%3D%22toc-hId--1215273350%22%3E%3CFONT%20size%3D%224%22%3ERun%20queries%20against%20the%20data%3C%2FFONT%3E%3C%2FH1%3E%0A%3CP%3ENow%20that%20we%20have%20our%20enrichment%20data%2C%20how%20can%20we%20use%20it%3F%20Of%20course%20it%E2%80%99s%20going%20to%20depend%20on%20what%20your%20other%20data%20sources%20are%20as%20well%20as%20what%20you%E2%80%99re%20looking%20for.%20We%20have%20a%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2FAzure%2FAzure-Sentinel%2Ftree%2Fmaster%2FDetections%2FThreatIntelligenceIndicator%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3EGitHub%20repository%20of%20really%20great%20queries%20that%20utilize%20the%20Threat%20Intelligence%20Indicators%20%3C%2FA%3E%20Here%E2%80%99s%20one%20query%20I%20thought%20to%20write%20that%20looked%20at%20the%20malicious%20IP%20addresses%20and%20see%20if%20any%20of%20them%20were%20showing%20up%20in%20my%20Azure%20AD%20SigninLogs.%26nbsp%3B%20This%20can%20be%20done%20pretty%20simply%20with%20the%20following%20query%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3Elet%20ipIndicators%20%3D%3C%2FP%3E%0A%3CP%3EThreatIntelligenceIndicator%3C%2FP%3E%0A%3CP%3E%7C%20where%20NetworkIP%20!%3D%20%22%22%3C%2FP%3E%0A%3CP%3E%7C%20project%20IPAddress%20%3D%20NetworkIP%3B%3C%2FP%3E%0A%3CP%3EipIndicators%3C%2FP%3E%0A%3CP%3E%7C%20join%20(SigninLogs)%20on%20IPAddress%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EWhat%20this%20query%20is%20doing%20is%20creating%20a%20temporary%20table%20(%E2%80%9CipIndicators%E2%80%9D)%20that%20is%20composed%20of%20just%20the%20IPv4%20addresses%20from%20the%20ThreatIntelligenceIndicator%20table.%20This%20is%20then%20joined%20to%20the%20SigninLogs%20table%20using%20IPAddress%20as%20they%20key%20for%20the%20join%20(e.g.%20where%20the%20field%20values%20match%20in%20both%20tables).%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EHappy%20hunting!%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EMatt%20Egen%3CA%20href%3D%22https%3A%2F%2Fwww.twitter.com%2Fflyingbluemonki%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%20%40FlyingBlueMonki%3C%2FA%3E%3CBR%20%2F%3ECybersecurity%20Solutions%20Group%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3E%3CFONT%20size%3D%224%22%3EReferences%3C%2FFONT%3E%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3ETraffic%20Light%20Protocol%3A%20%3CA%20href%3D%22https%3A%2F%2Fwww.us-cert.gov%2Ftlp%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwww.us-cert.gov%2Ftlp%3C%2FA%3E%3C%2FP%3E%0A%3CP%3EDiamond%20Model%20of%20intrusion%20Analysis%3A%20%3CA%20href%3D%22https%3A%2F%2Fapps.dtic.mil%2Fdocs%2Fcitations%2FADA586960%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fapps.dtic.mil%2Fdocs%2Fcitations%2FADA586960%3C%2FA%3E%3C%2FP%3E%0A%3CP%3ELockheed%20Martin%20Cyber%20Kill%20Chain%3A%20%3CA%20href%3D%22https%3A%2F%2Fwww.lockheedmartin.com%2Fen-us%2Fcapabilities%2Fcyber%2Fcyber-kill-chain.html%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwww.lockheedmartin.com%2Fen-us%2Fcapabilities%2Fcyber%2Fcyber-kill-chain.html%3C%2FA%3E%3C%2FP%3E%0A%3CP%3EAzure%20Sentinel%3A%20Creating%20Custom%20Connectors%3A%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fazure-sentinel%2Fazure-sentinel-creating-custom-connectors%2Fba-p%2F864060%22%20target%3D%22_blank%22%20rel%3D%22noopener%22%3Ehttps%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fazure-sentinel%2Fazure-sentinel-creating-custom-connectors%2Fba-p%2F864060%3C%2FA%3E%3C%2FP%3E%0A%3CP%3EUsing%20Threat%20Intelligence%20in%20your%20Jupyter%20Notebooks%3A%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fazure-sentinel%2Fusing-threat-intelligence-in-your-jupyter-notebooks%2Fba-p%2F860239%22%20target%3D%22_blank%22%20rel%3D%22noopener%22%3Ehttps%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fazure-sentinel%2Fusing-threat-intelligence-in-your-jupyter-notebooks%2Fba-p%2F860239%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-1086566%22%20slang%3D%22en-US%22%3E%3CP%3EDid%20you%20know%20that%20you%20can%20leverage%20Azure%20Sentinel%20Playbooks%20to%20ingest%20custom%20threat%20indicators%20into%20Azure%20Sentinel%20and%20Microsoft%20Defender%20ATP%3F%26nbsp%3B%20This%20article%20uses%20Alien%20Vault%20OTX%2C%20but%20can%20be%20applied%20to%20most%20any%20REST%20based%20API.%3C%2FP%3E%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1086566%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAzure%20Sentinel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EHunting%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EInvestigation%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMicrosoft%20Defender%20ATP%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESecurity%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1093994%22%20slang%3D%22en-US%22%3ERe%3A%20Ingesting%20Alien%20Vault%20OTX%20Threat%20Indicators%20into%20Azure%20Sentinel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1093994%22%20slang%3D%22en-US%22%3E%3CP%3EGreat%20blog%20post%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHowever%2C%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F19686%22%20target%3D%22_blank%22%3E%40Matt%20Egen%3C%2FA%3E%2C%20should%20we%20not%20include%20%22url%22%20without%20quote%20in%20the%20HTTP%20action%20when%20you%20do%20the%20GET%20call%20towards%20AlienVault%20OTX%20like%20below%20%3F%3C%2FP%3E%3CP%3E%3CBR%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20style%3D%22width%3A%20295px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F164060i96FFADEA1A7D9E96%2Fimage-dimensions%2F295x249%3Fv%3D1.0%22%20width%3D%22295%22%20height%3D%22249%22%20alt%3D%22AlienVault_OTX.PNG%22%20title%3D%22AlienVault_OTX.PNG%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EFor%20those%20interested%2C%20here%20below%20is%20an%20example%20for%20the%20%22domainName%22%20indicator%20for%20those%20trying%20it.%3C%2FP%3E%3CP%3E%22action%22%3A%20%22alert%22%2C%3CBR%20%2F%3E%22activityGroupNames%22%3A%20%5B%5D%2C%3CBR%20%2F%3E%22confidence%22%3A%200%2C%3CBR%20%2F%3E%22description%22%3A%20%22OTX%20Threat%20Indicator%20-%20%40%7Bitems('For_each')%3F%5B'type'%5D%7D%22%2C%3CBR%20%2F%3E%22domainName%22%3A%20%22%40%7Bitems('For_each')%3F%5B'indicator'%5D%7D%22%2C%3CBR%20%2F%3E%22expirationDateTime%22%3A%20%22%40%7BaddDays(utcNow()%2C7)%7D%22%2C%3CBR%20%2F%3E%22externalId%22%3A%20%22%40%7Bitems('For_each')%3F%5B'id'%5D%7D%22%2C%3CBR%20%2F%3E%22killChain%22%3A%20%5B%5D%2C%3CBR%20%2F%3E%22malwareFamilyNames%22%3A%20%5B%5D%2C%3CBR%20%2F%3E%22severity%22%3A%200%2C%3CBR%20%2F%3E%22tags%22%3A%20%5B%5D%2C%3CBR%20%2F%3E%22targetProduct%22%3A%20%22Azure%20Sentinel%22%2C%3CBR%20%2F%3E%22threatType%22%3A%20%22WatchList%22%2C%3CBR%20%2F%3E%22tlpLevel%22%3A%20%22white%22%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3CP%3ERegarding%20the%20app%20registrations%2C%20make%20sure%20that%20the%20following%20right%20is%20grant%3A%26nbsp%3BThreatIndicators.ReadWrite.OwnedBy%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1094724%22%20slang%3D%22en-US%22%3ERe%3A%20Ingesting%20Alien%20Vault%20OTX%20Threat%20Indicators%20into%20Azure%20Sentinel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1094724%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F308071%22%20target%3D%22_blank%22%3E%40thomasdefise%3C%2FA%3E%26nbsp%3B%2C%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThanks%20for%20reading%20the%20article!%26nbsp%3B%20You%20can%20certainly%20include%20%22url%22%20in%20the%20headers%20for%20the%20call%20to%20OTX%20API.%26nbsp%3B%20The%20image%20that%20I%20used%20for%20the%20post%20is%20an%20example%20and%20I%20see%20now%20that%20I%20hadn't%20put%20%22URL%22%20into%20the%20field%20in%20that%20screen%20grab.%26nbsp%3B%20Great%20catch!%26nbsp%3B%20I'll%20update%20it%20later%20today.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThanks%20again%2C%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EMatt%3C%2FP%3E%3C%2FLINGO-BODY%3E
Microsoft

One of the key capabilities of Azure Sentinel has always been its ability to work with data from multiple sources including Threat Indicator Providers who can provide their data directly into the environment via the Microsoft Security Graph. But what if you have a source of indicators or other enrichment data that you want to use in Azure Sentinel but no connector to ingest it with? While Ofer Shezaf has written a great blog post about creating custom connectors and Ian Hellen wrote up an outstanding blog about using OTX data in Jupyter Notebooks in Sentinel, this blog post is going to expand upon their work by walking through adding a custom Sentinel Playbook (Azure Logic App) to connect to Alien Vault’s Open Threat Exchange (OTX) REST API to ingest threat indicators for use in hunting and alerts. While this blog is specifically about using AlienVault OTX, one could use this same methodology with most any API based data source.

What is OTX?

OTX is an open community sharing various indicators of compromise (IOC’s) such as IP addresses, domains, hostnames, URL’s, SHAs, etc. For this example, we’re going to limit our ingestion to just IP’s, URLs, and hostnames, but many of the IOC's in OTX can be imported into the Azure Sentinel and Microsoft Defender ATP as indicators.

Establish an OTX account

To utilize the OTX API feed, you’ll want to head over to https://otx.alienvault.com/ to establish an account. Once you’ve signed up you will be able to access detailed documentation as well as your API key via the dashboard. On the dashboard, select the “API Integration” link to get to your API key.

clipboard_image_0.png

This section of the panel is also where you’ll be able to confirm from the OTX side that your connection is functional.

Create a new playbook in Sentinel

Now that we have a key for the OTX API, we’re going to need to create a new Playbook in Sentinel. To start, navigate to the Playbooks tab in Sentinel and select “Add Playbook”.

clipboard_image_1.png

Give your playbook a descriptive name and select the correct Azure Subscription to attach it to. For the Resource Group field, you can either create a new Resource Group or attach it to an existing one. The best practice would be to attach it to the same Resource Group you’re using for Sentinel(you can determine the Resource Group for your Sentinel instance by going to Settings, Workspace Settings and then select “Properties”). Finally, choose the geographic location  you wish your Playbook to run in. After clicking “Create”, your new Playbook will be added to the Playbooks tab and you will be taken to the Logic Apps Designer workspace.

clipboard_image_2.png

Configure your Playbook

Since we’re going to be creating a custom connector, we’re going to be manually defining the values for our Playbook. To do this, select “Blank Logic App”

clipboard_image_3.png

Select a trigger [manual or scheduled]

As you can see, there are multiple options available for us to choose from. In this case, we’re going to choose a “Scheduled” trigger. Scheduled triggers come in two flavors:

  • “Recurrence” where the trigger will fire on a regular basis, and
  • “Sliding Window” where the triggers are a series of fixed-sized, non-overlapping, and contiguous time intervals from a specified start time.

For this example, we’re going to use a simple Recurrence trigger and set the frequency to 1 day

clipboard_image_4.png

 

Get the data

Great! Now that we’ve defined when we want to go get our data, now it’s time to go get it. Click the “New Step” button below the Trigger. This will present us with the “Choose an action” window to choose our next step. We’re going to be seeing more of this page in the future so I’ll only include it this once. For retrieving the OTX data, we’re going to choose the “HTTP Built-in” connector and then the “HTTP” action.

clipboard_image_5.png

This will then open the parameters page for the HTTP action.

clipboard_image_6.png

We’re going to use the following settings for this connection:

  • Method: GET
  • URI: https://otx.alienvault.com/api/v1/indicators/export
  • Headers: The headers field is broken out into name / value fields. In the first field enter “X-OTX-API-KEY” (minus the quotes) and in the second field enter your API key from the OTX Dashboard.
  • Queries: This is where we’re going to add in the parameters of the actual query itself. These are defined in the “Docs” page for OTX and we’re using the “indicators/export” call. This has a number of parameters available, but we’re only going to be using two of them.
    • modified_since: This is an ISO format datetime string. For this scenario, we’re taking advantage of an Expression in LogicApps. Expressions allow us to create programmatic values in lieu of fixed values. We can use the GUI to click each of the expression variables or just enter it directly. In this case we’re using the expression “addDays(utcNow(),-1)”. Since we’re running our Trigger to fire once a day, we’re going to look at new indicators since the last time we ran.
    • types: These are the indicator types that we want to retrieve from the OTX feed. OTX has a lot of different types, but for this example we’re going to use the domain, hostname, and IPv4 types. You can get a JSON file of all of the supported types by navigating to https://otx.alienvault.com/api/v1/pulses/indicators/types.

At this point it’s probably a good call to save our work as well as test our connection to see if we’re getting back the data we want. This is also a good time to collect an example of the output of the call as we’re going to use that to build a schema for the next step. To save our work, just click the “Save” button. This will now enable the “Run” button which we can click to have our connection fire. Assuming everything went as expected, we should see a page like the following:

clipboard_image_7.png


You’ll want to copy the “Body” section (highlighted above) to use in the next step.

(Note: If the “Body” section is empty, it may just be that there haven’t been any new indicators added in the last day. You might want to consider removing or changing the “modified_since” parameter to get a list of indicators)

Parse the data

Now that we have our HTTP data connection, it’s time to parse the JSON that’s returned. If you did a test run of the Playbook so far, click the “Designer” button to go back to the designer page. Now select the “New step” button that is below the HTTP section. From the page that opens, choose “Data Operations” and then “Parse JSON”. In the panel that opens, you’ll see two fields: Content and Schema. Clicking in the “Content” field will open the Dynamic Content flyout panel from which we’re going to select the pre-built “Body” option. This is telling the Parse JSON connector to parse the body content from the HTTP connector we defined earlier.

clipboard_image_8.png

For the Schema field, we’re going to use the body data that we copied earlier. Below the Schema box, there is a link to “Use sample payload to generate schema” click that link and then paste the body data into the “Enter or paste a sample JSON payload” box and then click “Done”.

clipboard_image_9.png

This will create the schema for the data:

clipboard_image_10.png

One small change that I had to make from using this method was to modify the “next” value to be an empty set of braces instead of the values the schema generator created to account for scenarios where the “next” link isn’t populated.

Send the data to the Graph

Now that we’ve connected to the OTX API, retrieved our data, and parsed it, we need to send this data to the Microsoft Security Graph API. The Microsoft Graph supports the ingestion of Threat Intelligence Indicators (tiIndicators) which can be shared to both Azure Sentinel and Microsoft Defender ATP. Let’s add this functionality to the ingestion playbook we just created. Because we’re writing to the Graph, we first need to create an application registration in Azure AD that has the “ThreatIndicators.ReadWrite.OwnedBy” permissions. The process of creating a new application has been very well documented, so I am not going to reproduce it in detail here, but instead point you to the docs.microsoft.com page: Walkthrough: Register an app with Azure Active Directory .  Just make sure that when you grant the application permissions that you give it the “ThreatIndicators.ReadWrite.OwnedBy” permissions. Once you’ve registered the application, we’re going to need three pieces of information: The Tenant ID, Application (client) ID, and the Client Secret.

The first thing we’re going to do is add a “Switch” step after the Parse JSON step. Click the “+” symbol after the Parse JSON step. From the options presented choose “Control” and then select “Switch”. A Switch statement allows us to make a branching action based on the value of a field.

clipboard_image_11.png

For this Switch block, we’re going to evaluate the “type” field from our parsed JSON data, so click in the “Choose a value” field and select the “type” value from the JSON dynamic data set:

clipboard_image_12.png

When you select the “type” field from the Parse JSON step, the Logic App page is going to embed the Switch block into a “For-Each” control flow block. This is because we’re going to be iterating over each of the records returned from the OTX API and Logic Apps is smart enough to realize this and automatically take care of this for us.

Now that we know what we’re going to switch our actions on, we need to choose actions for each type of data we want to act on. I’m only going to walk through creating the switch case for the URL response, but the other data types use the same pattern so you can reproduce it for them.

In the Case window, click on the “Equals” field and enter “URL” (without the quotes). The Switch comparison is case sensitive, so we need to make sure we’re using the proper case that’s returned and for URL’s from OTX it’s upper case.

clipboard_image_13.png

Now we just need to add an action. We’re already familiar with the HTTP API call to get data from OTX, and we’re going to use it again here to put data into the Microsoft Graph.
Select the HTTP action from the actions list.

clipboard_image_14.png

Just like we did when we connected to OTX, we’re going to need to supply some values to the HTTP connector as well as the Body of the request:

  • Method: POST
  • URI: https://graph.microsoft.com/beta/security/tiIndicators
  • Headers: The headers field is broken out into name / value fields. In the first field enter “content-type” (minus the quotes) and in the second field enter “application/json” (again, without the quotes)
  • Body: Here is where we make the actual API call into the Graph. By way of example, here is what I am using for the Sentinel connection (you can see what it looks like in the playbook in the image above).  These are the minimum required fields for the tiIndicators data type.  You can add more fields as appropriate for your use case:

{
"action": "alert",
"activityGroupNames": [],
"confidence": 0,
"description": "OTX Threat Indicator - @{items('For_each')?['type']}",
"expirationDateTime": "@{addDays(utcNow(),7)}",
"externalId": "@{items('For_each')?['id']}",
"killChain": [],
"malwareFamilyNames": [],
"severity": 0,
"tags": [],
"targetProduct": "Azure Sentinel",
"threatType": "WatchList",
"tlpLevel": "white",
"url": "@{items('For_each')?['indicator']}"
}

The “expiration date time” value is using an expression to expire the custom TI seven days after ingestion.

“tlpLevel” is referring to the Traffic Light Protocol (https://www.us-cert.gov/tlp) that defines the shareability of the information / indicator. Since this is all public information, I went ahead and hardcoded my entries to “white” which means it has an unrestricted distribution.

There are other values that we could be supplying in the Threat Intelligence Indicators (tiIndicators) call, like the “Diamond Model” or “Kill Chain” values, however for this example I am just using the required minimums.

Since we’re writing to the graph though, we also need to provide our authentication information. We get this information from the Azure AD application we registered earlier.

  • Authentication: Active Directory OAuth
  • Tenant: Your Azure tenant ID
  • Audience: https://graph.microsoft.com
  • Client ID: The client id from the Azure AD application registration you did earlier.
  • Credential Type:
  • Secret: The secret from the Azure AD application registration you did earlier.

Once you’ve created this step we’re done and the connector is ready to test.

This first connector will make the TI indicators available only to Sentinel, however, you could create another HTTP connection to supply the indicators to Microsoft Defender ATP.  However, you must separate these calls as the API requires that the “targetProduct” value be set to either “Microsoft Defender ATP” or “Azure Sentinel”. A really cool benefit  of sending the data to MDATP as well as to Azure Sentinel is that if you change the “action” parameter from “alert” to “block” and if you’ve enabled Network Protection, your Windows 10 clients (v1709 and higher) enrolled in MDATP will be automatically blocked from accessing those URL’s! Making the MDATP connector is the same as making the Azure Sentinel connector except for a minor tweak on the Ip addresses. Microsoft Defender ATP supports destination IPv4/IPv6 only. This means that for IPv4/IPv6 indicators you need to set the “networkDestinationIPv4” or “networkDestinationIPv6” properties.  To add a second REST API call to the graph, just click the "+" sign after the Sentinel API call.  Make sure to change the "targetProduct" field value to "Microsoft Defender ATP".

Run queries against the data

Now that we have our enrichment data, how can we use it? Of course it’s going to depend on what your other data sources are as well as what you’re looking for. We have a GitHub repository of really great queries that utilize the Threat Intelligence Indicators Here’s one query I thought to write that looked at the malicious IP addresses and see if any of them were showing up in my Azure AD SigninLogs.  This can be done pretty simply with the following query:

 

let ipIndicators =

ThreatIntelligenceIndicator

| where NetworkIP != ""

| project IPAddress = NetworkIP;

ipIndicators

| join (SigninLogs) on IPAddress

 

What this query is doing is creating a temporary table (“ipIndicators”) that is composed of just the IPv4 addresses from the ThreatIntelligenceIndicator table. This is then joined to the SigninLogs table using IPAddress as they key for the join (e.g. where the field values match in both tables).

 

Happy hunting!

 

Matt Egen @FlyingBlueMonki
Cybersecurity Solutions Group

References

Traffic Light Protocol: https://www.us-cert.gov/tlp

Diamond Model of intrusion Analysis: https://apps.dtic.mil/docs/citations/ADA586960

Lockheed Martin Cyber Kill Chain: https://www.lockheedmartin.com/en-us/capabilities/cyber/cyber-kill-chain.html

Azure Sentinel: Creating Custom Connectors: https://techcommunity.microsoft.com/t5/azure-sentinel/azure-sentinel-creating-custom-connectors/ba-p...

Using Threat Intelligence in your Jupyter Notebooks: https://techcommunity.microsoft.com/t5/azure-sentinel/using-threat-intelligence-in-your-jupyter-note...

 

2 Comments
Occasional Contributor

Great blog post,

 

However, @Matt Egen, should we not include "url" without quote in the HTTP action when you do the GET call towards AlienVault OTX like below ?


AlienVault_OTX.PNG

 

For those interested, here below is an example for the "domainName" indicator for those trying it.

"action": "alert",
"activityGroupNames": [],
"confidence": 0,
"description": "OTX Threat Indicator - @{items('For_each')?['type']}",
"domainName": "@{items('For_each')?['indicator']}",
"expirationDateTime": "@{addDays(utcNow(),7)}",
"externalId": "@{items('For_each')?['id']}",
"killChain": [],
"malwareFamilyNames": [],
"severity": 0,
"tags": [],
"targetProduct": "Azure Sentinel",
"threatType": "WatchList",
"tlpLevel": "white"

Regarding the app registrations, make sure that the following right is grant: ThreatIndicators.ReadWrite.OwnedBy

Microsoft

Hi @thomasdefise ,

 

Thanks for reading the article!  You can certainly include "url" in the headers for the call to OTX API.  The image that I used for the post is an example and I see now that I hadn't put "URL" into the field in that screen grab.  Great catch!  I'll update it later today.

 

Thanks again,

 

Matt