ãååããã®ååæã«ãæ å ±ã»ãã¥ãªãã£ç®¡çã®ãããã¯ã«é¢ããããŒãããŒåãã®é«åºŠãªãã¬ãŒãã³ã°ã³ãŒã¹ãèšç»ãããŠããŸãã ç§ãã¡ã®ããŒã ã¯ãSIEMã·ã¹ãã ã®æ§ç¯ã®åé¡ã«å°å¿µããå®è·µçãªã¬ãã¹ã³ãæºåããããã«æåŸ ãããŠããŸãïŒã-ãã®ãããªææ¡ã®åŸãããŒãã¯å¥ã®ãã©ãã£ãªãã£ã§äžæåæ¢ããŸããã
æŒãããããšãããæŒè ã®äžãããäŒè°ã®åå è ã¯ããã®ãããªææ¡ãäœã矩åä»ããŠããã®ããç解ããïŒæéãåŽåãç¥çµã®åºè²»
2ãæéã®ããŒãã¯ãŒã¯ãšã¬ãã¹ã³ã®æçµããŒãžã§ã³ã®æºåã®åŸãç§ãã¡ã¯ãã®æéãéåžžã«çç£çã«è²»ãããããšãèªããŸããã ãããŠåœŒãã¯ãéå£ããã®ãããªãææŠããžã®çããã©ãã»ã©å°éçã«åœ¹ã«ç«ã€ãæ³åããããŸããã§ããã
説åŸåã®ããäŸã䜿çšããŠã1æ¥ã§ç¬èªã®SIEMã·ã¹ãã ã®éçºã«é¢ããã¯ãŒã¯ã·ã§ããã®è³æãå ±æããŸãã
å 責äºé ææ-èšå€§ãªéã§ã枬å®ãããããŒã¹ã§ææ¥ã®å šåŠæã«åããŠèšèšãããŠããŸãã äŸã¯ããªããã£ãã§ãã èè ã¯ãSIEMãªãŒãã³ãœãŒã¹ãœãªã¥ãŒã·ã§ã³ã®ç£æ¥å¿çšã®å¯èœæ§ãçããŸãããåæã«ãå®äŸã®ç 究ãäž»é¡é åãããããç解ããã®ã«åœ¹ç«ã€ãšä¿¡ããŠããŸãã
ãœãŒã¹ããŒã¿ã®åæãšåé¡ã®èª¬æ
åæããŒã¿ã調æŽããã³ãŒã¹ãªã¹ããŒã®å¹³åããããã¡ã€ã«ãã決å®ããŸãã åœç€Ÿã®ããŒãããŒã¯ãæ å ±ã»ãã¥ãªãã£ïŒISïŒã®åéã®ãšã³ãžãã¢ãšå°é家ã掟é£ããå¿çšç 究ã®å®æœãå°éãœãããŠã§ã¢ã®éçºãé¢é£ãµãŒãã¹ã®æäŸãæ åœããŠããŸãã
èŽè¡ã¯ãé«çæè²ãåããé«åºŠãªåŠäœãšå°éçè³æ Œãéžæçã«åããæºåãããçµéšãããããšãçŽæããŸãã ã³ãŒã¹ã®åå è ã¯ãçªå·ãæäŸãããã®ã§ã¯ãªããæ°ããç¥èã«èå³ããããŸãã
æ宀ã§ã¯ãçè«ã®æå°åãšå®è·µãšå©çã®æå°åãåããææ°ã®ã»ãã¥ãªãã£ã€ã³ã·ãã³ã管çã·ã¹ãã ã®æ§ç¯ãæ€èšããããšãããŒãããŒã®åžæã§ãã
ãã®ããã次ã®æéäžã«ã¯ãŒã¯ã·ã§ãããæºåããããšãææ¡ããŸãã
- SIEMã·ã¹ãã ãæ§ç¯ããããã®ããç¥ãããã¢ãããŒãã«ã€ããŠè©±ããŸãã
- ç¬èªã®ãœãªã¥ãŒã·ã§ã³ãéçºããäŸïŒããªããã£ãã§ã¯ããã説åŸåãããïŒã䜿çšããŠãåæ§ã®ã·ã¹ãã ã®ã¯ã©ã¹ã®ã¢ãŒããã¯ãã£äžã®ç¹åŸŽã説æããŸãã
- ãã¹ããããã¯ãŒã¯ã€ã³ãã©ã¹ãã©ã¯ãã£ã®ã»ãã¥ãªãã£ãç£èŠããããã®ãæŠéèšç·Žãæ¡ä»¶ã§ã®ç¬èªã®SIEMã·ã¹ãã ã®åäœãå®èšŒããŸãã
åŠçããããã¯ãŒã¯æè¡ãšããã°ã©ãã³ã°ã®åºç€ïŒPHPãšCïŒã®ã³ãŒãäŸïŒã«ç²ŸéããŠããããšãé¡ã£ãŠããŸãã
å°æ¥ã®ã¬ãã¹ã³ã®ããã«ææã®éçºã«é²ã¿ãŸãã
SIEMã·ã¹ãã ã®éçºã«é¢ããã¯ãŒã¯ã·ã§ãã
ã¯ããã«ãäžè¬çãªèª¬æã«éå®ããŸãã
SIEMã·ã¹ãã ã®äž»ãªã¿ã¹ã¯ã¯ãããŸããŸãªãœãŒã¹ããä¿è·ãããã€ã³ãã©ã¹ãã©ã¯ãã£ã«èšé²ãããã€ãã³ããåæããæ»æ/æ»æã·ããªãª/çãããã¢ã¯ã·ã§ã³/æšæºããã®éžè±ãæ€åºããå¿ èŠã«å¿ããŠé©åãªã»ãã¥ãªãã£ã€ã³ã·ãã³ãã圢æããããšã§ãã
SIEMã·ã¹ãã ã®åºæ¬æ©èœã¯ã次ã®ã¿ã¹ã¯ã«å¯Ÿãããœãªã¥ãŒã·ã§ã³ãæäŸããå¿ èŠããããŸã[1ã2]ïŒ
- çä¿¡ã»ãã¥ãªãã£ã€ãã³ãã®åéãšä¿åã
- èšé²ãããã»ãã¥ãªãã£ã€ãã³ãã®åŠçãšåæã
- ãªã¢ã«ã¿ã€ã ã§ã®ã»ãã¥ãªãã£ããªã·ãŒã®æ»æããã³éåã®æ€åºïŒãªã¢ã«ã¿ã€ã ã«è¿ãïŒ;
- ã»ãã¥ãªãã£ã€ã³ã·ãã³ãã®èå¥ãšåæã
- ã¬ããŒãçæã
ããã«ã次ã®æ©èœã®å®è£ ãä¿èšŒããããã«ãSIEMã¯ã©ã¹ã®ææ°ã®ãœãªã¥ãŒã·ã§ã³ã«è¿œå ã®èŠä»¶ã課ãããŸã[3]ã
- å¶åŸ¡ãããã·ã¹ãã ã®ãªãœãŒã¹ã®ã»ãã¥ãªãã£ã®è©äŸ¡ã
- IS管çã·ã¹ãã ãæ¢åã®èŠä»¶ãšæšæºã«æºæ ããŠããããšã®æ€èšŒã
- ISãªã¹ã¯ç®¡çãªã©
SIEMã·ã¹ãã ã®æ©èœã¢ãã«ã¯ãããŒã¿åéãååŠçãä¿åãåæããã¬ãŒã³ããŒã·ã§ã³[1]ã®æ©èœãµãã·ã¹ãã ãçµã¿åãããŠããŸãã SIEMãœãªã¥ãŒã·ã§ã³ã§ã»ãã¥ãªãã£ã€ãã³ããåŠçããäžè¬çãªã·ãŒã±ã³ã¹ãå³[2]ã«ç€ºããŸãã
ããã«ãå®è·µçãªã¹ãã«ãéçºããããã«ç¬èªã®SIEMã·ã¹ãã ãéçºããäŸãæ€èšããããšãææ¡ããŸãã
ãã®äŸã¯ããã¬ãŒãã³ã°Webã¢ããªã±ãŒã·ã§ã³ã®åçŽåãããããã«ãŒããã©ãŒã¹ãæ»æã·ããªãªãã·ãã¥ã¬ãŒãããŸãã éçºãããSIEMã·ã¹ãã ã®ã¿ã¹ã¯ã¯ããã®ãããªæ»æãå®è£ ããè©Šã¿ãã»ãã¥ãªãã£ç®¡çè ã«éç¥ããããšã§ãã
ãã¹ããã³ããæ§ç¯ããã«ã¯ãPHPãšCïŒã®ãªãŒãã³ãœãŒã¹ãœãªã¥ãŒã·ã§ã³ãšç¬èªã®ã¢ããªã±ãŒã·ã§ã³ã䜿çšããŸãã ãã¹ããã³ãã®ã¢ãŒããã¯ãã£ã次ã®å³ã«ç€ºããŸãïŒåºçç©ã®ã¿ã€ãã«ç»åãç¹°ãè¿ããŸãïŒã
ããã²ãŒã·ã§ã³ãç°¡åã«ããããã«ãäŸã®ãµãã»ã¯ã·ã§ã³ã«ã¯çªå·ãä»ããããŠããŸãã ç·Žç¿ããïŒ
1.ãã¹ãç°å¢ã®æ§æã 1.1ã Apache WebãµãŒããŒãã€ã³ã¹ããŒã«ããŠæ§æããŸãã 1.2ã MongoDBããŒã¿ãŠã§ã¢ããŠã¹ãã€ã³ã¹ããŒã«ããŠæ§æããŸãã 1.3ã RabbitMQã¡ãã»ãŒãžãããŒã«ãŒãã€ã³ã¹ããŒã«ããŠæ§æããŸãã 1.4ã Visual Studioéçºç°å¢ãã€ã³ã¹ããŒã«ããŠæ§æããŸãã 2.å®å šãªWebã¢ããªã±ãŒã·ã§ã³Buggy Webappã®éçºã 3. Apache WebãµãŒããŒçšã®ã³ãã¯ã¿ã®éçºã 4.çžé¢ã«ãŒãã«ïŒã€ãã³ããã³ãã©ãŒïŒã®éçºã 4.1ã MongoDBããŒã¿ãŠã§ã¢ããŠã¹ããã©ãŒãã³ã¹è©äŸ¡ã 4.2ã çžé¢ã«ãŒã«ã®ã»ããã®åœ¢æã 4.3ã çžé¢ã®ã³ã¢ã®å®è£ ã 5.ã»ãã¥ãªãã£ç®¡çã³ã³ãœãŒã«ã®éçºã 6. SIEMã·ã¹ãã ã«ãã£ãŠéçºãããæ©èœãã§ãã¯ã
åç §ïŒ
- ãéèŠãªã€ã³ãã©ã¹ãã©ã¯ãã£å ã®æ å ±ãä¿è·ããããã®æ å ±ããã³ã»ãã¥ãªãã£ã€ãã³ã管çæè¡ã®é©çšãã¯ãSPIIRANã³ã³ãã¥ãŒã¿ãŒã»ãã¥ãªãã£ç 究æã®ç 究è ããŒã ïŒI. V. KotenkoãIãB. SaenkoãOãV. Polubelovaã®æåã®èšäºïŒ2012ïŒã®1ã€ã§ãã ãA.AãChechulinïŒãSIEMã·ã¹ãã ã®æ§ç¯ãšéçšã«é¢ããäžè¬èŠå®ãåããŠããŸãã ç 究宀ã®åºçç©ã®å šãªã¹ã ã
- ãã»ãã¥ãªãã£æ å ±ãšã€ãã³ã管çïŒSIEMïŒå®è£ ãã¯ãDavid MillerãSean Harris et alã2011 Editionã«ããçŽ æŽãããæ¬ã§ãããã€ãã®å€ãç« ããããŸãããããã§ã倧éšåãé¢é£ããŠããŸãã SIEMã·ã¹ãã ã®äœç³»çãªäœç³»çãªå€èŠ³ãããããããè±èªãããããããäŸã
- ã»ãã¥ãªãã£æ å ±ããã³ã€ãã³ã管çã®ããžãã¯ã¯ã¢ãã©ã³ã2015 ã 2016幎ãš2017幎ã®GartnerããŒãã¬ããŒãã¯ãSIEMã·ã¹ãã ã®ç 究è ã«ã圹ç«ã¡ãŸãã
1.ãã¹ãç°å¢ã®æ§æ
ã泚æ 䜿çšããããœãããŠã§ã¢ãœãªã¥ãŒã·ã§ã³ã®ææ°ããŒãžã§ã³ã§ã¹ã¿ã³ããæ©èœããå¯èœæ§ããããŸãã ãã ããç 究çµæã®åçŸæ§ã確ä¿ããããã«ãå¿ èŠãªäŸåé¢ä¿ããã¹ãŠæ確ã«ãªããæäœæ§ããã§ãã¯ãããããŒãžã§ã³çªå·ãä¿®æ£ããŸãã
1.1 Apache WebãµãŒããŒã®ã€ã³ã¹ããŒã«ãšæ§æ
XAMPP for Windowsãã«ã ãããŒãžã§ã³7.1.9ïŒApache 2.4.27 + PHP 7.1.9ïŒãWebãµãŒããŒãšããŠäœ¿çšããŸãã ã€ã³ã¹ããŒã©ãŒã䜿çšããŠXAMPPãããŠã³ããŒãããŠã€ã³ã¹ããŒã«ããããã©ã«ãã®ã€ã³ã¹ããŒã«ãã©ã«ããŒ-ãcïŒ\ xampp \ããéžæããŸãã
WebãµãŒããŒãæ£ããã€ã³ã¹ããŒã«ãããŠããããšã確èªããã«ã¯ãXAMPPã³ã³ãããŒã«ããã«ãéããApacheã¢ãžã¥ãŒã«ãå®è¡ããŸãã 次ã«ããã©ãŠã¶ã®ã¢ãã¬ã¹ãhttp://127.0.0.1/ãã§ãXAMPPãããžã§ã¯ãã®ãŠã§ã«ã«ã ããŒãžãéããŸãã
ãšã©ãŒããªãå Žåã¯ã次ã®æé ã«é²ã¿ãŸãã
1.2 MongoDB Data Warehouseã®ã€ã³ã¹ããŒã«ãšæ§æ
ããŒã¿ãŠã§ã¢ããŠã¹ãæŽçããã«ã¯ãMongoDBããã¥ã¡ã³ãããŒã¿ããŒã¹ã䜿çšããããšããå§ãããŸã ã ãã®éžæã®äž»ãªçç±ã¯ãæè²äžã®åé¡ã«å¯Ÿãã解決çãšãNoSQLã¢ãããŒãã«ç²ŸéããŠããããšã§ãã ããã«ãåžè²©ã®SIEMã·ã¹ãã ã®è¡šé¢çãªèª¿æ»ã§ãããåŸæ¥ã®SQLããŒã¿ããŒã¹ãšãšãã«ãã»ãšãã©ã®äž»èŠã¡ãŒã«ãŒããœãªã¥ãŒã·ã§ã³ã§NoSQL / NewSQLãã¯ãããžãŒã䜿çšããŠãããšçµè«ä»ããããšãã§ããŸãã
以äžã¯ãããç¥ãããŠãã1ã€ã®åçšSIEMã·ã¹ãã ã®ã¢ãã«ã§ããããœãªã¥ãŒã·ã§ã³ã®ã¡ãŒã«ãŒïŒä»¥äžã§èª¬æããã¡ãã»ãŒãžãããŒã«ãŒïŒã«ããMongoDBããã³RabbitMQã®äœ¿çšã確èªããŠããŸãã
å ¬åŒãµã€ãããããŠã³ããŒãããã€ã³ã¹ããŒã«ããã±ãŒãžMongoDB Community ServerããŒãžã§ã³3.4.10ãã€ã³ã¹ããŒã«ããŸãã æ瀺ã®äŸïŒ
- MongoDBããµãŒãã¹ãšããŠã€ã³ã¹ããŒã«ããããã®ç°¡åãªæé
- Windowsã«MongoDB Community Editionãã€ã³ã¹ããŒã«ãã
ã³ã¬ã¯ã·ã§ã³ïŒã³ã¬ã¯ã·ã§ã³ïŒãã¹ãã®ãã£ãŒã«ãïŒãã£ãŒã«ãïŒ{aïŒ1}ã§æ°ããããã¥ã¡ã³ãïŒããã¥ã¡ã³ãïŒãäœæããããšã«ããããµãŒããŒã®ããã©ãŒãã³ã¹ããã§ãã¯ããŸãã ã³ã¬ã¯ã·ã§ã³å ã®ããã¥ã¡ã³ããæ€çŽ¢ããè©Šã¿ã¯æåããã¯ãã§ãã
ã³ã¬ã¯ã·ã§ã³ã«ããã¥ã¡ã³ããè¿œå ãããšããMongoDBãµãŒããŒã¯ããã©ã«ãã§ObjectIdåã® _idãã£ãŒã«ãã§ããã¥ã¡ã³ããè£å®ããããšã«æ³šæããŠãã ããã ãã®ãè¿œå ãã¯äžæã§ããïŒããã·ã¥ãšæ··åããªãã§ãã ããã圢æã®èŠåã¯ç°ãªããŸãïŒãã³ã¬ã¯ã·ã§ã³å ã®ããã¥ã¡ã³ããäžæã«èå¥ã§ããŸãã
ãã1ã€ãããèŠèŠçãªãã§ãã¯ãè¡ããŸãããã RobomongoããŒãžã§ã³1.1.0-Betaãªã©ã®å©çšå¯èœãªç®¡çããŒã«ã®1ã€ãããŠã³ããŒãããMongoDBãµãŒããŒã«æ¥ç¶ããŸãã ãã¹ãã³ã¬ã¯ã·ã§ã³ã«ã¯ããã£ãŒã«ã{aïŒ1}ã§äœæãããããã¥ã¡ã³ããå«ãŸããŠããå¿ èŠããããŸãã
ã¹ã¯ãªãŒã³ã·ã§ããã§ã¯ãäºæ³ãããã¢ãã¬ã¹127.0.0.1ã®ä»£ããã«ãã¢ãã¬ã¹192.168.137.1ã瀺ãããŠããŸã-å®éšã§ã¯ãè€æ°ã®ç©çã¯ãŒã¯ã¹ããŒã·ã§ã³ãšä»®æ³ãã·ã³ã§æ§æãããåæ£ãã¹ããã³ãã䜿çšããŸãã ãã ãããã¹ãŠã®ã³ã³ããŒãã³ãããã¹ããªãã¬ãŒãã£ã³ã°ã·ã¹ãã ã®åãã¯ãŒã¯ã¹ããŒã·ã§ã³ã«ã€ã³ã¹ããŒã«ããã®ã«åé¡ã¯ãªãã¯ãã§ãã
以äžã®ããŒã¿ãŠã§ã¢ããŠã¹ã®ããã©ãŒãã³ã¹ãè©äŸ¡ããããšãææ¡ãããŠããŸãã
ãšã©ãŒããªãå Žåã¯ã次ã®æé ã«é²ã¿ãŸãã
æçšãªãªã³ã¯ãšè¿œå ç¥èã®ãœãŒã¹ïŒ
- 人æ°ã®ç§åŠåºçç©NoSQL Distilled by Martin FowlerãšPramod Sadalajã é©åãªç¿»èš³ããããŸã- ãNoSQLïŒéãªã¬ãŒã·ã§ãã«ããŒã¿ããŒã¹ã®éçºã®ããã®æ°ããæ¹æ³è«ãã
- Habréã®æ°é®®ãããïŒ ãSQLãNoSQLã«åãçç±ãšãå°æ¥SQLãNoSQLã«ã€ãªããããšã ã ãSQLãŸã㯠NoSQL- ããã åé¡ã§ãã ã
1.3 RabbitMQã¡ãã»ãŒãžãããŒã«ãŒã®ã€ã³ã¹ããŒã«ãšèšå®
éçºããã·ã¹ãã ã®ã³ã³ããŒãã³ãéã®ããŒã¿äº€æãæŽçããã«ã¯ã stackshare.ioã«ãããã®ã¯ã©ã¹ã®æãäžè¬çãªãœãªã¥ãŒã·ã§ã³ã®1ã€ã§ããRabbitMQã¡ãã»ãŒãžãããŒã«ãŒã䜿çšããŸã ã
RabbitMQ Server for WindowsïŒããŒãžã§ã³3.7.2ïŒã®æšå¥šã€ã³ã¹ããŒã«æé ã«åŸããŸãã ããŒãžã§ã³ã®äŸåé¢ä¿ã確èªããåŸã Erlangãã€ã³ã¹ããŒã«ããå¿ èŠããããŸã-ErlangããŒãžã§ã³20.1ã¯RabbitMQãµãŒããŒ3.7.2ã«é©ããŠããŸãã
ã€ã³ã¹ããŒã©ãŒã¯ãRabbitMQãµãŒããŒããµãŒãã¹ãšããŠæ§æããŸãã ããã«ç¢ºèªããããã«ããcïŒ\ Program Files \ RabbitMQ Server \ rabbitmq_server-3.7.2 \ sbin \ããã£ã¬ã¯ããªã«ç§»åããŸãã
ãµãŒãã¹éå§ã³ãã³ããå®è¡ããŸãã
rabbitmq-service start
ããŒã ã®ã¹ããŒã¿ã¹ã確èªãã
rabbitmqctl status
ã¹ããŒã¿ã¹ã«ãšã©ãŒããªãå Žåããã¹ãŠãæ£åžžã§ãã
ã¡ãã»ãŒãžãããŒã«ãŒã®æ©èœãèŠèŠçã«ç£èŠããã«ã¯ã察å¿ãããã©ã°ã€ã³-管çãã©ã°ã€ã³ãæ¥ç¶ããŸãã
rabbitmq-plugins enable rabbitmq_management
ãã©ãŠã¶ã®ã¢ãã¬ã¹ãhttp://127.0.0.1:15672/ãã§ãã©ã°ã€ã³ãèµ·åãããšã管çããã«ã䜿çšå¯èœã«ãªããŸãïŒããã©ã«ãã®ã¢ã«ãŠã³ãã¯ã²ã¹ã/ã²ã¹ãã§ãïŒã
ãã¹ããã³ããçµã¿ç«ãŠãéãã¢ãã¬ã¹192.168.137.1ã®ããŒãã«ã¡ãã»ãŒãžã³ã°ãµãŒããŒãã€ã³ã¹ããŒã«ããŸããã 管çããã«ãžã®ãªã¢ãŒãæ¥ç¶ãå¿ èŠãªå Žåã¯ãæ°ãããŠãŒã¶ãŒãäœæããŠãé©åãªæš©éãä»äžããå¿ èŠããããŸãã次ã«äŸã瀺ããŸãã
rabbitmqctl add_user siemuser siempass rabbitmqctl set_user_tags siemuser administrator rabbitmqctl set_permissions -p / siemuser ".*" ".*" ".*"
管çããã«ãžã®æ¥ç¶ã確èªããåŸãã¡ãã»ãŒãžãããŒã«ãŒã®ã€ã³ã¹ããŒã«ãšèšå®ãæåãããšèŠãªããŸãã 次ã®æé ã§ã¡ãã»ãŒãžã³ã°ã®æ€èšŒãå®è£ ããŸãã
è¿œå ç¥èã®ãœãŒã¹ïŒ
- Redis Pub / Sub ïŒRedisã¯é«éã§å®å®ããçºè¡/賌èªã¡ãã»ãŒãžã³ã°ã·ã¹ãã ã§ãïŒ ã芧ãã ããã
- Googleãããã³ã«ãããã¡ãŒ
1.4 Visual Studioéçºç°å¢ã®ã€ã³ã¹ããŒã«ãšæ§æ
ç§ãã¡ã®ããŒã ã§ã»ãã¥ãªãã£ã€ãã³ããåŠçããããã®ã«ãŒãã«ã®éçºã¯ãCïŒã§è¡ãããŸããã ãããã£ãŠãäŸã®äžéšã¯CïŒã«ãããå人çãªãã®ãããªããŒããããŸããã ããã«ãèšèªã¯ç解ããã®ã«ååãªã»ã©åçŽã§ããããããžã§ã¯ãã®æè²ç®æšãšäžèŽããŠããŸãã
Visual Studio Community 2017ã䜿çšããŠããŸããã€ã³ã¹ããŒã«ã®éå§ç¹ã¯www.visualstudio.com/en/downloads/ã§ãã æåã®ãœãªã¥ãŒã·ã§ã³ãCïŒã§æ§ç¯ããããŸã§ãã€ã³ã¹ããŒã«ã®æ€èšŒã延æããŸãã
2.å®å šãªWebã¢ããªã±ãŒã·ã§ã³Buggy Webappã®éçº
ããšãã°ããŠãŒã¶ãŒèªèšŒæ©èœãå®è£ ããåçŽãªWebã¢ããªã±ãŒã·ã§ã³ãéçºããŸãã ããŒã¯ã¢ããã®ããããªãºã ã®ã¢ã€ãã¢ã«è§Šçºããã Bootstrap 4ã䜿çšããŠã¢ããªã±ãŒã·ã§ã³ãã¬ã€ã¢ãŠãããŸãã å®è£ ã«ã¯ãPHPèšèªã䜿çšããŸãã
ãã®ãŒWebappã¢ããªã±ãŒã·ã§ã³ã®ãœãŒã¹ã³ãŒãïŒ buggy / admin.php
admin.phpã¹ã¯ãªããã¯ãŠãŒã¶ãŒåãšãã¹ã¯ãŒããèŠæ±ãããããã管çã¢ã«ãŠã³ãã®å¯Ÿå¿ãããã©ã¡ãŒã¿ãŒïŒadmin / adminïŒãšæ¯èŒããŸãã ãŠãŒã¶ãŒåãšãã¹ã¯ãŒããäžèŽããªãå Žåããšã©ãŒã¡ãã»ãŒãžã衚瀺ãããŸãã
ãŠãŒã¶ãŒåãšãã¹ã¯ãŒããæ£ããå ¥åããããšã管çã»ã¯ã·ã§ã³ãžã®ã¢ã¯ã»ã¹ãèš±å¯ãããŸãã
admin.phpãã¡ã€ã«ãé©åãªXAMPPãã«ããã©ã«ããŒã«ä¿åããŸãïŒãã¡ã€ã«ãžã®ãã¹ã¯ãcïŒ\ xampp \ htdocs \ buggy \ admin.phpãã§ãïŒã XAMPPã³ã³ãããŒã«ããã«ããWebãµãŒããŒãèµ·åããŸãããã®åŸããã©ãŠã¶ãŒã§ã¢ãã¬ã¹ãhttp://127.0.0.1/buggy/admin.phpãããWebã¢ããªã±ãŒã·ã§ã³ã«ã¢ã¯ã»ã¹ã§ããããã«ãªããŸãã ãšã©ãŒããªããã°ã次ã«é²ã¿ãŸãã
3. Apache WebãµãŒããŒçšã®ã³ãã¯ã¿ã®éçº
ä¿è·ãããWebã¢ããªã±ãŒã·ã§ã³ãžã®åŒã³åºãã远跡ããçããããŠãŒã¶ãŒã¢ã¯ã·ã§ã³ãæ€åºããæ¹æ³ ã·ã³ãã«ã§ç解ããããæ¹æ³ã¯ãWebãµãŒããŒã®ã¢ã¯ã»ã¹ãã°ïŒã¢ã¯ã»ã¹ãã°ïŒã衚瀺ããããšã§ãã
䜿çšãããç°å¢ã®å Žåãããããã°ã¯access.logãã¡ã€ã«ã«ä¿åãããŸãïŒXAMPPã®è¿äŒŒãã¹ã¯ãcïŒ\ xampp \ apache \ logs \ access.logãã§ãïŒã
ãã©ãŠã¶ã§Webã¢ããªã±ãŒã·ã§ã³ãæ°åããŠã³ããŒãããåŸããã°ãã¡ã€ã«ã®å 容ã確èªããŸãã
127.0.0.1 - - [01/Jan/2099:12:30:39 +0300] "GET /buggy/admin.php?username=hacker&password=123 HTTP/1.1" 200 2040 "http://127.0.0.1/buggy/admin.php" "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.91 Safari/537.36"
èšé²åœ¢åŒã¯ãApache WebãµãŒããŒã®httpd.confæ§æãã¡ã€ã«ã§å®çŸ©ãããŠããŸãïŒXAMPPã®è¿äŒŒãã¹ã¯ãcïŒ\ xampp \ apache \ conf \ httpd.confãã§ãïŒã
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined CustomLog "logs/access.log" combined
ãã©ãŒãããã®è©³çŽ°ãªèª¬æãç解ãããããã³ã°ã¹ããŒã ãæºåããã³ãã¯ã¿ã®éçºã«é²ã¿ãŸãã
ã³ãŒãã®å¹çã®åé¡ã¯ããã¬ãŒã³ããŒã·ã§ã³ã®åçŽãã®åé¡ããããç§ãã¡ã®æ¡ä»¶ã«ãšã£ãŠéèŠã§ã¯ãªãããšãå¿ããªãã§ãã ããã
ã³ãã¯ã¿ãœãŒã¹ã³ãŒãïŒ ApacheConnector
ã¢ã«ãŽãªãºã ã®äžè¬çãªèª¬æïŒ
- æåã®æ®µéã§ã¯ãã¢ã¯ã»ã¹ãã°access.logã«ç®ãåãããã¡ã€ã«ãµã€ãºãèšæ¶ããŸãã
- 次ã«ãå埩éã®äŒæ¢ã䌎ãç¡éã«ãŒãã§ããã¡ã€ã«ãµã€ãºã®å€åãç£èŠããŸãã ãµã€ãºã倧ãããªããšããã¡ã€ã«ããæåŸã«è¿œå ãããè¡ãèªã¿åãããããRabbitMQã¡ãã»ãŒãžãã¥ãŒã«è»¢éããŸããæ°ãããã¡ã€ã«ãµã€ãºãèŠããŠãããŠãã ããã
- access.logãã¡ã€ã«ã¯äžæžããããå ŽåããããŸãã ãã®ãããªå ŽåïŒãã¡ã€ã«ãµã€ãºã®åæžïŒãèæ ®ããŸãã
Jeffrey RichterãšSteve McConnellã®äŸã«åŸã£ãŠãã³ãŒãã®æžåŒèšå®ã®ã¹ã¿ã€ã«ãç¶æããããšããŸãã ãããã®æ¬ã¯äž¡æ¹ãšãé¢ä¿è å šå¡ã«åŒ·ãæšå¥šãããŠããŸãã
ã³ãã¯ã¿ãæ§ç¯ããã«ã¯ã .NET / CïŒRabbitMQã¯ã©ã€ã¢ã³ãã©ã€ãã©ãªããããžã§ã¯ãã«æ¥ç¶ããå¿ èŠããããŸã ã ãããè¡ãæãç°¡åãªæ¹æ³ã¯ã次ã®ã³ãã³ãã䜿çšããŠãVisual Studioéçºç°å¢ã®ããã±ãŒãžãããŒãžã£ãŒã³ã³ãœãŒã«ã«é©åãªNuGetããã±ãŒãžãã€ã³ã¹ããŒã«ããããšã§ãã
Install-Package RabbitMQ.Client -Version 5.0.1
GitHubïŒ github.com/fisher85/AirSIEM ïŒã§å©çšå¯èœãªãœãªã¥ãŒã·ã§ã³ãæ§ç¯ããå Žåãããã±ãŒãžãæåã§ã€ã³ã¹ããŒã«ããå¿ èŠã¯ãããŸãã-ããã±ãŒãžã¯èªåçã«ããŠã³ããŒããããŸãïŒã€ã³ã¿ãŒãããæ¥ç¶ã®ã¿ãå¿ èŠã§ãïŒã
次ã®ã·ããªãªã«åŸã£ãŠãã¡ãã»ãŒãžãããŒã«ãŒã®æ£åžžæ§ã確èªããªãããã³ãã¯ã¿ã®ãã¹ãå®è¡ãå®è¡ããŠã¿ãŸãããã
- ApacheConnectorã¢ããªã±ãŒã·ã§ã³ãèµ·åããŸãã ã³ãã¯ã¿ã¯ãaccess.logãã¡ã€ã«ã®ãµã€ãºã®å€æŽã®è¿œè·¡ãéå§ããŸãã
- ãã©ãŠã¶ãŒã§ã¯ãBuggy Webapp Webã¢ããªã±ãŒã·ã§ã³ããŒãžãæ°åæŽæ°ããŸããããã©ãŠã¶ãŒã«å¯Ÿå¿ããè¡ã¯WebãµãŒããŒã«ã¢ã¯ã»ã¹ããWebãµãŒããŒã¢ã¯ã»ã¹ãã°ã«è¿œå ãããŸãã
- ApacheConnectorã¯ãã¡ã€ã«ãµã€ãºã®å€æŽãæ€åºããæåŸã®è¡ãRabbitMQã¡ãã»ãŒãžãããŒã«ãŒãã¥ãŒã«éä¿¡ããŸãã
- ãã¹ãŠãæ£ããæ§æãããŠããå ŽåãRabbitMQ管çããã«ïŒãã®äŸã®ã¢ãã¬ã¹ã¯ãhttp://192.168.137.1:15672/ãã§ãïŒã§ããŒã以å€ã®è² è·ã®è¿œå ãããAirSIEM_ConnectorQueueãã¥ãŒãèŠã€ãããŸãã
ãã®æ¹æ³ã§ãã¹ãã¹ã¯ãªãããå®äºãããã次ã®æé ã«é²ã¿ãŸãã ãã以å€ã®å Žåã¯ãçºçãããã¹ãŠã®ãšã©ãŒãæé€ããå¿ èŠããããŸãã
RabbitMQèšå®ã®ãã©ãã«ã·ã¥ãŒãã£ã³ã°ã®é©åºŠãªçµéšïŒ
- æåã«è©Šãããšã¯ããã¡ã€ã¢ãŠã©ãŒã«ããŠã€ã«ã¹å¯Ÿçããããã·ãªã©ãç¡å¹ã«ããããšã§ããããã圹ç«ã€å Žåã¯ãããããæ£ããæå¹ã«ããŠèšå®ããŸãã
- çžäºäœçšããã³ã³ããŒãã³ãéã§Erlangããã·ã¥äžäžèŽãšã©ãŒãçºçããå Žåãã¯ãŒã¯ã¹ããŒã·ã§ã³ã«ã€ã³ã¹ããŒã«ãããŠããErlangããŒãžã§ã³ã1ã€ã ãæ®ããŠã¿ãŠãã ããã
ã³ãã¯ã¿æäœã¢ã«ãŽãªãºã ã«é¢ãã泚æïŒ
- ã€ã³ã¹ãã¬ãŒã·ã§ã³ã®æºïŒJeffrey Richter ã®æ¬ã .NET 4.5 Programming ïŒç¬¬27ç« ãAsynchronous Computing OperationsïŒããã³Log Monitorãããžã§ã¯ãã®äŸ ã
- FileSystemWatcherã䜿çšããªãã®ã¯ãªãã§ããïŒ 1ã€ã®ã±ãŒã¹ã§ã¯ã100äžçªç®ã®ã¯ã©ã¹ããã¡ã€ã«ã®å€æŽãæ£ãã远跡ããŸãã ã ãã®ã±ãŒã¹ã¯ãããç¥ãããæ³åŸã«åŸã£ãŠãå®éšäžã«èŠ³å¯ãããŸããã
4.çžé¢ã«ãŒãã«ïŒã€ãã³ããã³ãã©ãŒïŒã®éçº
ãã®ããããã®æ®µéã§ãApache WebãµãŒããŒãšãã1ã€ã®ãœãŒã¹ããã»ãã¥ãªãã£ã€ãã³ããåéããããã®ãµãã·ã¹ãã ãæ§æããŸããã ApacheConnectorã³ãã¯ã¿ã¯ãaccess.logããããã°ã®å€æŽãç£èŠããæåŸã®è¡ãRabbitMQã¡ãã»ãŒãžãããŒã«ãŒãã¥ãŒã«éä¿¡ããŸãã
次ã®æ®µéã¯ãçžé¢ã«ãŒãã«ïŒã€ãã³ããã³ãã©ãŒïŒã®éçºã§ãã ãã ããæåã«ãåè¿°ã®ããã«ãMongoDBããŒã¿ãŠã§ã¢ããŠã¹ã§ã®æžã蟌ã¿ããã³èªã¿åãã®é床ãè©äŸ¡ããããšãææ¡ããŸãã ãã®ã³ã³ããŒãã³ããéçºäžã®ã·ã¹ãã ã®ããã«ããã¯ã«ãªããçç£æ§ã®äžéã決ãŸããšäºæ³ããŠããŸãã
4.1 MongoDBããŒã¿ãŠã§ã¢ããŠã¹ã®ããã©ãŒãã³ã¹è©äŸ¡
ç°¡åãªæ¹æ³ã§ããã©ãŒãã³ã¹ãã¹ããå®è¡ããŸãããŸãããªããžããªãžã®é 次æžã蟌ã¿ïŒåäžã®ããã¥ã¡ã³ããšããã¥ã¡ã³ãããã±ãŒãžïŒã®é床ãæšå®ãã次ã«ã³ã¬ã¯ã·ã§ã³ããã®ããã¥ã¡ã³ãã®ã©ã³ãã èªã¿åãã®é床ãæšå®ããŸãã
ã¢ããªã±ãŒã·ã§ã³ã®ãœãŒã¹ã³ãŒãïŒ MongoBenchmark / Program.cs
MongoDBã䜿çšããã«ã¯ãMongoDB çšã®.NETãã©ã€ããŒããããžã§ã¯ãã«æ¥ç¶ããå¿ èŠããããŸãã ãããè¡ãæãç°¡åãªæ¹æ³ã¯ã次ã®ã³ãã³ãã䜿çšããŠãããã±ãŒãžãããŒãžã£ãŒã³ã³ãœãŒã«ã«é©åãªNuGetããã±ãŒãžãã€ã³ã¹ããŒã«ããããšã§ãã
Install-Package MongoDB.Driver -Version 2.5.0
ã¢ããªã±ãŒã·ã§ã³ãéå§ããåŸããã³ãããŒã¯ã®çµæãè©äŸ¡ããŸãã
InsertMany by 1: 20000 ops in 13.52 seconds (1479.15 ops/sec) => 1479.15 docs/sec InsertMany by 2: 10000 ops in 7.11 seconds (1406.24 ops/sec) => 2812.48 docs/sec InsertMany by 5: 4000 ops in 3.20 seconds (1250.93 ops/sec) => 6254.66 docs/sec InsertMany by 10: 2000 ops in 2.08 seconds (960.88 ops/sec) => 9608.78 docs/sec InsertMany by 50: 400 ops in 1.15 seconds (347.68 ops/sec) => 17384.15 docs/sec InsertMany by 100: 200 ops in 1.06 seconds (188.32 ops/sec) => 18832.26 docs/sec InsertMany by 250: 80 ops in 0.95 seconds (83.87 ops/sec) => 20968.05 docs/sec InsertMany by 500: 40 ops in 0.92 seconds (43.67 ops/sec) => 21835.64 docs/sec InsertMany by 1000: 20 ops in 0.93 seconds (21.39 ops/sec) => 21391.22 docs/sec InsertMany by 5000: 4 ops in 1.00 seconds (3.99 ops/sec) => 19936.32 docs/sec InsertMany by 10000: 2 ops in 1.01 seconds (1.97 ops/sec) => 19730.96 docs/sec InsertMany by 20000: 1 ops in 1.01 seconds (0.99 ops/sec) => 19832.80 docs/sec Find: 10000 ops in 6.17 seconds (1620.21 ops/sec)
é åžã®ããã³ããã¯ã1ã€ã®ããã±ãŒãžïŒãããã¯ïŒã§500ã€ãã³ããéä¿¡ããå Žåã«åœãŠã¯ãŸããŸãããé 次èšé²é床ã¯1ç§ããã21835ããã¥ã¡ã³ãã§ãã ã³ã¬ã¯ã·ã§ã³ããã®ã©ã³ãã èªã¿åãã®é床ã¯ã1ç§ããã1620ããã¥ã¡ã³ãã§ãã ãã¹ããã³ãããéããããæ§æã®ããœã³ã³ã䜿çšããŠç·šæãããŠãããšããäºå®ãèæ ®ãããšãçµæã«éåžžã«æºè¶³ããŠããŸãã å®éšçã«ååŸããæžã蟌ã¿ããã³èªã¿åãé床ã®å€ã«ãããMongoDBããŒã¿ãŠã§ã¢ããŠã¹ã¯äŸã§èšç»ãããè² è·ãåŠçã§ãããšèããŠããŸãã
泚ïŒ
- éçšæéã®ã枬å®ãã®åé¡ã«é¢ããåºãåŒçšããããœãŒã¹ïŒStack Overflow ã§ã®Environment.TickCountãšDateTime.Nowã®è°è« ã
- åã_idã®2ã€ã®ããã¥ã¡ã³ããã³ã¬ã¯ã·ã§ã³ã«æ¿å
¥ããããšãããšãããããã®èª¬æãå«ãäŸå€MongoDB.Driver.MongoWriteExceptionãšããŠè¿·æã«ãªããŸãã
E11000 duplicate key error collection: test.events index: _id_ dup key: { : ObjectId('5a2a2b386a49df197845deaa') }
4.2çžé¢ã«ãŒã«ã®ã»ããã®åœ¢æ
ãããŠããäžã€ã®åŸéã 次ã®ã»ãã¥ãªãã£ã€ãã³ããçºçãããšãçžé¢ã«ãŒãã«ã¯ããªããŒããããåŠçã«ãŒã«ïŒåã ã®ã€ãã³ãéã®äŸåé¢ä¿ãèå¥ããã«ãŒã«ãçžé¢ã«ãŒã«ïŒãé©çšããããšããŸãã ã«ãŒã«ã®ãã¹ãã»ãããäœæããŸããããã¯ãåŸã®äŸã§äœ¿çšããŸãã
ã«ãŒã«ã説æããããã«ãOSSECãããžã§ã¯ãã§ææ¡ãããçžé¢ã«ãŒã«æ§æãæå°éã®å€æŽã§äœ¿çšããŸãã ãã®äŸã§ã¯ãä¿è·ãããWebã¢ããªã±ãŒã·ã§ã³ã®åçŽåãããããã«ãŒããã©ãŒã¹ãæ»æã·ããªãªãã·ãã¥ã¬ãŒãããŸããã®äŸã§ã¯ã察å¿ããtest_webapp_rules.xmlã«ãŒã«ã»ãããã³ã³ãã€ã«ããŸã ã
<group name="web-app"> <rule id="100000" level="0"> <match>/buggy/</match> <description>Access to BUGGY webapp</description> </rule> <rule id="100001" level="0"> <if_sid>100000</if_sid> <match>password</match> <description>Attempt to login to BUGGY webapp</description> </rule> <rule id="100002" level="1" frequency="3" timeframe="5"> <if_matched_sid>100001</if_matched_sid> <same_source_ip/> <description>Brute force trying to login to BUGGY webapp</description> </rule> </group>
ã«ãŒã«ã»ããã®åœ¢åŒã¯ãXML圢åŒãšã¯ãããã«ç°ãªããŸãã ããšãã°ããã¡ã€ã«å ã«è€æ°ã®ã«ãŒãèŠçŽ ãååšããããšã¯èš±å¯ãããŠããŸãã ãã®ãããªããã¥ã¡ã³ãã¯æŽåœ¢åŒã® XMLããã¥ã¡ã³ãã§ã¯ãããŸãã; System.XMLåå空éã«ãã£ãŠæäŸãããããŒã«ã䜿çšããŠãã¡ã€ã«ã解æãããšãããã®æ©èœãèæ ®ããŸãã
次ã«ãåã«ãŒã«ãåå¥ã«æ€èšããæ§æã®ç¹åŸŽãç°¡åã«èª¬æããŸãã æåã®ã«ãŒã«ïŒ
<rule id="100000" level="0"> <match>/buggy/</match> <description>Access to BUGGY webapp</description> </rule>
<rule>èŠçŽ ã¯ã«ãŒã«ãèšè¿°ããŸãã
<rule>èŠçŽ ã®idå±æ§ã¯ãã«ãŒã«ã®èå¥åãå®çŸ©ããŸãã ãèäœæš©ãã«ãŒã«ã®OSSECãããžã§ã¯ããæšå¥šããç¯å²ããèå¥åãéžæããŸãïŒ> = 100000ã
<rule>èŠçŽ ã®levelå±æ§ã¯ãã«ãŒã«ã®éèŠåºŠã®ã¬ãã«ãå®çŸ©ããŸãã æå°å€ã¯0ïŒéåžžãã»ãã¥ãªãã£ç®¡çã³ã³ãœãŒã«ã«ã¯è¡šç€ºãããŸããïŒãæ倧å€ã¯16ã§ãã
<match>èŠçŽ ã¯ãåŠçãããã¡ãã»ãŒãžã®æååã§æ€çŽ¢ãããµãã¹ããªã³ã°ãèšå®ããŸãã
<description>èŠçŽ ã¯ãã»ãã¥ãªãã£ç®¡çè ãžã®ã¢ã©ãŒããšããŠè¡šç€ºãããã«ãŒã«ã®èª¬æãå®çŸ©ããŸãã
ãã®ã«ãŒã«ã®ããªã¬ãŒã®ã±ãŒã¹ã¯åçŽã«ãã§ãã¯ãããŸã-<match>èŠçŽ ã§æå®ããããµãã¹ããªã³ã°ãåŠçäžã®ã¡ãã»ãŒãžã®è¡ã§èŠã€ãã£ãå Žåãçžé¢ã³ã¢ã¯ã»ãã¥ãªãã£ã¢ã©ãŒããçæããŸãã
ã«ãŒã«100000ã®ããžãã¯ã¯æ¬¡ã®ãšããã§ããä¿è·ãããBuggy Webapp Webã¢ããªã±ãŒã·ã§ã³ãžã®ãã¹ãŠã®ã¢ã¯ã»ã¹è©Šè¡ãã»ãã¥ãªãã£ã·ã¹ãã ã«éç¥ããŸãã ãããè¡ãããã«ãWebãµãŒããŒãžã®ãã¹ãŠã®åŒã³åºãã§éšåæååã/ buggy /ãã远跡ãããŸãã 100000ã«ãŒã«ã®éèŠåºŠã¬ãã«ã¯ãŒãã§ããç£èŠå¯Ÿè±¡ã®åŒã³åºãã«éèŠæ§ã¯ãããŸãããã«ãŒã«ããªã¬ãŒã䜿çšããŠãããè€éãªã«ãŒã«ãã§ãŒã³ãæ§ç¯ããŸãã
å®éã100,000ã«ãŒã«ã¯ã»ãã¥ãªãã£ã€ãã³ãéã®äŸåé¢ä¿ãæ€åºããããçžé¢ããæããã«ããªãããšã«æ³šæããŠãã ããã ãã®æå³ã§ããã®ãããªã¬ã³ãŒããçžé¢ã«ãŒã«ã§ã¯ãªãåŠçã«ãŒã«ãšåŒã¶æ¹ãæ£ããã§ãã
2çªç®ã®ã«ãŒã«ïŒ
<rule id="100001" level="0"> <if_sid>100000</if_sid> <match>password</match> <description>Attempt to login to BUGGY webapp</description> </rule>
ã«ãŒã«100001ã®èª¬æã«ã¯ãã«ãŒã«100000ã®èå¥åãæã€æ°ããèŠçŽ <if_sid>ããããããã¯è¿œå ã®ããªã¬ãŒæ¡ä»¶ã課ããŸã-ããããåã«ã«ãŒã«100000ãæ©èœããå¿ èŠããããŸãã
ã«ãŒã«100001ã®ããžãã¯ïŒåŠçäžã®è¡ãä¿è·ãããWebã¢ããªã±ãŒã·ã§ã³ãžã®ã¢ã¯ã»ã¹ã«é¢é£ããå ŽåïŒã«ãŒã«100000ã¯ä»¥åã«æ©èœããŠããŸããïŒãåæã«WebãµãŒããŒãžã®åŒã³åºãã§ãµãã¹ããªã³ã°ããã¹ã¯ãŒãããèŠã€ãããŸããïŒãã¹ã¯ãŒãã®ãŠãŒã¶ãŒåããã³ãã¹ã¯ãŒãå ¥åãã©ãŒã ãžã®è»¢éã瀺ãå¯èœæ§ããããŸãïŒ ãã»ãã¥ãªãã£ã·ã¹ãã ã«ç®¡çã¢ã¯ã»ã¹ãååŸããè©Šã¿ãéç¥ããŸã-ãBUGGY webappãžã®ãã°ã€ã³è©Šè¡ãã
ã«ãŒã«100001ã§ã¯ãåã ã®ã»ãã¥ãªãã£ã€ãã³ãéã®äŸåé¢ä¿ãèå¥ã§ããçžé¢ã«ãŒã«ãšæ£ããåŒã¶ããšãã§ããŸãã
3çªç®ã®ã«ãŒã«ïŒ
<rule id="100002" level="1" frequency="3" timeframe="5"> <if_matched_sid>100001</if_matched_sid> <same_source_ip/> <description>Brute force trying to login to BUGGY webapp</description> </rule>
ã«ãŒã«100002ã®èª¬æã«ã¯ãã«ãŒã«100001ã®èå¥åãæã€æ°ããèŠçŽ <if_matched_sid>ããããè¿œå ã®ããªã¬ãŒæ¡ä»¶ã課ããŸã-ã«ãŒã«100001ãæåŸã®5ç§ïŒæéæ å ã§<rule>èŠçŽ ã®å±æ§é »åºŠ= "3"ïŒå°ãªããšã3ååäœããå¿ èŠããããŸã= "5"ïŒã
空ã®<same_source_ip />èŠçŽ ã¯ã<if_matched_sid>èŠçŽ ã§æå®ãããã«ãŒã«ã®å¿çãã«ãŠã³ããããšãã«ãäžèŽãããœãŒã¹IPã¢ãã¬ã¹ãæã€ã€ãã³ãã®ã¿ãèæ ®ãããããšã瀺ããŸãã
ã«ãŒã«100002ã®ããžãã¯ïŒä¿è·ãããWebã¢ããªã±ãŒã·ã§ã³ãžã®ã¢ã¯ã»ã¹ãååŸããããã«åãã¢ãã¬ã¹ããæåŸã®5ç§éã«å€ãã®è©Šè¡ïŒ3å以äžïŒãè¡ãããå Žåãã¢ã¯ã»ã¹ãã¹ã¯ãŒããéžæããè©Šã¿ã«ã€ããŠãããé«ãéèŠåºŠã¬ãã«= 1ã®ã¢ã©ãŒããçæããŸã-ãBUGGY webappã«ãã°ã€ã³ããããšãããã«ãŒããã©ãŒã¹ãã
æ€èšäžã®äŸã®çžé¢ã«ãŒã«ã®ã»ããã圢æãããŠãããã€ãã³ããã³ãã©ãŒã®å³æå®è£ ã«é²ã¿ãŸãã äŸã®æåŸã§ãçžé¢ã³ã¢ã®æ®µéçãªãããã°ãå®è¡ããçžé¢ã«ãŒã«ãçä¿¡ã»ãã¥ãªãã£ã€ãã³ãã«ã©ã®ããã«é©çšãããããã©ã®ã¢ã©ãŒããçæããããã確èªããŸãã
4.3çžé¢ã³ã¢ã®å®è£
çžé¢ã³ã¢ã®ãœãããŠã§ã¢å®è£ ã¯ããã®äŸã®æãè€éã§èšå€§ãªéšåã§ãããéçºãããSIEMã·ã¹ãã ã®ã»ãã¥ãªãã£ã€ãã³ããåŠçããããžãã¯å šäœãæ¬è³ªçã«å®çŸ©ããŸãã
äžè¬çã«ãçžé¢ã³ã¢ã®ããžãã¯ã¯æ¬¡ã®ãšããã§ãã
- çžé¢ã³ã¢ã¯ãAirSIEM_ConnectorQueueã¡ãã»ãŒãžãã¥ãŒããªãã¹ã³ããŸãã
- 次ã®ã¡ãã»ãŒãžïŒã€ãã³ãïŒãå°çãããšãã«ãŒãã«ã¯ããªããŒããããã€ãã³ãåŠçã«ãŒã«ïŒçžé¢ã«ãŒã«ïŒãããã«é©çšããããšããŸãã
- ã«ãŒã«ã®1ã€ãåä¿¡ããã»ãã¥ãªãã£ã€ãã³ãã«é©çšãããå Žåãã«ãŒãã«ã¯å¿ èŠã«å¿ããŠã»ãã¥ãªãã£ã€ã³ã·ãã³ããçæããMongoDBããŒã¿ãŠã§ã¢ããŠã¹ã®ã¢ã©ãŒãã³ã¬ã¯ã·ã§ã³ã«ä¿åããŸãã
ãœãŒã¹ã³ãŒãïŒ AirSIEM
å®è£ ã¯éåžžã«èšå€§ã«ãªãããããããã°ã®äŸ¿å®äžã NLogãã®ã³ã°ã·ã¹ãã ããããžã§ã¯ãã«æ¥ç¶ããŸãã ãããè¡ãæãç°¡åãªæ¹æ³ã¯ã次ã®ã³ãã³ãã䜿çšããŠãããã±ãŒãžãããŒãžã£ãŒã³ã³ãœãŒã«ã«é©åãªNuGetããã±ãŒãžãã€ã³ã¹ããŒã«ããããšã§ãã
Install-Package NLog -Version 4.4.12
ããã«ãã¡ãã»ãŒãžãããŒã«ãŒãšé£æºããã«ã¯ãRabbitMQ.Clientããã±ãŒãžãæ¥ç¶ããããŒã¿ãŠã§ã¢ããŠã¹ã§ããMongoDB.Driverããã±ãŒãžãšããåãããå¿ èŠããããŸãã
Install-Package RabbitMQ.Client -Version 5.0.1 Install-Package MongoDB.Driver -Version 2.5.0
NLogãã¬ãŒã®æ§ææé ã«åŸã£ãŠ ãnlog.configæ§æãã¡ã€ã«ïŒ ãµã³ãã«ã³ã³ãã³ã ïŒããããžã§ã¯ãã«è¿œå ãïŒ[ãããžã§ã¯ã]ã¡ãã¥ãŒ> [æ¢åé ç®ã®è¿œå ]ïŒããããåºåãã£ã¬ã¯ããªã«ã³ããŒããå¿ èŠãããããšã瀺ããŸãïŒãœãªã¥ãŒã·ã§ã³ãšã¯ã¹ãããŒã©ãŒãŠã£ã³ããŠã«ç§»å> nlog.configãã¡ã€ã«ãéžæ>ã«ç§»åïŒ [ããããã£]ãŠã£ã³ããŠã§ã[åºåãã£ã¬ã¯ããªã«ã³ããŒ]ããããã£ã§[åžžã«ã³ããŒ]ãéžæããŸãã
ãããžã§ã¯ãã®ãœãŒã¹ã³ãŒããèªã¿èŸŒã¿ããœãªã¥ãŒã·ã§ã³ãåéããŸãã éå§ããåã«ãæ§æãã¡ã€ã«AirSIEM.exe.configã®èšå®ã確èªããŸããããã¯ãã«ãŒã«ãžã®ãã¹ãšãã¡ãã»ãŒãžãããŒã«ãŒãšããŒã¿ã¹ãã¢ãžã®æ¥ç¶æååãæ£ããæå®ãããŠããããšã§ãã
çžé¢ã«ãŒãã«ã®æ£ããåäœãæ€èšŒããã«ã¯ãæ»æã¹ã¯ãªããïŒé¢é£ã«ãŒã«ã§æå®ïŒãæ€åºãããå Žåãã«ãŒãã«ãã»ãã¥ãªãã£ã€ã³ã·ãã³ããçæããMongoDBããŒã¿ãŠã§ã¢ããŠã¹ã®ã¢ã©ãŒãã³ã¬ã¯ã·ã§ã³ã«ä¿åããããšã確èªããå¿ èŠããããŸãã ãã¹ãŠã®ã·ã¹ãã ã³ã³ããŒãã³ãã®éçºåŸãæçµæ®µéã§æ€èšŒãå®è¡ããããšãææ¡ããŸãã
5.ã»ãã¥ãªãã£ç®¡çã³ã³ãœãŒã«ã®éçº
ã»ãã¥ãªãã£ç®¡çè ã®äŸ¿å®ã®ããã«ãé©åãªãœãªã¥ãŒã·ã§ã³ã§ãã管çã³ã³ãœãŒã«ãæäŸããŸãã ã³ã³ãœãŒã«ã®æ©èœã¯ãçæãããã»ãã¥ãªãã£ã€ã³ã·ãã³ãã®è¡šç€ºã«éå®ãããå®è£ ãªãã·ã§ã³ã¯PHP Webã¢ããªã±ãŒã·ã§ã³ã§ãã
ãœãŒã¹ã³ãŒãïŒ console / index.php
PHPã³ãŒããMongoDBãšå¯Ÿè©±ããã«ã¯ã2ã€ã®ã¢ã¯ã·ã§ã³ãå®è¡ããå¿ èŠããããŸããé©åãªæ¡åŒµæ©èœãPHPã€ã³ã¿ãŒããªã¿ãŒã«æ¥ç¶ãã察å¿ããã©ã€ãã©ãªãWebã¢ããªã±ãŒã·ã§ã³ã«æ¥ç¶ããŸãã
5.1 php_mongodb.dllæ¡åŒµæ©èœãWebãµãŒããŒã«æ¥ç¶ãã
XAMPP for Windowsã¢ã»ã³ããªãWebãµãŒããŒãšããŠäœ¿çšããããšãæãåºããŠãã ããã ããã©ã«ãã§ã¯ãPHPã€ã³ã¿ãŒããªã¿ãŒã¯MongoDBã¹ãã¬ãŒãžã®ååšãèªèããŸãã; Windowsãã©ã€ããŒã«MongoDB PHPãã©ã€ããŒãã€ã³ã¹ããŒã«ããããšã§ãããä¿®æ£ã§ããŸãã
ã±ãŒã¹ã®ã€ã³ã¹ããŒã«æé ãéããŸã-Windowsã§ã®MongoDB PHPãã©ã€ããŒã®ã€ã³ã¹ããŒã« ã
é©åãªããŒãžã§ã³ã®php_mongodb.dllãã©ã€ããŒãæ¢ããŠãµã€ãpecl.php.net/package/mongodbã«ã¢ã¯ã»ã¹ããŸãã ææ°ã®å®å®ããŒãžã§ã³ïŒ1.4.0ïŒãWindows OSãPHPããŒãžã§ã³7.1ãã¹ã¬ããã»ãŒããx86ãéžæããŸãã éžæããã¢ãŒã«ã€ãã¯php_mongodb-1.4.0-7.1-ts-vc14-x86.zipã§ãç®çã®ãã¡ã€ã«php_mongodb.dllã¯ã¢ãŒã«ã€ãã«ãããŸãã
php_mongodb.dllãã©ã€ããŒãPHPæ¡åŒµãã©ã«ããŒã«ã³ããŒããŸãã ããã©ã«ãã¯ãcïŒ\ xampp \ php \ ext \ãã§ãã ãextension = php_mongodb.dllããšããè¡ããæ¡åŒµæ©èœãPHPèšå®ãã¡ã€ã«ã«æ¥ç¶ããããã®ã»ã¯ã·ã§ã³ã«è¿œå ããŸãïŒããã©ã«ãã§ã¯ããcïŒ\ xampp \ php \ php.iniãïŒ
Apacheãåèµ·åããŸãïŒæãç°¡åãªæ¹æ³ã¯XAMPPããã«ããïŒããã®åŸã®æé ã§ããUncaught ErrorïŒClass 'MongoDB \ Driver \ Manager' not foundããªã©ã®ãšã©ãŒã®è§£æã«æéããããããªãããã«ããŸãã
5.2 MongoDB PHPã©ã€ãã©ãªWebã¢ããªã±ãŒã·ã§ã³ãžã®æ¥ç¶
次ã«ãMongoDB PHPã©ã€ãã©ãªã管çè ã³ã³ãœãŒã«ãããžã§ã¯ãã«æ¥ç¶ããå¿ èŠããããŸãã
ç§ãã¡ã¯å ¬åŒææžãç 究ããŠããŸã ã ãã®ã¬ã€ãã§ã¯ã Composerã䜿çšããæãç°¡åãªæ¹æ³ãæšå¥šããŠããŸãã
Composerãã€ã³ã¹ããŒã«ããŠã䜿çšäŸã«æ £ããŠãã ããã
å°æ¥ã®ãããžã§ã¯ãçšã®ãã©ã«ããŒïŒããšãã°ããcïŒ\ xampp \ htdocs \ console \ãïŒãäœæãããã©ã«ããŒå ã®mongodbããã±ãŒãžã®ã€ã³ã¹ããŒã«ã³ãã³ããå®è¡ããŸãã
composer require mongodb/mongodb
ã³ãã³ãã®çµæïŒ
Composerã¯å¿ èŠãªãã¡ã€ã«ãããŠã³ããŒããããããžã§ã¯ãã«è¿œå ããŸãããããžã§ã¯ãã§MongoDB PHPã©ã€ãã©ãªã®æ©èœã䜿çšããã«ã¯ãã³ãŒãã«1è¡è¿œå ããå¿ èŠããããŸãã
require_once __DIR__ . "/vendor/autoload.php";
ã¢ããªã±ãŒã·ã§ã³ã³ãŒãããã¡ã€ã«ãcïŒ\ xampp \ htdocs \ console \ index.phpãã«ä¿åãããã©ãŠã¶ã§éããŸãã
ãã¹ãå®è¡äžã®çžé¢ã«ãŒãã«ãã»ãã¥ãªãã£ã€ã³ã·ãã³ããçæããMongoDBããŒã¿ãŠã§ã¢ããŠã¹ã®ã¢ã©ãŒãã³ã¬ã¯ã·ã§ã³ã«å¯Ÿå¿ããããã¥ã¡ã³ããä¿åããå Žåãæåã®å®è¡æã«ããŒãã«ã空ã«ãªããªãå ŽåããããŸãã
ãšã©ãŒããªããã°ãæçµæ®µéã«é²ã¿ãŸãã
è¿œå ç¥èã®ãœãŒã¹ïŒ
- MongoDB PHPãã©ã€ããŒ
- MongoDB PHPã©ã€ãã©ãª
- MongoDB PHPã©ã€ãã©ãªãã€ã³ã¹ããŒã«ãã
6. SIEMã·ã¹ãã ã«ãã£ãŠéçºãããæ©èœãã§ãã¯
ããã§ãSIEMã·ã¹ãã ã®éçºãå®äºããŸãããæçµæ®µéã§ã¯ãçžé¢ã«ãŒãã«ã®æ®µéçãªãããã°ãå®è¡ãããœãªã¥ãŒã·ã§ã³å šäœãæ£ããæ©èœããããšã確èªããå¿ èŠããããŸãã
éçºäžã®ã·ã¹ãã ã®äž»ãªã¿ã¹ã¯ãæãåºããŠãã ãã-ä¿è·ãããWebã¢ããªã±ãŒã·ã§ã³ã«é¢é£ããŠããã«ãŒããã©ãŒã¹ãæ»æã·ããªãªãå®è£ ããè©Šã¿ãã»ãã¥ãªãã£ç®¡çè ã«éç¥ããŸãã
äžè¬çãªæçµãã¹ãã·ããªãªãæ€èšããŸãã
- æ»æè ã¯ãä¿è·ãããBuggy Webapp Webã¢ããªã±ãŒã·ã§ã³ã®admin.phpããŒãžãéãã管çè ã®ãŠãŒã¶ãŒåãšãã¹ã¯ãŒããèŠã€ããããšããŸãã
- â «admin/admin» â ( â ).
- SIEM , .
ããã«ããã¹ãã·ããªãªãå®è¡ããSIEMã·ã¹ãã ã®äžé£ã®ã¢ã¯ã·ã§ã³ãèæ ®ããããšãææ¡ãããŠããŸãã
ã¹ããã1.æºåã
å®éšã®ãçŽåºŠãã«ã€ããŠã¯ãããŒã¿ãŠã§ã¢ããŠã¹ãã¯ãªã¢ããŸãããããè¡ãã«ã¯ãRobomongoã䜿çšããŠMongoDBã«æ¥ç¶ããAirSIEMããŒã¿ããŒã¹ãåé€ããŸãïŒååšããå ŽåïŒã
ApacheConnectorãèµ·åããŸãã
ã¹ããã2.æ»æè ã®ã¢ã¯ã·ã§ã³ã®ã¢ããªã³ã°ã
ãã©ãŠã¶ã®ã¢ãã¬ã¹ãhttp://127.0.0.1/buggy/admin.phpãã§Buggy Webapp Webã¢ããªã±ãŒã·ã§ã³ãéããŸãã 5ç§ä»¥å ã«ã管çè ã®ãŠãŒã¶ãŒåãšãã¹ã¯ãŒãã®éžæã3åè©Šã¿ãŸãã
æé 3.ã³ãã¯ã¿ã確èªããŸãã
ApacheConnectorã¢ããªã±ãŒã·ã§ã³ãŠã£ã³ããŠã§ãWebãµãŒããŒã®ã¢ã¯ã»ã¹ãã°ãèªã¿åããç»é²ãããã»ãã¥ãªãã£ã€ãã³ããã¡ãã»ãŒãžãããŒã«ãŒãã¥ãŒã«è»¢éããããšã確èªããŸãã
RabbitMQã¡ãã»ãŒãžãããŒã«ãŒã®ç®¡çããã«ïŒãhttp://127.0.0.1:15672/ãïŒã§ãloadïŒã¡ãã»ãŒãžã®ååšãAirSIEM_ConnectorQueueãã¥ãŒã«è¡šç€ºããå¿ èŠããããŸãã
ã¹ããã4.çžé¢ã«ãŒãã«ã®åäœã確èªããŸãã
次ã«ãçžé¢ã³ã¢ã¯åŠçããã»ã¹ã«å ¥ããŸããAirSIEMã¢ããªã±ãŒã·ã§ã³ãèµ·åããŸããNLogãã¬ãŒã®Logs / log.txtãã°ãã¡ã€ã«ïŒã¢ã»ã³ããªåºåãã£ã¬ã¯ããªãžã®çžå¯Ÿãã¹ïŒã«ãã£ãŠæ£ããæäœãè©äŸ¡ããŸãã
æºå段éã§ã¯ãçžé¢ã«ãŒã«ãããŒããããŸãã
----- AirSIEM start ----- ParseRuleDir start ParseRulesFromXML handles file: test_webapp_rules.xml 3 rules processed: 100000, 100001, 100002 ParseRuleDir: total 1 files processed ParseRuleDir: total 3 rules processed ParseRuleDir stop
ã«ãŒã«ãããŒããããšãã«ãŒã«ãã§ãŒã³ãæ§ç¯ãããŸãã
CheckDependencies start Dependencies: 100000 children => 100001 100001 children => 100002 100002 children => CheckDependencies stop
次ã«ããã¥ãŒãäœæããã<if_matched_sid>èŠçŽ ã§èå¥åãèŠã€ãã£ãã«ãŒã«ãããªã¬ãŒãããåæ°ãã«ãŠã³ãããŸãããã¹ãã»ããã«ã¯3ã€ã®ã«ãŒã«ãå«ãŸãããã®ãã¡1ã€ã®ã«ãŒã«100002ã®ã¿ãå¥ã®ã«ãŒã«ã®ããªã¬ãŒãã«ãŠã³ãããŸã-èå¥å100001ãèå¥å100001ã®ãã¥ãŒãäœæãããŸãã
GenerateQueueList start Created 1 queues: [100001, FireQueue object => ID=[100001], count=[0], timeFrame=[5 sec], maxSize=[1000]] GenerateQueueList stop
次ã«ãããµãã¹ã¯ã©ã€ãããåæåãããŠèµ·åãããAirSIEM_ConnectorQueueãã¥ãŒãããªãã¹ã³ãããåä¿¡ããã¡ãã»ãŒãžããã³ãã©ãŒã«æž¡ããŸãã
RabbitMQConsumer init RabbitMQConsumer start
æ»æè ããŠãŒã¶ãŒåãšãã¹ã¯ãŒããååŸããããšããæåã®è©Šã¿ã®åŸãApacheConnectorã³ãã¯ã¿ãŒã¯WebãµãŒããŒã®ã¢ã¯ã»ã¹ãã°ãã°ãã次ã®è¡ãRabbitMQãã¥ãŒã«æž¡ããããµãã¹ã¯ã©ã€ããŒãã¯ã¡ãã»ãŒãžãåä¿¡ããŠââåŠçã®ããã«éä¿¡ããŸãã
RMQ message received: ApacheConnector:127.0.0.1 - - [01/Jan/2099:16:24:57 +0300] "GET /buggy/admin.php?username=1&password...
ã¡ãã»ãŒãžããæ£èŠåãããã»ãã¥ãªãã£ã€ãã³ãïŒSecurityEventã¯ã©ã¹ã®ã€ã³ã¹ã¿ã³ã¹ïŒãçæãããŸãã
SecurityEvent object => timestamp=[16:24:57], source=[127.0.0.1], destination=[], message=[GET /buggy/admin.php?username=1&password=1 HTTP/1.1]
次ã«ãçžé¢ã«ãŒãã«ã¯ããŒããããã«ãŒã«ãåŠçäžã®ã€ãã³ãã«é©çšããŸããæåã®ããã¹ãã§ã¯ãããªã¬ãŒãä»ã®ã«ãŒã«ã«äŸåããªãã«ãŒã«ã®ã¿ã衚瀺ãããŸãã
Check rule 100000 - Access to BUGGY webapp Check <match>/buggy/</match> Rule 100000 matched ALERT: LEVEL 0 - Access to BUGGY webapp
ã«ãŒã«100000ãããªã¬ãŒãããã»ãã¥ãªãã£ã€ã³ã·ãã³ããçæãããéç¥ãMongoDBã«éä¿¡ããã管çè ã³ã³ãœãŒã«ã«è¡šç€ºãããŸãïŒãããã°äžãã¯ãªãã£ã«ã«ã¬ãã«ããŒãã§ãã£ãŠããã¹ãŠã®ã¢ã©ãŒãã衚瀺ãããŸãïŒã
次ã«ãã«ãŒã«ã¯ååž°çã«ã¹ãã£ã³ããããã®ããªã¬ãŒã¯ã«ãŒã«100000ã®ããªã¬ãŒã«äŸåããŸãã
Check the child rules Check rule 100001 - Attempt to login to BUGGY webapp Check <if_sid>100000</if_sid> Check <match>password</match> Rule 100001 matched ALERT: LEVEL 0 - Attempt to login to BUGGY webapp Matched rule is queue tracked Enqueue item: FireQueueItem object => timestamp=[16:24:57], source=[127.0.0.1], destination=[] FireQueue object => ID=[100001], count=[1], timeFrame=[5 sec], maxSize=[1000] 1: FireQueueItem object => timestamp=[16:24:57], source=[127.0.0.1], destination=[] Check the child rules Check rule 100002 - Brute force trying to login to BUGGY webapp Check <if_matched_sid>100001</if_matched_sid> QueueDictionary.CheckIfMatched start counter++ => counter=[1] counterSameSourceIP++ => counterSameSourceIP=[1] Rule 100001 QueueDictionary.CheckIfMatched == FALSE Rule 100002 not matched Check rule 100002: OK Check the child rules: OK Check rule 100001: OK Check the child rules: OK Check rule 100000: OK
åŠçã®çµæãšããŠãã«ãŒã«100001ãããªã¬ãŒãããæåã®æäœãFireQueueã«ãŠã³ããã¥ãŒã«å ¥åãããŸããå¿çã®æ°ã3ã«çãããªããšãã«ãŒã«100002ã®ã¢ã¯ãã£ãåã®æ¡ä»¶ã®1ã€ãæºããããŸã
ãWebã¢ããªã±ãŒã·ã§ã³ãžã®2çªç®ã®åŒã³åºãã®åŠçãã¹ãããããããã«3çªç®ã®ãã¹ã¯ãŒãéžæã®è©Šè¡ã«é²ã¿ãŸãã
RMQ message received: ApacheConnector:127.0.0.1 - - [01/Jan/2099:16:25:02 +0300] "GET /buggy/admin.php?username=1&password... SecurityEvent object => timestamp=[16:25:02], source=[127.0.0.1], destination=[], message=[GET /buggy/admin.php?username=1&password=1 HTTP/1.1] Check rule 100000 - Access to BUGGY webapp Check <match>/buggy/</match> Rule 100000 matched ALERT: LEVEL 0 - Access to BUGGY webapp Check the child rules Check rule 100001 - Attempt to login to BUGGY webapp Check <if_sid>100000</if_sid> Check <match>password</match> Rule 100001 matched ALERT: LEVEL 0 - Attempt to login to BUGGY webapp
ã«ãŒã«100001ãããªã¬ãŒãããåŸãFireQueueã«ãŠã³ããã¥ãŒå ã®åæ°ãã«ãŠã³ããããŠãããã©ããããã§ãã¯ãããŸããïŒå®éãã«ãŒã«ID 100001ã«ã¯ã次ã®ãããªãã¥ãŒãååšããŸãã
Matched rule is queue tracked Enqueue item: FireQueueItem object => timestamp=[16:25:02], source=[127.0.0.1], destination=[] FireQueue object => ID=[100001], count=[3], timeFrame=[5 sec], maxSize=[1000] 1: FireQueueItem object => timestamp=[16:24:57], source=[127.0.0.1], destination=[] 2: FireQueueItem object => timestamp=[16:25:01], source=[127.0.0.1], destination=[] 3: FireQueueItem object => timestamp=[16:25:02], source=[127.0.0.1], destination=[]
ã«ãŠã³ããã¥ãŒã§ã¯ãæéæ ééïŒ5ç§ïŒã§ã®ã«ãŒã«100001ã®3ã€ã®å¿çãåºå®ãããŠããŸããã»ãã¥ãªãã£ã€ãã³ãã®åŠçã¯ç¶è¡ãããŸãã
Check the child rules Check rule 100002 - Brute force trying to login to BUGGY webapp Check <if_matched_sid>100001</if_matched_sid>
ãã®æç¹ã§ãã«ãŒã«ã100001ã§æ©èœããåæ°ããã§ãã¯ãããŸã<same_source_ip />èŠçŽ ãã«ãŒã«ã®èª¬æã«ååšããããããœãŒã¹IPã¢ãã¬ã¹ã®åãå€ãæã€æäœãã«ãŠã³ããããŸããã
QueueDictionary.CheckIfMatched start counter++ => counter=[1] counterSameSourceIP++ => counterSameSourceIP=[1] counter++ => counter=[2] counterSameSourceIP++ => counterSameSourceIP=[2] counter++ => counter=[3] counterSameSourceIP++ => counterSameSourceIP=[3] Rule 100001 QueueDictionary.CheckIfMatched == TRUE Rule 100002 matched ALERT: LEVEL 1 - Brute force trying to login to BUGGY webapp Check rule 100002: OK Check the child rules: OK Check rule 100001: OK Check the child rules: OK Check rule 100000: OK
ã«ãŒã«100002ãããªã¬ãŒãããçžé¢ã³ã¢ãããã¹ã¯ãŒããã«ãŒããã©ãŒã¹ãæ»æã·ããªãªãæ€åºãã察å¿ããã»ãã¥ãªãã£ã€ã³ã·ãã³ããçæããŸããã€ã³ã·ãã³ãæ å ±ã¯MongoDBããŒã¿ãŠã§ã¢ããŠã¹ã«éä¿¡ãããŸãã
æé 5.ããŒã¿ãŠã§ã¢ããŠã¹ã確èªããŸãã
ã¢ã©ãŒãã®åœ¢æã確èªããŠãã ããããããè¡ãã«ã¯ãRobomongoã䜿çšããŠMongoDBã«æ¥ç¶ããAirSIEMããŒã¿ããŒã¹ã®ã¢ã©ãŒãããã¥ã¡ã³ãã®ã³ã¬ã¯ã·ã§ã³ã調ã¹ãŸããã³ã¬ã¯ã·ã§ã³ã¯ç©ºã§ãªãå¿ èŠããããŸãã
ã¹ããã6.ã»ãã¥ãªãã£ãŒç®¡çè ã®ã¢ã¯ã·ã§ã³ã®ã¢ããªã³ã°ã
ãã©ãŠã¶ã®ã¢ãã¬ã¹ãhttp://127.0.0.1/console/index.phpãã§ã»ãã¥ãªãã£ç®¡çè ã®ã³ã³ãœãŒã«ãéããŸãã SIEMã·ã¹ãã ã®ãã¹ãŠã®ã³ã³ããŒãã³ããæ£ããæ§æãããŠããå Žåããã¹ãã¹ã¯ãªããã®å®è¡åŸãã³ã³ãœãŒã«ãŠã£ã³ããŠã¯æ¬¡ã®ããã«ãªããŸãã
åã ã®ã€ãã³ããæ€åºãããã ãã§ãªããæ»æè ã®äžé£ã®ã¢ã¯ã·ã§ã³ãç¹å®ãããæ»æã·ããªãªãç¹å®ãããããšã匷調ããŸãã管çè ã®ã³ã³ãœãŒã«ã§ã¯ãããã¯è¡çªå·7ã§ãè²ã§åŒ·èª¿è¡šç€ºãããããã«ãŒããã©ãŒã¹ãæ»æã·ããªãªã®æ€åºãããå®è£ ã«é¢ããã¡ãã»ãŒãžã衚瀺ãããŸããã¿ã€ã ã¹ã¿ã³ã16:25:03ã¯çžé¢ã³ã¢ã«ãã£ãŠèšå®ãããŸã;å€ã¯ãæ»æè ãžã®ã¢ã¯ã»ã¹ãååŸãã3åç®ã®è©Šè¡ïŒ16:25:02ïŒã«å¯Ÿå¿ããã€ãã³ãã®ã¿ã€ã ã¹ã¿ã³ããšã¯ç°ãªããŸãã
éèŠåºŠããŒãã®ã¢ã©ãŒãã誀æ€ç¥ãšèŠãªãããå Žåãã³ã³ãœãŒã«ãžã®åºåãç¡å¹ã«ã§ããŸããããã«ããããªãã¬ãŒã¿ãŒã®è² è·ã軜æžãããŸãã
ãŸãšã
ã»ãã¥ãªãã£ç®¡çè ã¯ãæ»æè ã«ãã£ãŠçãããã¢ã¯ãã£ããã£ãéç¥ãããŸããSIEMãéçºããã·ã¹ãã ãã¿ã¹ã¯ãå®äºããŸãããã«ãŒãã³ã
çµè«ãšçµè«
ãã®ã¬ãã¹ã³ã®è³æã§ã¯ãç¬èªã®SIEMãœãªã¥ãŒã·ã§ã³ãéçºããäŸã«ãããææ°ã®ã»ãã¥ãªãã£ã€ã³ã·ãã³ã管çã·ã¹ãã ïŒSIEMïŒã®æ§ç¯ã®åé¡ã«å¯ŸåŠããŸãããä¿è·ãããWebã¢ããªã±ãŒã·ã§ã³ã®ã»ãã¥ãªãã£ã¢ãã¿ãªã³ã°ã«ãããéçºã·ã¹ãã ã®å®çšåã®å¯èœæ§ãå®èšŒãããŠããŸããããã¹ã¯ãŒããã«ãŒããã©ãŒã¹ãã¿ã€ãã®æ»æè ã®æ»æã·ããªãªãæ£åžžã«æ€åºãããã€ã³ã·ãã³ããçæããã管çè ã«éç¥ãããŸããã
äžèšã®äŸã¯éåžžã«åå§çã§ãããæ å ±ã»ãã¥ãªãã£ããŒã«ã®ã¯ã©ã¹ãšããŠã®SIEMã·ã¹ãã ã®ã¢ãŒããã¯ãã£ããã³æ©èœã®å€ããåæ ããŠããªãããšã«åæããå¿ èŠããããŸãã泚ææ·±ãèªè ã¯ãæçµçãªãœãªã¥ãŒã·ã§ã³ãSIEMãããWAFã«äŒŒãŠããããšã«æ°ä»ãã§ãããã
ããã«ãèè ã¯ããªãŒãã³ãœãŒã¹ã®SIEMãœãªã¥ãŒã·ã§ã³ã®ç£æ¥å¿çšã®å¯èœæ§ãçããã»ãšãã©ã®ç«å Žã§ãã¢ã³ãã³ã»ãã¥ããã³ã®æèŠã«åæããŸã- ããªããªãŒãã³ãœãŒã¹ã®SIEMããªãã®ã§ããïŒãã
åæã«ãèè ã¯ãã·ã³ãã«ã§ããããããäŸïŒã³ãŒãäŸãå«ãïŒã䜿çšããŠSIEMã·ã¹ãã ã«ç²Ÿéããããšã§ãç 究è ãäž»é¡é åã詳现ã«ç解ããããããæ°ããçºèŠãä¿ãããšãã§ãããšç¢ºä¿¡ããŠããŸãããããŠãæ å ±ã»ãã¥ãªãã£ã€ã³ã·ãã³ã管çã®å°é家ãå¢ãããŸãããïŒ
䜿çšæžã¿ãããžã§ã¯ãã®ãã¹ãŠã®ãœãŒã¹ã³ãŒãã¯ãGitHubã®ãªãŒãã³ãªAirSIEMãªããžããªã«ãããŸãã
èè ã¯ãã¹ãŠã®ã³ã¡ã³ããã³ã¡ã³ããææ¡ã«åãã§ååããŸãããæž èŽããããšãããããŸãããã¬ãã¹ã³ã®äž»èŠéšåã¯å®äºãã質åã«çããæºåãã§ããŸããã