OpenVPNæ¥ç¶ã®ç¢ºç«äžã«ç解ã§ããªããšã©ãŒãçºçããå éšã§ã®é 眮æ¹æ³ã«ã€ããŠã®ç解ãäžè¶³ããŠãããšæããŸããã ç«ã®äžã«ã¯ããããã³ã«ã®æå·åéšåãã©ã®ããã«é 眮ãããŠããããå®éã«ã©ã®ããã«èŠãããïŒã€ãŸãWiresharkã§ïŒãVPNã®å éšãèŠãæ¹æ³ãã€ãŸã ãã©ãã£ãã¯ãèªåã®æã§è§£èªããŸãïŒããŒãããå Žåã¯ãã¡ããã§ã;-)ïŒã ãã®éšåã§ã¯ãéçããŒãæã€ã¢ãŒãã®ã¿ãèæ ®ããŸãã
åäœã¢ãŒã
ãã©ã°ã€ã³ãªãã®OpenVPNèªäœã¯ãæ¥ç¶ã確ç«ããããã®2ã€ã®ãªãã·ã§ã³ããµããŒãããŠããŸãã
- PSK ïŒPreSharedKeyãŸãã¯éçããŒã¢ãŒã ïŒ-VPNã»ããã¢ããããã»ã¹äžã«çæããããã¹ãŠã®ãã·ã³ã«æžã蟌ãŸãã察称ããŒã䜿çšããŸãã èšäºã®æåã®éšåã§ã¯ããã®ã¢ãŒãã®ã¿ãæ±ããŸãã
- TLSã¯å ¬ééµã€ã³ãã©ã¹ãã©ã¯ãã£ïŒPKIïŒã«åºã¥ããŠããŸã ã æåã«ãTLSæ¥ç¶ã確ç«ãããŸããTLSæ¥ç¶ã¯ã蚌ææžã«ããäž¡åœäºè ã®èªèšŒã䜿çšããŠç¢ºç«ããããããä»ããŠéµçŽ æã亀æãããŸãã 察称ããŒã¯ãã®ããŒãããªã¢ã«ããçæãããVPNå éšã®ãã©ãã£ãã¯ã¯PSKã¢ãŒããšåãæ¹æ³ã§ãããã®ããŒã§æå·åãããŸãã TLSãã£ãã«å ã«ã¯ãŠãŒã¶ãŒãã©ãã£ãã¯ã¯ãããŸãããOpenVPNèªäœã®ãµãŒãã¹æ å ±ã®ã¿ã§ãã ãã®ã¢ãŒãã§ã®OpenVPNã®æºåã«é¢ãã第2éšãæžãäºå®ã§ãã
PSKã¢ãŒãã®è©³çŽ°
PSKã¢ãŒãã¯ã ã·ãŒã¯ã¬ãããªãã·ã§ã³ã«ãã£ãŠæå¹ã«ãªããŸãããã®æåã®ãã©ã¡ãŒã¿ãŒã¯ãVPNã»ããã¢ãããã§ãŒãºäžã«çæãããéçããŒãæã€ãã¡ã€ã«ã®ååã§ãã ãã®ãã¡ã€ã«ã«ã¯ã2çµã®512ãããã©ã³ãã ããŒïŒåãã¢ã§æå·åçšã®ããŒãšHMACçšã®ããŒïŒãå«ãŸãã次ã ã«ïŒããããŒãªã©ãªãã§ïŒæžã蟌ãŸããHEXã§ãšã³ã³ãŒããããŸãã VPNã§æ¥ç¶ãããŠãããã¹ãŠã®ã³ã³ãã¥ãŒã¿ãŒã«åãããŒãã¡ã€ã«ãååšããå¿ èŠããããŸãã 2çªç®ã®ãªãã·ã§ã³ãã©ã¡ãŒã¿ãŒã§ããdirectionãsecretãªãã·ã§ã³ã«èšå®ãããŠããªãå Žåãæåã®ããŒãã¢ã®ã¿ã䜿çšãããŸããã€ãŸãããã©ãã£ãã¯ã¯äž¡åŽã§åãããŒã§çœ²åããã³æå·åãããŸãã
éçããŒã¢ãŒãã§ã¯ã CBCããã³æå·åãªãã®ããŒã¿ãã±ããæå·å圢åŒã®ã¿ã䜿çšã§ããŸãã 次ã«ã CBC圢åŒãæ€èšããŸãã æå·åã¯ããã»ã©èå³æ·±ããã®ã§ã¯ãããŸãã ã
ããã©ã«ãã§ã¯ã BlowFish㯠128ãããããŒã䜿çšããCBCã¢ãŒãã§ã®æå·åã«äœ¿çšããã HMACã«ã¯SHA1ããã³160ãããããŒã䜿çšãããŸãã ããŒã¯ãéçããŒãæã€ãã¡ã€ã«ã®512ãããããŒã®æåã®128ããããš160ãããã§ãã
ãã¹ãŠã®ããŒæ å ±ãšèšå®ã¯äºåã«èšå®ãããŠããããããªã¢ãŒããã¹ãã®ã¢ãã¬ã¹ïŒ ãªã¢ãŒããªãã·ã§ã³ïŒãæå®ãããšãã«ãã»ã«åããããã©ãã£ãã¯ã¯ãå¶åŸ¡ãã±ããã®äº€æåã§ãOpenVPNãèµ·åããçŽåŸã«éä¿¡ã§ããŸãïŒè©³çŽ°ã¯ä»¥äžãåç §ïŒã
è©Šéšå°
ãã¹ãã§ã¯ã次ã®ããŒã䜿çšãããŸããïŒ openvpn --genkey --secret psk.keyã³ãã³ãã«ãã£ãŠçæãããŸãïŒïŒ
# # 2048 bit OpenVPN static key # -----BEGIN OpenVPN Static key V1----- 5234f60f846bb1d5f059c70e75434be6 <-- 89f41113ef56e2bf69253fad6a30ab5f a449204f52f64a0265fd5744a9489f41 cefd95a1d642830e9cf9cdce13c55245 270cf7d367ddc6b56eb1ba749be40e42 <-- HMAC 80cdf7cfbad178348a0e057f1fdc87f0 e5ba84717475b868a7fd617fee8c561c b4575d983534ef71dd8aaa48a53ed469 0ae85faf4522f7defd89ba373a0d22ee <-- f9356e487fdfa0796b0b1fc393fd3ab5 52db7a1ed691ddd50eeb7be2cc32d912 52df93987f4878ec42a12e3a7cda5a40 b1aa850a05821b300359a796313cbcec <-- HMAC 4076483ec7692708c32d323ed080beba 60c58d9281fb5d27c688ac271d3b6d15 1695093291fb788dbbfefb8b7c7f9bef -----END OpenVPN Static key V1-----
å®éãHEXã®ãã4è¡ããšã«512ãããã®ããŒããããŸãã 1çªç®ãš3çªç®ã¯æå·åã®ããŒã§ãããããã¯äŸã®æåã®128ãããã®ã¿ã䜿çšããŸãïŒæ®ãã®384ãããã¯ãŸã£ãã䜿çšãããŸããïŒã2çªç®ãš4çªç®ã¯HMACã®ããŒã§ãæåã®160ãããã¯ãããããã䜿çšãããŸãã èšãæããã°ïŒ
key_encrypt_0 = unhexlify("5234f60f846bb1d5f059c70e75434be689f41113ef56e2bf69253fad6a30ab5fa449204f52f64a0265fd5744a9489f41cefd95a1d642830e9cf9cdce13c55245")[:16] key_hmac_0 = unhexlify("270cf7d367ddc6b56eb1ba749be40e4280cdf7cfbad178348a0e057f1fdc87f0e5ba84717475b868a7fd617fee8c561cb4575d983534ef71dd8aaa48a53ed469")[:20] key_encrypt_1 = unhexlify("0ae85faf4522f7defd89ba373a0d22eef9356e487fdfa0796b0b1fc393fd3ab552db7a1ed691ddd50eeb7be2cc32d91252df93987f4878ec42a12e3a7cda5a40")[:16] key_hmac_1 = unhexlify("b1aa850a05821b300359a796313cbcec4076483ec7692708c32d323ed080beba60c58d9281fb5d27c688ac271d3b6d151695093291fb788dbbfefb8b7c7f9bef")[:20]
unhexlifyã¯ãHEXæååãåã«ãã€ãã®é
åã«å€æããŸãã
ã€ã³ããã¯ã¹[ïŒ16]ã¯ãã·ãŒã±ã³ã¹ããæåã®16èŠçŽ ïŒãã€ãïŒãååŸããããšãæå³ããŸãã
ã€ã³ããã¯ã¹[16ïŒ]ã¯ãã·ãŒã±ã³ã¹ã®æåã®16ãã€ããé€ããã¹ãŠãååŸããããšãæå³ããŸãã
ã€ã³ããã¯ã¹[16:20]ã¯ãæåã®20ãã€ããååŸããæåã®16ãã€ããç Žæ£ããããšãæå³ããŸãã
äž¡æ¹ã®ããŒãã¢ã䜿çšããŠéçããŒã¢ãŒãã§UDPã䜿çšããå Žåã®èšå®ãã¡ã€ã«ïŒåæ¹åã¯ç¬èªã®ãã¢ã§æå·åãããŸãïŒïŒ
# dev tun ifconfig 192.168.1.1 192.168.1.2 remote 192.168.0.2 secret psk.key 0
# dev tun ifconfig 192.168.1.2 192.168.1.1 remote 192.168.0.1 secret psk.key 1
ããã§ã192.168.0.1ãš192.168.0.2ã¯ãã·ã³ã®ç©çã€ã³ã¿ãŒãã§ãŒã¹ã®ã¢ãã¬ã¹ã§ããã192.168.1.1ãš192.168.1.2ã¯ãã³ãã«å ã®å¯Ÿå¿ããã¢ãã¬ã¹ã§ãã
æ§æãã¡ã€ã«ã®1ã€ã§ã®ã¿æå®ããã«ã¯ã ãªã¢ãŒããªãã·ã§ã³ã§ååã§ãã ãã®å Žåã ãªã¢ãŒããèšå®ãããŠããªããã¹ãã¯ãçä¿¡æ¥ç¶ïŒãã®å Žåã¯UDPãã±ããïŒãåŸ ã€ã ãã§ãã
æºåäžã§ã
éä¿¡ããããã±ããã®åœ¢åŒã¯æ¬¡ã®ãšããã§ãã
[Len (2 )] | HMAC (20 ) | IV (8 ) | packet ID (4 ) | timestamp (4 ) | packet payload
Len-æåã®2ãã€ããé€ããã±ããå
šäœã®é·ãã TCPçµç±ã§äœæ¥ããå Žåã«ã®ã¿äœ¿çšãããŸãã UDPã䜿çšããå ŽåãOpenVPNãã±ããã®é·ãã¯UDPãã±ããã®é·ãããèšç®ãããŸãããOpenVPNãã±ããã®Lenãã£ãŒã«ãã¯èšç®ãããŸããã
HMAC -HMACã®åŸã«æ¥ããã¹ãŠã®HMAC-SHA1ïŒIVããã³æå·åãããããŒã¿ïŒ
IV -CBCã¢ãŒãã®åæåãã¯ãã«ã
IVã®åŸã«æ¥ããã¹ãŠãæå·åãããŠéä¿¡ãããŸãã
ãã±ããID-ãã±ããçªå·ã ããã«ã¯ç¹°ãè¿ããé²ãããã«å«ãŸããŠãããä¿èšŒãããããŒã¿é
ä¿¡ãæŽçããããã«ã¯äœ¿çšãããŸããã
ã¿ã€ã ã¹ã¿ã³ã -ç¹°ãè¿ãã«å¯Ÿããä¿è·ã«ã䜿çšãããŸãã
ãã±ãããã€ããŒã -ãã±ãããéã¶ããŒã¿ã ããã¯ãOpenVPNãªãŒããŒããããŸãã¯ã«ãã»ã«åããããã©ãã£ãã¯èªäœã§ãã
HMAC ïŒããŒãã¡ãã»ãŒãžïŒ-èªèšŒã³ãŒãïŒã¡ãã»ãŒãžã®çœ²åãšããŠæ©èœãããããåïŒãçæããæå·åããã·ã¥é¢æ°ïŒãã®å ŽåãSHA1ã«åºã¥ãïŒã«åºã¥ãé¢æ°ã ç§å¯éµ ãã¡ãã»ãŒãžãããã³èªèšŒã³ãŒãã䜿çšããŠã誰ã§ãèªèšŒã³ãŒããæ£ããããšã確èªã§ããŸãã ã³ãŒããæ£ããå Žåã åãããŒãæã€èª°ãã«ãã£ãŠçœ²åãããæç¹ããã¡ãã»ãŒãžïŒãã®å Žåã¯ããã±ãŒãžïŒãå€æŽãããŠããªãããšãæå³ããŸãã ã€ãŸã HDSããã§ãã¯ããã«ã¯ãEDSãšã¯å¯Ÿç §çã«ãäž¡æ¹ã®åœäºè ãåãç§å¯éµãæã£ãŠããå¿ èŠããããŸãã
ãµãŒãã¹ããã±ãŒãžã解èªããŸã
çŽæãããWiresharkïŒ ãã£ã»ã¯ã¿ããŒãžã®å£°æãšã¯å察ã«ã圌ã¯éçããŒã¢ãŒãã®OpenVPNãç解ããŠããŸããïŒïŒ
æåã®ããã±ãŒãžãååŸãã埩å·åãè©Šã¿ãŸãã ãªããªã VPNã¯UDPãä»ããŠåäœããããã«æ§æãããŠãããLenãã£ãŒã«ãã¯ãããŸããããã±ããã¯ããã«HMACã§å§ãŸããŸãã HMACãã£ãŒã«ããªãã§ããã®ãã±ããã®HMACãäœã«çãããªãããèšç®ããŠã¿ãŸãããã
packet = unhexlify("7c0a45b025b3225c9a60051699fc87bae44dec9026e792a7ff3842aabd7cc77b439564b42002e5e327cba04c620cd80ca92c60139e2345a2c5d99b0f") print("HMAC = %s" % HMAC(key_hmac_0, packet[20:], 'sha1').hexdigest())
HMAC = 7c0a45b025b3225c9a60051699fc87bae44dec90
èšç®ãããHMACã¯ãããã±ãŒãžã«æ¿å ¥ãããHMACãšæ£ç¢ºã«äžèŽããããšãããããŸãã ãã®ããããã±ããèªèšŒã¯ãã¹ãããŠãããç§ãã¡ã¯æ£ããè»éã«ä¹ã£ãŠããŸãïŒ ä»ãããã解èªããæã§ãã
iv = packet[20:28] encrypted_part = packet[28:] decrypted = Blowfish.new(key_encrypt_0, mode=Blowfish.MODE_CBC, IV=iv).decrypt(encrypted_part) print(" : %s" % hexlify(decrypted).decode())
: 00000001 58069a45 287f346bd4ef7a812d56b8d3afc5459c00 07070707070707
æåã®4ãã€ãã¯ãã±ããçªå·ã§ãã ããã§ããæåã«ããã±ãŒãžãåããŸããã 2çªç®ã®4ãã€ãã¯äžæçãªãã®ã§ãç§ã¯ã©ãã«ã§ãã æ«å°Ÿã®7ãã€ã0x07ã¯ããã£ã³ã°ïŒæå·åäžã«è¿œå ããããããã¡ãã»ãŒãžã®é·ãããããã¯ã®é·ãã®åæ°ã«ãªãïŒã§ãããæ£ãããããç Žæ£ããŸãã
packet_id = decrypted[:4] timestamp = decrypted[4:8] decrypted_data = decrypted[8:-decrypted[-1]] # packet_id timestamp print("ID : %s" % hexlify(packet_id).decode()) print(" : %s" % hexlify(timestamp).decode()) print(" : %s" % hexlify(decrypted_data).decode())
ID : 00000001 : 58069a45 : 287f346bd4ef7a812d56b8d3afc5459c00
äžèŠã16ãã€ãã®ã©ã³ãã ãªæååãšãŒããã€ããéä¿¡ãããŠããããã«èŠããŸãã ãªããªã OpenVPNã¯ãªãŒãã³ãœãŒã¹ãããžã§ã¯ãã§ããã³ãŒãã調ã¹ãŠã occ.cãã¡ã€ã«ã§ä»®èª¬ãéšåçã«ç¢ºèªããçããèŠã€ããŸãã
287f346bd4ef7a812d56b8d3afc5459cã¯occ_magicå®æ°ã§ã-ããã±ãŒãžãOpenVPNã³ã³ãããŒã«ããã±ãŒãžã§ããããšã瀺ããŸãã å¶åŸ¡ãã±ããã¿ã€ãã®ã¿ã€ãã®åŸããã®å Žåã¯ãã€ã0x00 == OCC_REQUESTã§ãã OCC_REQUESTãå«ããã±ããã§ã¯ãä»ã«äœãéä¿¡ãã¹ãã§ã¯ãããŸããã
次ã«ã2çªç®ã®ããã±ãŒãžã埩å·åããŸãã
packet = unhexlify("91861a4479c376d3013cdcd7f3e657ac093048cdb3a40775fc5804f68842ef06288a9343acb298562aaa4c92c10aae2213441619c3df0d8b89a0f13f5dd69d1eaa0e22667938b68e38a1238e39b76b889b7b6e5dbadd8f3a264f6fc9bb9c225de387d5d17914b2e2853d7fbb706da429f596721ab394febe7e52875183f0e9e10ec16042398c4116c2069ef18f06da45b55581a9997d1f54def143b053226727934404be44379a0172d1b618bbf1b676b60f57889e734af6b54291d07d9c7e13573cc81e") # 'secret' 'direction', . key_hmac = key_hmac_1 key_encrypt = key_encrypt_1 print("HMAC = %s" % HMAC(key_hmac, packet[20:], 'sha1').hexdigest()) iv = packet[20:28] encrypted_part = packet[28:] decrypted = Blowfish.new(key_encrypt, mode=Blowfish.MODE_CBC, IV=iv).decrypt(encrypted_part) print(" : %s" % hexlify(decrypted).decode()) packet_id = decrypted[:4] timestamp = decrypted[4:8] decrypted_data = decrypted[8:-decrypted[-1]] # packet_id timestamp print("ID : %s" % hexlify(packet_id).decode()) print(" : %s" % hexlify(timestamp).decode()) print(" HEX: %s" % hexlify(decrypted_data).decode()) print(" : %s" % decrypted_data)
HMAC = 91861a4479c376d3013cdcd7f3e657ac093048cd : 0000000158069a45287f346bd4ef7a812d56b8d3afc5459c0156342c6465762d747970652074756e2c6c696e6b2d6d747520313534342c74756e2d6d747520313530302c70726f746f2055445076342c6966636f6e666967203139322e3136382e312e31203139322e3136382e312e322c6b657964697220312c6369706865722042462d4342432c6175746820534841312c6b657973697a65203132382c73656372657400030303 ID : 00000001 : 58069a45 HEX: 287f346bd4ef7a812d56b8d3afc5459c0156342c6465762d747970652074756e2c6c696e6b2d6d747520313534342c74756e2d6d747520313530302c70726f746f2055445076342c6966636f6e666967203139322e3136382e312e31203139322e3136382e312e322c6b657964697220312c6369706865722042462d4342432c6175746820534841312c6b657973697a65203132382c73656372657400 ASCII: b'(\x7f4k\xd4\xefz\x81-V\xb8\xd3\xaf\xc5E\x9c\x01V4,dev-type tun,link-mtu 1544,tun-mtu 1500,proto UDPv4,ifconfig 192.168.1.1 192.168.1.2,keydir 1,cipher BF-CBC,auth SHA1,keysize 128,secret\x00'
ãã®ãã±ããã®æåã®16ãã€ãã¯occ_magicã§ããã次ã®ãã€ãïŒå¶åŸ¡ãã±ããã®ã¿ã€ãïŒã¯0x01 == OCC_REPLYã§ããããšãããããŸãã OCC_REPLYãã±ããã§ã¯ããã©ã¡ãŒã¿ä»ãã®Cæååããã±ããã¿ã€ãã®åŸã«æž¡ãããŸãã ãã®å Žåã次ã®ããã¹ããéä¿¡ãããŸãïŒ V4ãdev-type tunãlink-mtu 1544ãtun-mtu 1500ãproto UDPv4ãifconfig 192.168.1.1 192.168.1.2ãkeydir 1ãcipher BF-CBCãauth SHA1ãkeysize 128ãsecret ã åãè¡ãOpenVPNãã°ã«ãããŸãã
次ã®2ã€ã®ãã±ããã¯ã2çªç®ã®ãã¹ãããæåã®ãã¹ããžã®OCC_REQUESTãš ããã®ãã¹ããžã®OCC_REPLYã§ãã åæ§ã®æ¹æ³ã§ãããã解èªããŸãã
HMAC = fc52f6981ccb4d7c2a3c951bd1ce8e882f9155da ID : 00000002 : 58069a45 HEX: 287f346bd4ef7a812d56b8d3afc5459c00 : b'(\x7f4k\xd4\xefz\x81-V\xb8\xd3\xaf\xc5E\x9c\x00'
HMAC = e4987efec6d4625e89ba26b69b0d8f54ed391c3c ID : 00000002 : 58069a45 HEX: 287f346bd4ef7a812d56b8d3afc5459c0156342c6465762d747970652074756e2c6c696e6b2d6d747520313534342c74756e2d6d747520313530302c70726f746f2055445076342c6966636f6e666967203139322e3136382e312e32203139322e3136382e312e312c6b657964697220302c6369706865722042462d4342432c6175746820534841312c6b657973697a65203132382c73656372657400 : b'(\x7f4k\xd4\xefz\x81-V\xb8\xd3\xaf\xc5E\x9c\x01V4,dev-type tun,link-mtu 1544,tun-mtu 1500,proto UDPv4,ifconfig 192.168.1.2 192.168.1.1,keydir 0,cipher BF-CBC,auth SHA1,keysize 128,secret\x00'
ãªã¢ãŒããã¹ãã®èšå®ãåãåã£ãããŒã«ã«ãã¹ãã¯ãèªèº«ãšå€éšã®èšå®ã®é©åæ§ããã§ãã¯ããççŸãããå Žåã¯èŠåãçºè¡ããŸãã ãã®å Žåãäž¡åŽã®VPNèšå®ãæ¹åã«äžèŽããããšãããããŸãã
V4ãdev-type tunãlink-mtu 1544ãtun-mtu 1500ãproto UDPv4ãifconfig 192.168.1.1 192.168.1.2ãkeydir 1ãæå·BF-CBCãauth SHA1ãããŒãµã€ãº128ãã·ãŒã¯ã¬ãã
V4ãdev-type tunãlink-mtu 1544ãtun-mtu 1500ãproto UDPv4ãifconfig 192.168.1.2 192.168.1.1ãkeydir 0ãæå·BF-CBCãauth SHA1ãããŒãµã€ãº128ãã·ãŒã¯ã¬ãã
ã«ãã»ã«åããããã©ãã£ãã¯ã®åŸ©å·å
ãã®ãã©ãã£ãã¯ãã³ãã®æ¬¡ã®ãã±ããã¯ããŠãŒã¶ãŒããŒã¿ãäŒéããŸãã åãšåãæ¹æ³ã§ãã³ãŒãããŸãã
HMAC = efe4850d41f0e4a7535f13310685d74c2722a0da ID : 00000003 : 58069a45 HEX: 4500005420874000400196cec0a80102c0a80101080066ed1a1300014d9a0658000000005a390a0000000000101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f3031323334353637
occ_magicãping_magicïŒ 2a187bf3641eb4cb07ed2d0a981fc748ã«çããå¥ã®ããžãã¯å®æ°ïŒãååšããªãå Žåãããã¯ããŒã¿ãã±ããã§ãã å®éã0x45ã¯ãªãã·ã§ã³ã®ããããŒãã£ãŒã«ãã®ãªãIPv4ãã±ããã®æåã®ãã€ãã§ãã ããã¯ãtunã€ã³ã¿ãŒãã§ã€ã¹ããåºãping-requestãå«ãIPv4ãã±ãããšãŸã£ããåãã§ããããšãããããŸãïŒå³ã®16é²æ°ã§ã¯ãIPv4ã¯2è¡ç®ããå§ãŸããŸãïŒã
å¿çããã±ãŒãžïŒ
HMAC = a0a0108cd173e8829b91e8b34bd5cac2ab8a9c0b ID : 00000003 : 58069a45 HEX: 450000547f00000040017855c0a80101c0a8010200006eed1a1300014d9a0658000000005a390a0000000000101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f3031323334353637
ããã¯ããã³ãã«ã«éä¿¡ãããping-replyã䜿çšããIPv4ãšãŸã£ããåãã§ããããšãããããŸãã
åè
OpenVPN Ping
pingãã±ããããããŸã-æåŸã®ãã±ãããå¥ã®ãã¹ãã«éä¿¡ãããŠããæéãçµéããå Žåã«æ¥ç¶ã確èªããããã«OpenVPNãéä¿¡ãããµãŒãã¹ãã±ããïŒããŒãã¢ã©ã€ããéã¢ã¯ãã£ããping *ãªãã·ã§ã³ã§èšå®ïŒã éåžžã®icmp pingãšã¯ç°ãªããOpenVPNã¯åä¿¡ãããã±ããã«å¿çããŸããããæ¥ç¶ãçããŠããããšãåã«èŠããŠããŸãã
nmapãšOpenVPN
OpenVPNãPSKã¢ãŒãïŒããã³TLS-AUTHãªãã·ã§ã³ãæå¹ã«ããTLSã¢ãŒãïŒã§ãªãã¹ã³ããUDPããŒããç§å¯éµãç¥ããªããã¹ãŠã®äººã«ãšã£ãŠããã®äžã®ãã¹ãŠã®ãã±ãããããããããŠããããã«èŠããŸãã nmapã¯ããã®ããŒãã®ã¹ããŒã¿ã¹ããopen | filtersããšè¡šç€ºããŸãã OpenVPNãã°ïŒverbãªãã·ã§ã³ã®å€ãååã«é«ãïŒã§ãããŒããã¹ãã£ã³ãããšãããã±ããã®èªèšŒ/埩å·åãšã©ãŒïŒãã±ããHMACèªèšŒã«å€±æããŸããããšãããšã³ããªããããŸãã
OpenVPNãã©ãã£ãã¯æ€åº
PSKã¢ãŒãã§ã¯ãUDPã䜿çšããŠäœæ¥ããå ŽåããµãŒãããŒãã£ã®ãªãã¶ãŒããŒïŒç§å¯éµãæããªãïŒã®OpenVPNãã±ããã®ã³ã³ãã³ãå šäœãã©ã³ãã ã«èŠããŸãã ãããã®ããã±ãŒãžãOpenVPNã«èµ·å ããã眲åã¯ãããŸããã ãã ãããã±ããé·ã¯ã©ã³ãã ããŒã¿ã€ã¡ãŒãžããå€ããŸã-䜿çšãããããã·ã¥é¢æ°ãšã䜿çšãããæå·ã®ãããã¯ãµã€ãºã«çããå¢åã®å€åãããã³åºå®é·ãµãŒãã¹ãã±ããïŒOCC_REQUESTããã³OpenVPN PINGãã±ããïŒã®ååšã«äŸåããŸãã
ããã«ãTCPã䜿çšããŠäœæ¥ããå ŽåãåOpenVPNãã±ããã®å é ã«ã¯ãæå·åãããŠããªããã±ããé·ã®2ãã€ããã£ãŒã«ãããããŸãã
ãããã«
PSKã¢ãŒãã§ã¯ããã¹ãŠãéåžžã«åçŽã«é 眮ãããŠããããšãããããŸãã å®éã«ã¯ã¯ã©ã€ã¢ã³ã/ãµãŒããŒã®åé¢ãããããŸããã
TLSã¢ãŒãã§ã¯ãæ¥ç¶ã®ç¢ºç«ã¯ã¯ããã«å°é£ã§ãããå ¬éããŒã€ã³ãã©ã¹ãã©ã¯ãã£ã䜿çšã§ããããã«ããã»ãã·ã§ã³ããŒã®å®æçãªå€æŽãæäŸãã Perfect Forward Secrecyãå®è£ ããŸãã ãã ãã次ã®ããŒãã®TLSã¢ãŒãã«ã€ããŠã¯ã