TryHackme VPN 연결

심야·2023년 8월 21일
0

Tryhackme 플랫폼으로 모의해킹을 학습하려면 VPN을 연결해야 한다.

프로필을 우클릭 해 Access 페이지에 접속하면 그림과 같이 OpenVpn 페이지에 접속할 수 있다.

페이지에 접속하면 아래 그림처럼 Download My Configuration File 버튼이 있다. 해당 버튼을 클릭하면 VPN 설정 파일이 다운로드 된다.

칼리 리눅스의 다운로드 디렉토리에 VPN 설정 파일이 다운로드 되었다.

칼리 리눅스에서 Openvpn 설정시 아래처럼 Ciper Error가 발생하는 경우가 있다.

2023-08-21 03:15:06 WARNING: Compression for receiving enabled. Compression has been used in the past to break encryption. Sent packets are not compressed unless "allow-compression yes" is also set.
2023-08-21 03:15:06 DEPRECATED OPTION: --cipher set to 'AES-256-CBC' but missing in --data-ciphers (AES-256-GCM:AES-128-GCM:CHACHA20-POLY1305). OpenVPN ignores --cipher for cipher negotiations. 
2023-08-21 03:15:06 Note: '--allow-compression' is not set to 'no', disabling data channel offload.
2023-08-21 03:15:06 OpenVPN 2.6.3 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [PKCS11] [MH/PKTINFO] [AEAD] [DCO]
2023-08-21 03:15:06 library versions: OpenSSL 3.0.10 1 Aug 2023, LZO 2.10
2023-08-21 03:15:06 DCO version: N/A
2023-08-21 03:15:06 TCP/UDP: Preserving recently used remote address: [AF_INET]3.104.196.208:1194
2023-08-21 03:15:06 Socket Buffers: R=[212992->212992] S=[212992->212992]
2023-08-21 03:15:06 UDPv4 link local: (not bound)
2023-08-21 03:15:06 UDPv4 link remote: [AF_INET]3.104.196.208:1194
2023-08-21 03:15:07 TLS: Initial packet from [AF_INET]3.104.196.208:1194, sid=2ddad2f9 c76c1d1f
2023-08-21 03:15:07 VERIFY OK: depth=1, CN=ChangeMe
2023-08-21 03:15:07 VERIFY KU OK
2023-08-21 03:15:07 Validating certificate extended key usage
2023-08-21 03:15:07 ++ Certificate has EKU (str) TLS Web Server Authentication, expects TLS Web Server Authentication
2023-08-21 03:15:07 VERIFY EKU OK
2023-08-21 03:15:07 VERIFY OK: depth=0, CN=server
2023-08-21 03:15:07 Control Channel: TLSv1.3, cipher TLSv1.3 TLS_AES_256_GCM_SHA384, peer certificate: 2048 bit RSA, signature: RSA-SHA256
2023-08-21 03:15:07 [server] Peer Connection Initiated with [AF_INET]3.104.196.208:1194
2023-08-21 03:15:07 TLS: move_session: dest=TM_ACTIVE src=TM_INITIAL reinit_src=1
2023-08-21 03:15:07 TLS: tls_multi_process: initial untrusted session promoted to trusted
2023-08-21 03:15:08 SENT CONTROL [server]: 'PUSH_REQUEST' (status=1)
2023-08-21 03:15:08 PUSH: Received control message: 'PUSH_REPLY,route 10.10.0.0 255.255.0.0,route 10.3.0.0 255.255.0.0,route-metric 1000,route-gateway 10.4.0.1,topology subnet,ping 5,ping-restart 120,ifconfig 10.4.18.234 255.255.128.0,peer-id 18'
2023-08-21 03:15:08 OPTIONS IMPORT: --ifconfig/up options modified
2023-08-21 03:15:08 OPTIONS IMPORT: route options modified
2023-08-21 03:15:08 OPTIONS IMPORT: route-related options modified
2023-08-21 03:15:08 OPTIONS ERROR: failed to negotiate cipher with server.  Add the server's cipher ('AES-256-CBC') to --data-ciphers (currently 'AES-256-GCM:AES-128-GCM:CHACHA20-POLY1305') if you want to connect to this server.
2023-08-21 03:15:08 ERROR: Failed to apply push options
2023-08-21 03:15:08 Failed to open tun/tap interface
2023-08-21 03:15:08 SIGUSR1[soft,process-push-msg-failed] received, process restarting
2023-08-21 03:15:08 Restart pause, 1 second(s)

이런 경우, 아래 명령어를 실행해 에러 해결 후, 다시 VPN을 연결하자.

sed -i 's/cipher AES-256-CBC/data-ciphers AES-256-CBC/' *.ovpn

연결에 성공하면 아래 그림처럼 Initialization Sequence Completed 메시지를 볼 수 있다.

Tryhackme는 가상 머신을 제공한다. Start Machine 버튼을 클릭 후 1, 2분이 지나면 IP 주소를 안내한다.

VPN 연결이 성공적으로 되었는지 확인하기 위해, 10.10.246.110에 ping을 날려보자.
성공적으로 ping이 날라간다.

이제 모든 준비가 끝났다.
각자 공부하는 룸에서 안내하는 Task를 풀어보자!

profile
하루하루 성실하게, 인생 전체는 되는대로.

0개의 댓글