]> git.feebdaed.xyz Git - linuxyz.git/commitdiff
mitm comment
authorseantywork <seantywork@gmail.com>
Wed, 4 Jun 2025 00:28:21 +0000 (09:28 +0900)
committerseantywork <seantywork@gmail.com>
Wed, 4 Jun 2025 00:28:21 +0000 (09:28 +0900)
mitm-tls/2506-02.xyz.md

index 027108f2e7d3d2adccb2acb0ba5ab486c9895915..aa101739469d9a54a6ff9cc905f3472878b6e930 100644 (file)
@@ -4,6 +4,33 @@
 
 ./setup.sh
 
+```
+
+#
+
+
+```shell
+
+----------------------------------------------------
+|                                                  |      
+|                 hacker's router                  | 
+|                                                  |
+|  -----------------          ----------------     |
+|  |   vet11       |          |  veth21      |     |
+|  | 192.168.62.5  |          | 192.168.64.5 |     |
+|  |    mitm'd ðŸ˜ˆ  |          |              |     |
+----------------------------------------------------
+         |                           |
+         |                           |
+         |                           |
+  -----------------           ----------------
+  |   veth12      |           |  veth22      |
+  |  192.168.62.6 |           | 192.168.64.6 |
+  |    client     |           |  server      |
+  -----------------           ----------------
+
+
+
 ```
 
 #
@@ -22,11 +49,37 @@ sudo ip netns exec net1 openssl s_client -connect 192.168.64.6:9999 -CAfile ./ce
 #
 
 ```shell
+...
 SSL-Session:
     Protocol  : TLSv1.2
     Cipher    : AES256-SHA256
+...
+```
+
+#
+
+```c
+
+int hijack_key();
+
+
 ```
 
+#
+
+```c
+    int dec_len = RSA_private_decrypt(
+                data_len,
+                (unsigned char*)premaster_raw,
+                dec_msg,
+                rsa_priv_key,
+                RSA_PKCS1_PADDING
+                );
+
+
+```
+
+
 #
 
 ```shell
@@ -55,6 +108,7 @@ SSL-Session:
 
 ```
 
+#
 
 ```c
 /*
@@ -188,6 +242,7 @@ The "session_hash" is intended to encompass all relevant session
 ...
 ```
 
+
 #
 
 ```shell