Snortããã³Suricata IDSãšããååã¯ããããã¯ãŒã¯ã»ãã¥ãªãã£ã®åéã§åããã¹ãŠã®äººã«ããç¥ãããŠããŸãã WAFãšIDSã¯ããããã¯ãŒã¯ãã©ãã£ãã¯ãåæããæé«ã¬ãã«ã®ãããã³ã«ã解æããæªæã®ãããŸãã¯äžèŠãªãããã¯ãŒã¯ã¢ã¯ãã£ããã£ãéç¥ãã2ã€ã®ã¯ã©ã¹ã®ã»ãã¥ãªãã£ã·ã¹ãã ã§ãã æåã®ã·ã¹ãã ãWebãµãŒããŒãç¹å®ã®æ»æã®ã¿ãæ€åºããã³åé¿ããã®ã«åœ¹ç«ã€å Žåã2çªç®ã®IDSã¯ãã¹ãŠã®ãããã¯ãŒã¯ãã©ãã£ãã¯ã§æ»æãæ€åºã§ããŸãã
å€ãã®äŒæ¥ãIDSãã€ã³ã¹ããŒã«ããŠãäŒæ¥ãããã¯ãŒã¯å ã®ãã©ãã£ãã¯ãå¶åŸ¡ããŠããŸãã DPIã¡ã«ããºã ã«ããããã©ãã£ãã¯ãããŒãåéããIPããHTTPããã³DCERPCãžã®ãã±ããã®å éšã調ã¹ãè匱æ§ã®æªçšãšæªæã®ããããã°ã©ã ã®ãããã¯ãŒã¯ã¢ã¯ãã£ããã£ã®äž¡æ¹ãç¹å®ããŸãã
äž¡æ¹ã®ã·ã¹ãã ã®äžå¿ã§ããæ¢ç¥ã®æ»æãèå¥ããããã®çœ²åã»ããã¯ããããã¯ãŒã¯ã»ãã¥ãªãã£ã®å°é家ãšäžçäžã®äŒæ¥ã«ãã£ãŠéçºãããŠããŸãã @attackdetectionããŒã ã§ããç§ãã¡ã¯ããããã¯ãŒã¯æ»æãæªæã®ãã掻åãæ€åºããããã®çœ²åãéçºããŠããŸãã èšäºã®æ®ãã®éšåã§ã¯ãIDS Suricataã·ã¹ãã ãæ··ä¹±ããããã®ãããªæŽ»åãé ãå¯èœæ§ãããããšãããã£ãæ°ããã¢ãããŒãã«çŠç¹ãåœãŠãŸãã
IDSã®ä»çµã¿
ãã®IDSåé¿æ¹æ³ã®è©³çŽ°ãšãçºèŠãããæ¹æ³ãé©çšããã段éã«é²ãåã«ãIDSæäœã®äžè¬ååã®ç解ãæŽæ°ããå¿ èŠããããŸãã
ãŸããçä¿¡ãã©ãã£ãã¯ã¯TCPãUDPããŸãã¯ãã®ä»ã®ãã©ã³ã¹ããŒãã¹ããªãŒã ã«åå²ããããã®åŸãããŒãµãŒãããããããŒã¯ããé«ã¬ãã«ã®ãããã³ã«ãšãã®ãã£ãŒã«ãã«åå²ããŸã-å¿ èŠã«å¿ããŠæ£èŠåããŸãã çµæã®ãã³ãŒããæ¡åŒµãããã³æ£èŠåããããããã³ã«ãã£ãŒã«ãã¯ããããã¯ãŒã¯ãã©ãã£ãã¯ã®äžã«æªæã®ããã¢ã¯ãã£ããã£ã«åºæã®ãããã¯ãŒã¯æ»æãŸãã¯ãã±ããããããã©ãããèå¥ããã·ã°ããã£ã»ããã«ãã£ãŠãã§ãã¯ãããŸãã
ã¡ãªã¿ã«ã眲åã»ããã¯å€ãã®å人ç 究è ãäŒæ¥ã®è£œåã§ãã Cisco TalosãEmerging Threatsãªã©ã®ãã³ããŒããååãèŠã€ãããŸãããŸãããªãŒãã³ã«ãŒã«ã»ããã«ã¯20,000ãè¶ ããã¢ã¯ãã£ããªã·ã°ããã£ããããŸãã
äžè¬çãªIDSã®åé¿ç
ãœãããŠã§ã¢ã®IDSã®äžå®å šæ§ãšãšã©ãŒã«ããããããã¯ãŒã¯ãã©ãã£ãã¯ã®æ»æãæ€åºã§ããªãæ¡ä»¶ãèŠã€ããããšãã§ããŸãã ã¹ããªãŒã åæã®æ®µéãåé¿ããããã®ããªãããç¥ãããææ³ã®äžã§ã次ã®ãã®ããªã¹ãã§ããŸãã
- IPãTCPããŸãã¯ãããšãã°DCERPCã§ã®éæšæºã®ãã±ãããã©ã°ã¡ã³ããŒã·ã§ã³ãIDSã¯æã åŠçã§ããŸããã
- å¢çç·ãŸãã¯ç¡å¹ãªTTLãŸãã¯MTUå€ãæã€ãã±ããããIDSã«ãã£ãŠèª€ã£ãŠåŠçãããå ŽåããããŸãã
- éè€ããTCPãã©ã°ã¡ã³ãïŒTCP SYNïŒã®èªèã®ãããŸããã¯ããã®TCPãã©ãã£ãã¯ãæå³ããããµãŒããŒãŸãã¯ã¯ã©ã€ã¢ã³ããšã¯ç°ãªãæ¹æ³ã§IDSã«ãã£ãŠè§£éãããå¯èœæ§ããããŸãã
- ããšãã°ããã§ãã¯ãµã ãæ£ãããªãïŒããããTCPéåæïŒåœã®TCP FINãã±ããã¯ãç¡èŠãããã®ã§ã¯ãªããã»ãã·ã§ã³ã®çµäºãšèŠãªãããšãã§ããŸãã
- IDSãšã¯ã©ã€ã¢ã³ãéã®TCPã»ãã·ã§ã³ã®ããŸããŸãªã¿ã€ã ã¢ãŠãããæ»æãé ãããŒã«ãšããŠæ©èœããŸãã
ãããã³ã«è§£æããã³ãã£ãŒã«ãã®æ£èŠåãã§ãŒãºã«é¢ããŠã¯ãå€ãã®WAFãã€ãã¹ææ³ãIDSã«äœ¿çšã§ããŸãã ãããã®æ°ã¯ã¯ããã«å€§ããããããã®ãã¡ã®ããã€ãã®ã¿ã瀺ããŸãã
- HTTPããã«ãšã³ã³ãŒãã£ã³ã°ã
- 察å¿ããContent-EncodingããããŒã®ãªãHTTPãã±ããã®Gzipå§çž®ã¯ãæ£èŠå段éã§ã¯ãŸã å§çž®ãããŠããªãå ŽåããããŸãããã®ãããªææ³ã¯ããã«ãŠã§ã¢ã®ãã©ãã£ãã¯ã§èŠã€ããããšããããŸãã
- POP3 / IMAPãããã³ã«çšã®Quoted-Printableãªã©ã®ãŸããªãšã³ã³ãŒãã䜿çšãããšãäžéšã®çœ²åãç¡åã«ãªãå¯èœæ§ããããŸãã
æ§æå ã®åãã³ããŒIDSãŸãã¯ãµãŒãããŒãã£ã©ã€ãã©ãªã«åºæã®ãã°ãå¿ããªãã§ãã ããããããã¯ããããªãã¯ãã°ãã©ãã«ãŒã§èŠã€ããããšãã§ããŸãã
ç¹å®ã®æ¡ä»¶äžã§çœ²åãã§ãã¯ãç¡å¹ã«ããããšãå¯èœã«ãããããã®ç¹å®ã®ãã°ã®1ã€ã¯ãSuricata IDSã®@attackdetectionã³ãã³ãã«ãã£ãŠçºèŠããããã®ãšã©ãŒãæªçšããŠãããšãã°BadTunnelãªã©ã®æ»æãé ãããšãã§ããŸãã
ãã®æ»æäžãè匱ãªã¯ã©ã€ã¢ã³ãã¯æ»æè ã«ãã£ãŠçæãããHTMLããŒãžãéããããã«ãã£ãŠäž¡åŽã®ããŒã137ã«å¯ŸããŠãããã¯ãŒã¯å¢çãä»ããŠæ»æè ãµãŒããŒãžã®UDPãã³ãã«ã確ç«ããŸãã ãã³ãã«ã確ç«ãããåŸãæ»æè ã¯è匱ãªã¯ã©ã€ã¢ã³ãã®ãããã¯ãŒã¯å ã§ååãåœè£ ããNBNSèŠæ±ã«åœã®å¿çãéä¿¡ããæ©äŒãåŸãŸãã 3ã€ã®ãã±ãããæ»æè ã®ãµãŒããŒã«éããããšããäºå®ã«ãããããããæ»æè ããã®ãã¡ã®1ã€ã ãã«å¿çããŠãã³ãã«ã確ç«ããã®ã«ååã§ããã
èŠã€ãã£ããšã©ãŒã¯ãã¯ã©ã€ã¢ã³ãããã®æåã®UDPãã±ãããžã®å¿çãICMPå®å äžæãªã©ã®ICMPãã±ããã§ãã£ãå Žåãäžæ£ç¢ºãªã¢ã«ãŽãªãºã ãåå ã§ããã®ã¹ããªãŒã ã¯ICMPãããã³ã«ã®çœ²åã®ã¿ã§ãã§ãã¯ãããããã«ãªã£ãããšã§ãã ååã®ãªãããŸããå«ããã以äžã®æ»æã¯ãUDPãã³ãã«ãä»ããŠå®è¡ããããããIDSã«æ°ä»ãããŸããã§ããã ãã®è匱æ§ã«å¯ŸããCVEçªå·ã¯ãããŸããã§ããããIDSã®ã»ãã¥ãªãã£æ©èœãåé¿ããŸããã
äžèšã®ãã€ãã¹ææ³ã¯å€ãããç¥ãããŠãããææ°ã®éçºäžã®IDSã§ä¿®æ£ãããŠãããç¹å®ã®ãã°ãšè匱æ§ã¯ããããåœãŠãŠããªãããŒãžã§ã³ã§ã®ã¿æ©èœããŸãã
ç§ãã¡ã®ããŒã ã¯ãããã¯ãŒã¯ã»ãã¥ãªãã£ãšãããã¯ãŒã¯æ»æã®ç 究ã«åãçµã¿ããããã¯ãŒã¯çœ²åãçŽæ¥éçºããã³ãã¹ãããããã眲åèªäœãšãã®æ¬ é¥ã«é¢é£ããåé¿çã«æ³šæãåããããåŸãŸããã
眲åã®åé¿
åŸ ã£ãŠãã©ããã£ãŠçœ²åãåé¡ã«ãªãã®ïŒ
ç 究è ã¯æ°ããªè åšãç 究ããéçšäžã®æ©èœããã®ä»ã®ãããã¯ãŒã¯ã¢ãŒãã£ãã¡ã¯ãã«ãã£ãŠç¹å®ã®æ»æããããã¯ãŒã¯ã¬ãã«ã§ã©ã®ããã«æ€åºããããã«ã€ããŠç解ãæ·±ããçµæã®ãã¥ãŒãIDSãã¬ã³ããªãŒãªèšèªã®1ã€ä»¥äžã®çœ²åã«å€æããŸãã ã·ã¹ãã ã®æ©èœãå¶éãããŠããããç 究è ã®ãšã©ãŒãåå ã§ãè匱æ§ãæªçšããçºèŠãããŠããªãæ¹æ³ãæ®ã£ãŠããŸãã
åããã«ãŠã§ã¢ãã¡ããªã®ãããã³ã«ãšã¡ãã»ãŒãžã®åœ¢åŒãšãã®çæãå€ããããã·ã°ããã£ããããã«å¯ŸããŠããŸãæ©èœããå Žåãè匱æ§ãæªçšããå Žåããããã³ã«ã®è€éããšãã®å€åæ§ãé«ãã»ã©ãæ»æè ãæ©èœã倱ãããšãªããšã¯ã¹ããã€ããå€æŽãããããªããã·ã°ããã£ããã€ãã¹ããŸãã
æãå±éºã§ç¥å床ã®é«ãè匱æ§ã«ã€ããŠã¯ãããŸããŸãªãã³ããŒããã®è³ªã®é«ã眲åãå€æ°èŠã€ãããŸãããä»ã®ããã€ãã®çœ²åã¯ç°¡åãªããªãã¯ã§åé¿ã§ããŸãã HTTPãããã³ã«ã®éåžžã«äžè¬çãªçœ²åãšã©ãŒã®äŸãæããŸãããã眲åæ€èšŒããã€ãã¹ããã«ã¯ãHTTP GETåŒæ°ã®é åºãå€æŽããã ãã§ååãªå ŽåããããŸãã
ãããŠãããšãã°ãïŒAction = checkPortããŸãã¯ãaction = checkPortïŒport =ãã®ããã«ã眲åã«åŒæ°ã®é åºãåºå®ãããéšåæååãã§ãã¯ãå«ãŸããŠãããšæãå Žåã¯æ£ããã§ãããã 眲åã泚ææ·±ã調ã¹ãŠãåãããŒãã³ãŒãããããã©ããã確èªããã ãã§ãã
確èªããã®ãé£ãããªãä»ã®ãããã³ã«ãšåœ¢åŒã¯ãããšãã°ãDNSãHTMLããŸãã¯DCERPCã§ããããã®å€åæ§ã¯éåžžã«é«ããªã£ãŠããŸãã ãããã£ãŠããã¹ãŠã®æ»æããã³éçºã®ããªãšãŒã·ã§ã³ã®ã·ã°ããã£ãé«å質ã ãã§ãªãé«éã®ã·ã°ããã£ã§ã«ããŒããã«ã¯ãéçºè ã¯ãããã¯ãŒã¯ãããã³ã«ã«é¢ããå¹ åºãã¹ãã«ãšç¢ºåºããç¥èãæã£ãŠããå¿ èŠããããŸãã
IDS眲åã®äžå®å šæ§ã«ã€ããŠã¯é·ãéè°è«ãããŠããŸããããä»ã®èè ã®æèŠã¯ãã®ã¬ããŒãã§èŠã€ããããšãã§ããŸãïŒ 1ã2ã3 ã
眲åã®ééã¯ãããã§ããïŒ
æ¢ã«è¿°ã¹ãããã«ã眲åã®é床ã¯éçºè ã®è²¬ä»»ã«ããã眲åãå€ãã»ã©æ€èšŒã«å€ãã®ã³ã³ãã¥ãŒãã£ã³ã°ãªãœãŒã¹ãå¿ èŠã«ãªãã®ã¯åœç¶ã§ãã äžéååã§ã¯ ãSuricata IDSã®å Žåã1000åã®ã·ã°ããã£ããšããŸãã¯ãããã¯ãŒã¯ãã©ãã£ãã¯ã®0.5ã®ã¬ãããããšã«1ã€ã®CPUãè¿œå ããããšãæšå¥šããŠããŸãã
ããã§ã眲åã®æ°ãšãããã¯ãŒã¯ãã©ãã£ãã¯ã®éãžã®äŸåã ãã®åŒã¯å®å šã«èŠããŸããã眲åãé«éã§ãã£ããäœéã§ãã£ããããã©ãã£ãã¯ãéåžžã«å€æ§ã§ãã£ãããããšããäºå®ã¯èæ ®ãããŠããŸããã ããã§ã¯ãé ã眲åãæªããã©ãã£ãã¯ã«ããããããã©ããªããŸããïŒ
Suricata IDSã¯ã眲åã®ããã©ãŒãã³ã¹ããŒã¿ããã°ã«æžã蟌ãããšãã§ããŸãã æãé ãã·ã°ããã£ã«é¢ããããŒã¿ãããã«å°éãããã®å®è¡æéã瀺ããããã圢æããŸããããã¯ããã£ãã¯ã§è¡šãããŸã-CPUæéãšãã§ãã¯æ°ã
éèªã®äžçªäžã«ã¯ãæãé ã眲åããããŸãã
å°çšã®çœ²åã¯ãäœéãšåŒã°ãããã®ã§ãã äžéšã¯åžžã«æŽæ°ãããŠãããããŸããŸãªãã©ãã£ãã¯ãããã¡ã€ã«ã§ã¯ãä»ã®çœ²åã§æ§æãããŠããå¯èœæ§ãé«ãã§ãã ããã¯ã眲åãäžè¬ã«ãç¹å®ã®é åºã§é 眮ãããéšåæååãæ£èŠè¡šçŸã®æ€çŽ¢ãªã©ã®åçŽãªãã§ãã¯ã®ãµãã»ããã§æ§æãããããã§ãã ãããã¯ãŒã¯ãã±ãããŸãã¯ã¹ããªãŒã ããã§ãã¯ãããšãã眲åã¯ãã¹ãŠã®æå¹ãªçµã¿åããã®ãã¹ãŠã®ã³ã³ãã³ãããã§ãã¯ããŸãã ãããã£ãŠãåãã·ã°ããã£ã®æ€èšŒããªãŒã¯ããåå²ããŠããå Žåãå°ãªãå Žåããããããå®è¡æéã¯åæããããã©ãã£ãã¯ã«ãã£ãŠç°ãªããŸãã éçºè ã®ã¿ã¹ã¯ã¯ããšããããå¯èœãªãã©ãã£ãã¯ã§åäœããããã«çœ²åãæé©åããããšã§ãã
IDSã®é»æºãæ£ããéžæãããŠãããããã¹ãŠã®ãããã¯ãŒã¯ãã©ãã£ãã¯ã®ãã§ãã¯ã«å¯Ÿå¿ããŠããªãå Žåã¯ã©ããªããŸããïŒ ååãšããŠãCPUã³ã¢ã®è² è·ãå¹³åã§80ïŒ ãè¶ ããå ŽåãIDSã¯ãã§ã«ããã€ãã®ãã±ããã®ãã§ãã¯ãã¹ããããå§ããŠããŸãã ã«ãŒãã«ã®è² è·ãé«ãã»ã©ããããã¯ãŒã¯ãã©ãã£ãã¯ã«æªç¢ºèªã®å Žæãå€ã衚瀺ãããæªæã®ããã¢ã¯ãã£ããã£ãæ°ä»ãããªãå¯èœæ§ãé«ããªããŸãã
眲åããããã¯ãŒã¯ãã±ãããé·æéãã§ãã¯ãããšãã«ãã®å¹æãé«ããããšãããšã©ããªããŸããïŒ ãã®ãããªæäœã¹ããŒã ã§ã¯ãã²ãŒã ããIDSãåé€ããŠããã±ãããšæ»æã匷å¶çã«ã¹ãããããå¿ èŠããããŸãã ãããããã©ã€ããã©ãã£ãã¯ã®ãããã·ã°ããã£ãæ¢ã«ååŸããŠããããããã«å¯Ÿããå¹æãé«ããããšããŠããŸãã
å¶æ¥ããŠããŸã
ãããã®ã·ã°ããã£ã®1ã€ã¯ããã©ãã£ãã¯ã®è匱æ§CVE-2013-0156 RoR YAML Deserialization Code Executionãäžæ£å©çšããè©Šã¿ãèå¥ããŸãã
äŒæ¥WebãµãŒããŒãžã®ãã¹ãŠã®HTTPãã©ãã£ãã¯ã¯ããtypeãããyamlãããïŒRubyããšããå³å¯ãªé åºã§3è¡ãååšãããã©ããã確èªããæ£èŠè¡šçŸã§ç¢ºèªããŸãã
ãæªãããã©ãã£ãã¯ã®çæãéå§ããåã«ãããã«åœ¹ç«ã€ããã€ãã®ä»®èª¬ã瀺ããŸãã
- éšåæååã®äžèŽãèŠã€ããããšã¯ããã®ãããªäžèŽããªãããšã蚌æãããããç°¡åã§ãã
- IDS Suricataã®æ£èŠè¡šçŸãã§ãã¯ã¯ãéšåæååãèŠã€ãããããæéãããããŸãã
ã€ãŸãã眲åããã®é·ããã§ãã¯ãå¿ èŠãªå Žåããããã®ãã§ãã¯ã¯å€±æããæ£èŠè¡šçŸã䜿çšããå¿ èŠããããŸãã
æ£èŠè¡šçŸã«ããæ€èšŒãè¡ãã«ã¯ãããã±ãŒãžã«3ã€ã®éšåæååã次ã ã«ååšããå¿ èŠããããŸãã
ãããããã®é åºã§æ¥ç¶ããIDSãå®è¡ããŠæ€èšŒãè©Šã¿ãŸãã ããã¹ãããPcap圢åŒã®HTTPãã©ãã£ãã¯ã§ãã¡ã€ã«ãæ§ç¯ããããã«ã Cisco Talos file2pcapããŒã«ã䜿çšããŸããã
å¥ã®keyword_perf.logãã°ã䜿çšãããšããã§ãã¯ãã§ãŒã³ãæ£åžžã«å°éïŒã³ã³ãã³ãäžèŽ-3ïŒããæ£èŠè¡šçŸïŒPCREïŒãšå€±æïŒPCREäžèŽ-0ïŒã«å°éããããšãããããŸãã ããã«é«äŸ¡ãªPCREãã§ãã¯ã®æ©æµãåãããå Žåã¯ãå®å šã«å解ããŠæå¹ãªãã©ãã£ãã¯ãéžæããå¿ èŠããããŸãã
æ£èŠè¡šçŸããªããŒã¹ãšã³ãžãã¢ãªã³ã°ããã¿ã¹ã¯ã¯ãæåã§å®è¡ããã®ã¯ç°¡åã§ãããããšãã°ãåŸæ¹åç §ãååä»ããã£ããã£ã°ã«ãŒããªã©ã®æ§é ã®ãããèªååãäžååã§ããããããçš®é¡ã®æ£èŠè¡šçŸãæ£åžžã«æž¡ãããã®æååãèªåçã«éžæããæ¹æ³ã¯èŠã€ãããŸããã§ããã
ãã®ãããªåŒã«æäœéå¿ èŠãªæååã¯ã次ã®æ§æã§ããã 倱æããæ€çŽ¢ã¯æåããæ€çŽ¢ãããè²»çšãããããšãã仮説ããã¹ãããã«ã¯ããã®è¡ããå³ç«¯ã®æåãåãåããéåžžã®æ€çŽ¢ãå床å®è¡ããŸãã
<a type="yaml" !ruby : 32 steps, match <a type="yaml" !rub : 57 steps, no match
åãååãæ£èŠè¡šçŸã«ãåœãŠã¯ãŸãããšãããããŸãã倱æãããã§ãã¯ã¯ãæåãã察å¿ãããå€ãã®ã¹ããããèžã¿ãŸããã ãã®å Žåãå·®ã¯50ïŒ ä»¥äžã§ããã ããªãèªèº«ã§èŠãããšãã§ããŸãã
å¥ã®èå³æ·±ãäºå®ã¯ããã®æ£èŠè¡šçŸã®ãããªãç 究ã§çºèŠãããŸããã æåŸã®æåãªãã§å¿ èŠæå°éã®è¡ãç¹°ãè¿ãè€è£œããå Žåããã¹ããå®äºããããã®ã¹ãããæ°ã®å¢å ãæåŸ ããã®ã¯åççã§ããããã®ãããªæé·ã®äŸåæ§ã¯å®å šã«ççºçã§ãïŒ
2 x (<a type="yaml" !rub) : 209 steps 10 x (<a type="yaml" !rub) : 9885 steps 100 x (<a type="yaml" !rub) : timeout
æ°åã®ãã®ãããªè¡ããã§ãã¯ããæéã¯ãã§ã«çŽ1ç§ã§ããããã®æ°ãå¢ãããšãã¿ã€ã ã¢ãŠããšã©ãŒãçºçããŸãã æ£èŠè¡šçŸã§ã®ãã®å¹æã¯ãç Žå±çããã¯ãã©ããã³ã°ãšåŒã°ãã Habréãå«ãå€ãã®èšäºãããã«åãçµãã§ããŸãã ãã®ãããªãšã©ãŒã¯ãä»æ¥ãŸã§äžè¬çãªè£œåã«èŠãããŸãã ããšãã°ãæè¿Apache Strutsãã¬ãŒã ã¯ãŒã¯ã§çºèŠãããŸããã
èŠã€ãã£ãè¡ãSuricata IDSã«æ»ãããã§ãã¯ããŸãã
Keyword Ticks Checks Matches -------- -------- ------- -------- content 19135 4 3 pcre 1180797 1 0
ãã ãããã¡ã³ãã¡ãŒã¬ãšèŽåœçãªããã¯ãã©ããã³ã°ã®ä»£ããã«ãIDSã®è² è·ã¯ã»ãšãã©ç®ç«ãããããã100äžãã£ãã¯ã§ãã ããã¯ããããã°åŸãSuricata IDSã®ãœãŒã¹ã³ãŒããšå éšã§äœ¿çšãããlibpcreã©ã€ãã©ãªã調ã¹ãåŸãPCREã®å¶éã«ééããããšã«é¢ããã¹ããŒãªãŒã§ãã
- MATCH_LIMIT DEFAULT = 3500
- MATCH_LIMIT_RECURSION_DEFAULT = 1500
ãããã®å¶éã¯ãå€ãã®æ£èŠè¡šçŸã©ã€ãã©ãªã§æ£èŠè¡šçŸãçœå®³ã«é¥ãããšãå¶éããŸãã åãå¶éã¯ãæ£èŠè¡šçŸã®ãã§ãã¯ãåªå ãããWAFã«ããããŸãã ãã¡ããããããã®å¶éã¯IDSæ§æã§å€æŽã§ããŸãããããã©ã«ãã§é åžãããŠãããå€æŽãæšå¥šããŠããŸããã
æ£èŠè¡šçŸã®ã¿ãæäœããŠããç®çã®çµæãåŸãã®ã«åœ¹ç«ã¡ãŸããã ãããããã®ãããªã³ã³ãã³ããå«ããããã¯ãŒã¯ãã±ãããIDSã§ç¢ºèªããå Žåã¯ã©ãã§ããããã
ãã®å Žåããã°ã«æ¬¡ã®å€ãèšé²ãããŸãã
Keyword Avg. Ticks Checks Matches -------- ---------- ------- -------- content 3338 7 6 pcre 12052 3 0
ãã§ãã¯ã®æ°ã¯4ã§ããããå ã®è¡ãéè€ããããã«7ã«ãªããŸããã ã¡ã«ããºã ã¯äžæã®ãŸãŸã§ããããŸã è¡ãè€è£œãããšãéªåŽ©ã®ããã«ãã§ãã¯æ°ãå¢å ããããšãäºæ³ãããŸãã æçµçã«ã次ã®å€ãéæããããšãã§ããŸããã
Keyword Avg. Ticks Checks Matches -------- ---------- ------- -------- content 1508 1507 pcre 1492 0
眲åã«ãã£ãŠãã§ãã¯ãããã³ã³ãã³ãã«é¢ä¿ãªããéšåæååãšæ£èŠè¡šçŸã®ãã§ãã¯ã®ç·æ°ã¯3000ãè¶ ããŸããã æããã«ãIDSèªäœã«ãå éšãªããã¿ãŒããããããã¯ä»åã¯Inspection-recursion-limitãšåŒã°ããããã©ã«ãã§ã¯3000ã«ãªããŸããPCREãIDSãããã³ãã§ãã¯ãããã³ã³ãã³ãã®1åéãã®ãµã€ãºã®å¶éã®ãã¹ãŠã®å¶éæ°å 容ãšæ£èŠè¡šçŸã®éªåŽ©ã®ãããªãã§ãã¯ã䜿çšãããšãçµæã¯ããªããå¿ èŠãªãã®ã§ãïŒ
Keyword Avg. Ticks Checks Matches -------- ---------- ------- -------- content 3626 1508 1507 pcre 1587144 1492 0
1ã€ã®æ£èŠè¡šçŸãã§ãã¯ã®è€éãã¯å€ãã£ãŠããŸãããããã®ãããªãã§ãã¯ã®æ°ã¯å€§å¹ ã«å¢ãã1.5äžã«éããŸããã ãã§ãã¯ã®æ°ã«åãã§ãã¯ã«è²»ããããã¡ãžã£ãŒã®å¹³åæ°ãæãããšãåæãããŠãã30åãã£ãã¯ãåŸãããŸãã
Num Rule Avg Ticks -------- ------------ ----------- 1 2016204 3302218139
ãããŠãããã¯åå以äžã®å©çã§ãïŒ æäœã«ã¯ãæå°éã®HTTP POSTèŠæ±ãã³ã³ãã€ã«ããããã«curlãŠãŒãã£ãªãã£ã®ã¿ãå¿ èŠã§ãã 次ã®ããã«ãªããŸãã
ç¹°ãè¿ããã¿ãŒã³ãæã€HTTPãã£ãŒã«ããšHTTPæ¬æã®æå°éã®ã»ããã
ãã®ãããªã³ã³ãã³ãã¯ç¡éã«å€§ããããããšã¯ã§ãããIDSãããããã§ãã¯ããããã«èšå€§ãªãªãœãŒã¹ãè²»ããå¿ èŠããããŸãããªããªããTCPã»ã°ã¡ã³ãå ã§ã¯åäžã®ã¹ããªãŒã ã¹ããªãŒã ã«æ¥ç¶ãããŠããã«ãããããããã¹ããªãŒã ãšåéãããHTTPãã±ããã¯å®å šã«ãã§ãã¯ãããªãããã§ã圌ãã¯å€§ãããããŸããã§ããã 代ããã«ããµã€ãºãçŽ3ã4ãããã€ãã®å°ããªæçã§ãã§ãã¯ãããŸãã ãã§ãã¯ããã»ã°ã¡ã³ãã®ãã®ãµã€ãºãšãã§ãã¯ã®æ·±ãã¯ãæ§æã§èšå®ãããŸãïŒIDSã®ãã¹ãŠãšãŸã£ããåãã§ãïŒã ã»ã°ã¡ã³ãã®ãµã€ãºã¯ããã®ãããªã»ã°ã¡ã³ãã®æçåå¢çãžã®æ»æãé¿ããããã«ãæåããæåã«ãããã«ãéããŸãã-ããã©ã«ãã®ã»ã°ã¡ã³ããµã€ãºãç¥ã£ãŠããæ»æè ããããã¯ãŒã¯ãã±ãããåå²ã§ãããããæ»æã¯2ã€ã®é£æ¥ããã»ã°ã¡ã³ãã«åå²ããã眲åã«ãã£ãŠæ€åºãããŸããã
ãã®ããã1ã€ã®ã¢ããªã±ãŒã·ã§ã³ã§3,000,000,000以äžã®CPUãã£ãã¯ã«IDSãããŒããã匷åãªæŠåšãæå ã«ãããŸããã ããã¯ã©ãããæå³ã§ããïŒ
å®éãåŸãããæ°å€ã¯å¹³åCPUã®çŽ1ç§ã§ãã åçŽãªé¢ä¿ã¯ããµã€ãºã3 KBã®1ã€ã®HTTPèŠæ±ãéä¿¡ããããšã«ãããIDSã«1ç§éäœæ¥ãããŒãããããšã§ãã IDSã®ã³ã¢ãå€ãã»ã©ãåæã«åŠçã§ããããŒã¿ã¹ããªãŒã ãå¢ããŸãã
IDSã¯ã¢ã€ãã«ç¶æ ã§ã¯ãªãããšãå¿ããªãã§ãã ãããååãšããŠãããã¯ã°ã©ãŠã³ããããã¯ãŒã¯ãã©ãã£ãã¯ããã§ãã¯ããããšã§ãªãœãŒã¹ã®äžéšãåãããã®æ»æã®ãããå€ãäžããŸãã
8/40ã³ã¢ãããã¯ã°ã©ãŠã³ããã©ãã£ãã¯ã®ãªãIntel Xeon E5-2650 v3 2.30 Ghz CPUãåããåäœäžã®IDSæ§æã§æž¬å®ãå®è¡ãããšã8åã®CPUã³ã¢ãã¹ãŠã100ïŒ ããŒãããããããå€ã¯ãããã250ããããã/ç§ã«ãªããŸããã ãããŠãããã¯äœã®ã¬ããããã®ãããã¯ãŒã¯ãããŒãåŠçããããã«èšèšãããã·ã¹ãã åãã§ãã
ãã®ç¹å®ã®çœ²åã䜿çšããã«ã¯ãæ»æè ã¯ä¿è·ãããWebãµãŒããŒã«æ¯ç§çŽ10ã®HTTPèŠæ±ãéä¿¡ããã ãã§ããããã¯ãŒã¯ãã±ããã®ãã¥ãŒãIDSã§åŸã ã«æºããããšãã§ããŸãã ãããã¡ã䜿ãæãããããšããã±ããã¯IDSãééãå§ãããã®æç¹ãããæ»æè ã¯ä»»æã®ããŒã«ã䜿çšããããä»»æã®æ»æãå®è¡ããããæ€åºã·ã¹ãã ã«æ°ä»ãããããšã¯ãããŸããã äžå®ã¬ãã«ã®æªæã®ãããã©ãã£ãã¯ã«ããããã®ãã©ãã£ãã¯ãå éšãããã¯ãŒã¯ãžã®æ»æãåæ¢ãããŸã§IDSãç¡å¹ã«ã§ããŸããçæçãªæ»æã®å Žåãæ»æè ã¯ãã®ãããªãã±ããããçãã¹ãã€ã¯ãéä¿¡ããæ€åºã·ã¹ãã ã§å€±æãéæããããšãã§ããŸãããçæéã§ãã
é ã眲åã®æäœã¯æ¢åã®ã¡ã«ããºã ã§ã¯æ€åºã§ããŸãããIDSã«ã¯ãããã¡ã€ãªã³ã°ã³ãŒãããããŸãããåçŽã«é ã眲åãšå£æ» çãªã»ã©é ã眲åãåºå¥ããŠèªåçã«éç¥ããããšã¯ã§ããŸããã é©åãªã³ã³ãã³ããäžè¶³ããŠããããã眲åã®ããªã¬ãŒã«é¢ããã·ã°ããªã³ã°ãçºçããªãããšã«æ³šæããŠãã ããã
ãã§ãã¯ã®æ°ã®åå äžæã®å¢å ãèŠããŠããŸããïŒ IDSãšã©ãŒãå®éã«çºçããäžèŠãªãã§ãã¯ã®æ°ãå¢å ããŸããã ãã®è匱æ§ã®ååã¯CVE-2017-15377㧠ãçŸåšSuricata IDS 3.2ããã³4.0ãã©ã³ãã§ä¿®æ£ãããŠããŸãã
äžèšã®ã¢ãããŒãã¯ã1ã€ã®ç¹å®ã®çœ²åã€ã³ã¹ã¿ã³ã¹ã«å¯ŸããŠããŸãæ©èœããŸãã ããã¯ããªãŒãã³ãªã·ã°ããã£ã»ããã®äžéšãšããŠé åžãããååãšããŠããã©ã«ãã§æå¹ã«ãªã£ãŠããŸãããæãããããªã·ã°ããã£ã®äžéšã«ã¯ãæ°ããã·ã°ããã£ãæã ãããã¢ããããŸãããä»ã®ãã©ãã£ãã¯ã¯ãŸã ãã©ãã£ãã¯ãåŸ ã£ãŠããŸãã IDS Snortããã³Suricataã®çœ²åèšè¿°èšèªã¯ãbase64ãã³ãŒããã³ã³ãã³ããžã£ã³ããæ°åŠæŒç®ãªã©ãå€ãã®äŸ¿å©ãªããŒã«ãéçºè ã«æäŸããŸãã æ€æ»ã®ä»ã®çµã¿åããããæ€èšŒã®ããã«æ¶è²»ããããªãœãŒã¹ã®ççºçãªå¢å ãåŒãèµ·ããå¯èœæ§ããããŸãã ããã©ãŒãã³ã¹ããŒã¿ã®æ³šææ·±ãç£èŠã¯ãéçšã®åºçºç¹ãšãªããŸãã CVE-2017-15377ã®åé¡ãä¿®æ£ãããåŸããããã¯ãŒã¯ãã©ãã£ãã¯ããã§ãã¯ããããã«åã³Suricata IDSãèµ·åãããŸã£ããåãç»åã確èªããŸããããã°ã®äžçªäžã«ããæãããããªçœ²åã§ãããçªå·ãç°ãªããŸãã ããã¯ããã®ãããªçœ²åãå€ãååšããããšãããã³ãããã®æäœãžã®ã¢ãããŒãã瀺åããŠããŸãã
IDSã ãã§ãªããã¢ã³ããŠã€ã«ã¹ãWAFãããã³ä»ã®å€ãã®ã·ã¹ãã ã眲åæ€çŽ¢ã«åºã¥ããŠããŸãã ãããã£ãŠãåæ§ã®ã¢ãããŒããé©çšããŠãããã©ãŒãã³ã¹ã®åŒ±ç¹ãèŠã€ããããšãã§ããŸãã 圌ã¯ãæ€åºã·ã¹ãã ã«ããæªæã®ããã¢ã¯ãã£ããã£ã®æ€åºãéãã«åæ¢ããããšãã§ããŸãã ããã«é¢é£ä»ãããããããã¯ãŒã¯ã¢ã¯ãã£ããã£ã¯ãä¿è·è£ 眮ãç°åžžæ€åºåšã§ã¯æ€åºã§ããŸããã å®éšã®ããã«ãæ€åºã·ã¹ãã ã§ãããã¡ã€ãªã³ã°èšå®ããªã³ã«ããããã©ãŒãã³ã¹ãã°ã®äžéšã確èªããŸãã
@ attackdetectionã TwitterããKirill Shipulinãæçš¿ | é»å ±