JPCERT/CC¡¢VPNÀܳ¤ò¥Ð¥¤¥Ñ¥¹¤¹¤ë¥µ¥¤¥Ð¡¼¹¶·â¼êË¡¡ÖTunnelVision¡×¤ËÃí°Õ´µ¯
JPCERT¥³¡¼¥Ç¥£¥Í¡¼¥·¥ç¥ó¥»¥ó¥¿¡¼(JPCERT/CC: Japan Computer Emergency Response Team Coordination Center)¤Ï5·î10Æü¡¢¡ÖJVNTA#94876636: DHCP¤Î¥ª¥×¥·¥ç¥ó121¤òÍøÍѤ·¤¿VPN¤Î¥«¥×¥»¥ë²½²óÈò¤ÎÌäÂê¡×¤Ë¤ª¤¤¤Æ¡¢VPN(Virtual Private Network)Àܳ¤ò¥Ð¥¤¥Ñ¥¹¤¹¤ë¿·¤·¤¤¥µ¥¤¥Ð¡¼¹¶·â¼êË¡¡ÖTunnelVision¡×¤Ë¤Ä¤¤¤ÆÃí°Õ¤ò´µ¯¤·¤¿¡£¤³¤Î¹¶·â¼êË¡¤Î¾ÜºÙ¤Ï¡ÖVPNÀܳ¤ò¥Ð¥¤¥Ñ¥¹¤¹¤ë¿·¤·¤¤¹¶·â¼êË¡¡ÖTunnelVision¡×¡¢ÄÌ¿®¤Î˵¼õ¤¬²Äǽ | TECH+¡Ê¥Æ¥Ã¥¯¥×¥é¥¹¡Ë¡×¤Ë¤Æ²òÀ⤷¤Æ¤¤¤ë¡£
JVNTA#94876636: DHCP¤Î¥ª¥×¥·¥ç¥ó121¤òÍøÍѤ·¤¿VPN¤Î¥«¥×¥»¥ë²½²óÈò¤ÎÌäÂê
¡ûVPNÀܳ¤Î¥Ð¥¤¥Ñ¥¹¤È¤Ï
TunnelVision¤Ï¡¢DHCP¤Î¥ª¥×¥·¥ç¥ó121(¥¯¥é¥¹¥ì¥¹¥¹¥¿¥Æ¥£¥Ã¥¯¥ë¡¼¥È)¤ò»ÈÍѤ·¤ÆɸŪ¤Î¥ë¡¼¥Æ¥£¥ó¥°¥Æ¡¼¥Ö¥ë¤òÊѹ¹¤·¡¢¥È¥é¥Õ¥£¥Ã¥¯¤ò¹¶·â¼Ô¤Î¥³¥ó¥Ô¥å¡¼¥¿¡¼¤ËÊѹ¹¤µ¤»¤ë¹¶·â¼êË¡¡£¥¯¥é¥¹¥ì¥¹¥¹¥¿¥Æ¥£¥Ã¥¯¥ë¡¼¥È¤ò¥µ¥Ý¡¼¥È¤¹¤ë¥ª¥Ú¥ì¡¼¥Æ¥£¥ó¥°¥·¥¹¥Æ¥à¤ò»ÈÍѤ·¡¢¤Ê¤ª¤«¤Ä¥ë¡¼¥Æ¥£¥ó¥°¥ë¡¼¥ë¤Î¤ß¤Ë°Í¸¤·¤Æ¥È¥é¥Õ¥£¥Ã¥¯¤òÊݸ¤ëVPN¤¬±Æ¶Á¤ò¼õ¤±¤ë¤È¤¤¤¦¡£
¤³¤Î¹¶·â¤ÏÉÔÀµ¤ÊDHCP¥µ¡¼¥Ð¤òΩ¤Á¾å¤²¤ëɬÍפ¬¤¢¤ë¤¿¤á¡¢É¸Åª¤ÈƱ°ì¤Î¥í¡¼¥«¥ë¥Í¥Ã¥È¥ï¡¼¥¯¤Ë¥¢¥¯¥»¥¹¤Ç¤¤ë¹¶·â¼Ô¤Î¤ß¼Â¹Ô¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£¹¶·â¼Ô¤Ï¥²¡¼¥È¥¦¥§¥¤¤ò¹½À®¤¹¤ë¤³¤È¤Ç¥È¥é¥Õ¥£¥Ã¥¯¤òÀµ¾ï¤Ë¥ê¥À¥¤¥ì¥¯¥È¤¹¤ë¤³¤È¤«¤é¡¢Èï³²¼Ô¤Ï¹¶·â¼Ô¤Î¥³¥ó¥Ô¥å¡¼¥¿¤ò·Ðͳ¤·¤ÆÄÌ¿®¤·¤Æ¤¤¤ë¤³¤È¤Ëµ¤¤Å¤¯¤³¤È¤ÏÆñ¤·¤¤¤È¤ß¤é¤ì¤Æ¤¤¤ë¡£
¡û¤³¤Î¹¶·â¤¬¤â¤¿¤é¤¹±Æ¶Á¤ÈÂкö
¤³¤Î¹¶·â¤ËÀ®¸ù¤¹¤ë¤È´û¸¤ÎVPNÀܳ¤Ï̵»ë¤µ¤ì¡¢¹¶·â¼Ô¤Î¥³¥ó¥Ô¥å¡¼¥¿¤ò·Ðͳ¤·¤ÆÄÌ¿®¤¹¤ë¤³¤È¤Ë¤Ê¤ë¡£¤³¤Î¥È¥é¥Õ¥£¥Ã¥¯¤ÏVPN¤Î³°Â¦¤Ë¤¢¤ë¤¿¤á¡¢°Å¹æ²½¤µ¤ì¤Ê¤¤¡£
JPCERT/CC¤Ï¤³¤Î¹¶·â¤ò²óÈò¤¹¤ë¤¿¤á¤ÎÂкö¤È¤·¤Æ¡¢Linux¸þ¤±VPN¥½¥Õ¥È¥¦¥§¥¢¤Î³«È¯¼Ô¤Ë°Ê²¼¤ò¿ä¾©¤·¤Æ¤¤¤ë¡£
Linux¤Ï¥Í¥Ã¥È¥ï¡¼¥¯Ì¾Á°¶õ´Ö(network namespace)¤ò¥µ¥Ý¡¼¥È¤·¤Æ¤¤¤ë¡£´û¸¤Î¥Í¥Ã¥È¥ï¡¼¥¯¥¤¥ó¥¿¥Õ¥§¡¼¥¹(eth0¤äwlan0¤Ê¤É)¤òǤ°Õ¤Î̾Á°¶õ´Ö¤Ë°ÜÆ°¤·¡¢É¸½à¤Î̾Á°¶õ´Ö¤Ë¤Ï¥ë¡¼¥×¥Ð¥Ã¥¯(lo0)¤ÈVPN¥¤¥ó¥¿¥Õ¥§¡¼¥¹¤À¤±¤ò»Ä¤¹¡£¤³¤Î¼êË¡¤ò»ÈÍѤ¹¤ë¤È¤¹¤Ù¤Æ¤Î¥¤¥ó¥¿¡¼¥Í¥Ã¥È¥È¥é¥Õ¥£¥Ã¥¯¤òVPN·Ðͳ¤Ë¤Ç¤¤ë(»²¹Í¡§¡ÖRouting & Network Namespaces - WireGuard¡×)
¤Þ¤¿¡¢VPN¥½¥Õ¥È¥¦¥§¥¢¤ÎÍøÍѼԤËÂФ·¡¢¿®Íê¤Ç¤¤Ê¤¤¥Í¥Ã¥È¥ï¡¼¥¯¤ò»ÈÍѤ·¤Ê¤¤¤³¤È¤ò¿ä¾©¤·¤Æ¤¤¤ë¡£Ê£¿ô¤Î¥æ¡¼¥¶¡¼¤¬Æ±°ì¥í¡¼¥«¥ë¥Í¥Ã¥È¥ï¡¼¥¯¾å¤Ë¸ºß¤¹¤ë¸ø½°ÌµÀþLAN¤ä¡¢½ÉÇñ»ÜÀߤÎLAN¤Ê¤É¤Ï¤³¤Î¹¶·â¤Î±Æ¶Á¤ò¼õ¤±¤ë²ÄǽÀ¤¬¤¢¤ë¡£¤³¤Î¤è¤¦¤Ê´Ä¶¤Ç¥¤¥ó¥¿¡¼¥Í¥Ã¥ÈÀܳ¤òɬÍפȤ¹¤ë¾ì¹ç¤Ï¡¢·ÈÂÓÅÅÏäʤɤΥâ¥Ð¥¤¥ë¥Ç¡¼¥¿ÄÌ¿®(¥Æ¥¶¥ê¥ó¥°)¤ò»ÈÍѤ¹¤ë¤³¤È¤¬Ë¾¤Þ¤ì¤ë¡£
¡ûVPNÀܳ¤Î¥Ð¥¤¥Ñ¥¹¤È¤Ï
TunnelVision¤Ï¡¢DHCP¤Î¥ª¥×¥·¥ç¥ó121(¥¯¥é¥¹¥ì¥¹¥¹¥¿¥Æ¥£¥Ã¥¯¥ë¡¼¥È)¤ò»ÈÍѤ·¤ÆɸŪ¤Î¥ë¡¼¥Æ¥£¥ó¥°¥Æ¡¼¥Ö¥ë¤òÊѹ¹¤·¡¢¥È¥é¥Õ¥£¥Ã¥¯¤ò¹¶·â¼Ô¤Î¥³¥ó¥Ô¥å¡¼¥¿¡¼¤ËÊѹ¹¤µ¤»¤ë¹¶·â¼êË¡¡£¥¯¥é¥¹¥ì¥¹¥¹¥¿¥Æ¥£¥Ã¥¯¥ë¡¼¥È¤ò¥µ¥Ý¡¼¥È¤¹¤ë¥ª¥Ú¥ì¡¼¥Æ¥£¥ó¥°¥·¥¹¥Æ¥à¤ò»ÈÍѤ·¡¢¤Ê¤ª¤«¤Ä¥ë¡¼¥Æ¥£¥ó¥°¥ë¡¼¥ë¤Î¤ß¤Ë°Í¸¤·¤Æ¥È¥é¥Õ¥£¥Ã¥¯¤òÊݸ¤ëVPN¤¬±Æ¶Á¤ò¼õ¤±¤ë¤È¤¤¤¦¡£
¤³¤Î¹¶·â¤ÏÉÔÀµ¤ÊDHCP¥µ¡¼¥Ð¤òΩ¤Á¾å¤²¤ëɬÍפ¬¤¢¤ë¤¿¤á¡¢É¸Åª¤ÈƱ°ì¤Î¥í¡¼¥«¥ë¥Í¥Ã¥È¥ï¡¼¥¯¤Ë¥¢¥¯¥»¥¹¤Ç¤¤ë¹¶·â¼Ô¤Î¤ß¼Â¹Ô¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£¹¶·â¼Ô¤Ï¥²¡¼¥È¥¦¥§¥¤¤ò¹½À®¤¹¤ë¤³¤È¤Ç¥È¥é¥Õ¥£¥Ã¥¯¤òÀµ¾ï¤Ë¥ê¥À¥¤¥ì¥¯¥È¤¹¤ë¤³¤È¤«¤é¡¢Èï³²¼Ô¤Ï¹¶·â¼Ô¤Î¥³¥ó¥Ô¥å¡¼¥¿¤ò·Ðͳ¤·¤ÆÄÌ¿®¤·¤Æ¤¤¤ë¤³¤È¤Ëµ¤¤Å¤¯¤³¤È¤ÏÆñ¤·¤¤¤È¤ß¤é¤ì¤Æ¤¤¤ë¡£
¡û¤³¤Î¹¶·â¤¬¤â¤¿¤é¤¹±Æ¶Á¤ÈÂкö
¤³¤Î¹¶·â¤ËÀ®¸ù¤¹¤ë¤È´û¸¤ÎVPNÀܳ¤Ï̵»ë¤µ¤ì¡¢¹¶·â¼Ô¤Î¥³¥ó¥Ô¥å¡¼¥¿¤ò·Ðͳ¤·¤ÆÄÌ¿®¤¹¤ë¤³¤È¤Ë¤Ê¤ë¡£¤³¤Î¥È¥é¥Õ¥£¥Ã¥¯¤ÏVPN¤Î³°Â¦¤Ë¤¢¤ë¤¿¤á¡¢°Å¹æ²½¤µ¤ì¤Ê¤¤¡£
JPCERT/CC¤Ï¤³¤Î¹¶·â¤ò²óÈò¤¹¤ë¤¿¤á¤ÎÂкö¤È¤·¤Æ¡¢Linux¸þ¤±VPN¥½¥Õ¥È¥¦¥§¥¢¤Î³«È¯¼Ô¤Ë°Ê²¼¤ò¿ä¾©¤·¤Æ¤¤¤ë¡£
Linux¤Ï¥Í¥Ã¥È¥ï¡¼¥¯Ì¾Á°¶õ´Ö(network namespace)¤ò¥µ¥Ý¡¼¥È¤·¤Æ¤¤¤ë¡£´û¸¤Î¥Í¥Ã¥È¥ï¡¼¥¯¥¤¥ó¥¿¥Õ¥§¡¼¥¹(eth0¤äwlan0¤Ê¤É)¤òǤ°Õ¤Î̾Á°¶õ´Ö¤Ë°ÜÆ°¤·¡¢É¸½à¤Î̾Á°¶õ´Ö¤Ë¤Ï¥ë¡¼¥×¥Ð¥Ã¥¯(lo0)¤ÈVPN¥¤¥ó¥¿¥Õ¥§¡¼¥¹¤À¤±¤ò»Ä¤¹¡£¤³¤Î¼êË¡¤ò»ÈÍѤ¹¤ë¤È¤¹¤Ù¤Æ¤Î¥¤¥ó¥¿¡¼¥Í¥Ã¥È¥È¥é¥Õ¥£¥Ã¥¯¤òVPN·Ðͳ¤Ë¤Ç¤¤ë(»²¹Í¡§¡ÖRouting & Network Namespaces - WireGuard¡×)
¤Þ¤¿¡¢VPN¥½¥Õ¥È¥¦¥§¥¢¤ÎÍøÍѼԤËÂФ·¡¢¿®Íê¤Ç¤¤Ê¤¤¥Í¥Ã¥È¥ï¡¼¥¯¤ò»ÈÍѤ·¤Ê¤¤¤³¤È¤ò¿ä¾©¤·¤Æ¤¤¤ë¡£Ê£¿ô¤Î¥æ¡¼¥¶¡¼¤¬Æ±°ì¥í¡¼¥«¥ë¥Í¥Ã¥È¥ï¡¼¥¯¾å¤Ë¸ºß¤¹¤ë¸ø½°ÌµÀþLAN¤ä¡¢½ÉÇñ»ÜÀߤÎLAN¤Ê¤É¤Ï¤³¤Î¹¶·â¤Î±Æ¶Á¤ò¼õ¤±¤ë²ÄǽÀ¤¬¤¢¤ë¡£¤³¤Î¤è¤¦¤Ê´Ä¶¤Ç¥¤¥ó¥¿¡¼¥Í¥Ã¥ÈÀܳ¤òɬÍפȤ¹¤ë¾ì¹ç¤Ï¡¢·ÈÂÓÅÅÏäʤɤΥâ¥Ð¥¤¥ë¥Ç¡¼¥¿ÄÌ¿®(¥Æ¥¶¥ê¥ó¥°)¤ò»ÈÍѤ¹¤ë¤³¤È¤¬Ë¾¤Þ¤ì¤ë¡£