-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: support keylog and pcap mode in gnutls (#654)
* basic kernel * config * user * consts * update kernel * update user * [skip ci] update code style * [skip ci] update offset.c * update keylogfile suffix * update offset.sh * [skip ci] add sudo
- Loading branch information
Showing
21 changed files
with
1,644 additions
and
103 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
#ifndef ECAPTURE_GNUTLS_3_6_12_KERN_H | ||
#define ECAPTURE_GNUTLS_3_6_12_KERN_H | ||
|
||
// version 3.6.12, 3.6.13 | ||
|
||
// gnutls_session_int->security_parameters | ||
#define GNUTLS_SESSION_INT_SECURITY_PARAMETERS 0x0 | ||
|
||
// gnutls_session_int->security_parameters.prf | ||
#define GNUTLS_SESSION_INT_SECURITY_PARAMETERS_PRF 0x18 | ||
|
||
// mac_entry_st->id | ||
#define MAC_ENTRY_ST_ID 0x18 | ||
|
||
// gnutls_session_int->security_parameters.client_random | ||
#define GNUTLS_SESSION_INT_SECURITY_PARAMETERS_CLIENT_RANDOM 0x50 | ||
|
||
// gnutls_session_int->security_parameters.master_secret | ||
#define GNUTLS_SESSION_INT_SECURITY_PARAMETERS_MASTER_SECRET 0x20 | ||
|
||
// gnutls_session_int->key.proto.tls13.hs_ckey | ||
#define GNUTLS_SESSION_INT_KEY_PROTO_TLS13_HS_CKEY 0x14d4 | ||
|
||
// gnutls_session_int->key.proto.tls13.hs_skey | ||
#define GNUTLS_SESSION_INT_KEY_PROTO_TLS13_HS_SKEY 0x1514 | ||
|
||
// gnutls_session_int->key.proto.tls13.ap_ckey | ||
#define GNUTLS_SESSION_INT_KEY_PROTO_TLS13_AP_CKEY 0x1554 | ||
|
||
// gnutls_session_int->key.proto.tls13.ap_skey | ||
#define GNUTLS_SESSION_INT_KEY_PROTO_TLS13_AP_SKEY 0x1594 | ||
|
||
// gnutls_session_int->key.proto.tls13.ap_expkey | ||
#define GNUTLS_SESSION_INT_KEY_PROTO_TLS13_AP_EXPKEY 0x15d4 | ||
|
||
// security_parameters_st->pversion | ||
#define SECURITY_PARAMETERS_ST_PVERSION 0xf8 | ||
|
||
// version_entry_st->id | ||
#define VERSION_ENTRY_ST_ID 0x8 | ||
|
||
#include "gnutls.h" | ||
#include "gnutls_masterkey.h" | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
#ifndef ECAPTURE_GNUTLS_3_6_14_KERN_H | ||
#define ECAPTURE_GNUTLS_3_6_14_KERN_H | ||
|
||
// version 3.6.14, 3.6.15, 3.6.16 | ||
|
||
// gnutls_session_int->security_parameters | ||
#define GNUTLS_SESSION_INT_SECURITY_PARAMETERS 0x0 | ||
|
||
// gnutls_session_int->security_parameters.prf | ||
#define GNUTLS_SESSION_INT_SECURITY_PARAMETERS_PRF 0x18 | ||
|
||
// mac_entry_st->id | ||
#define MAC_ENTRY_ST_ID 0x18 | ||
|
||
// gnutls_session_int->security_parameters.client_random | ||
#define GNUTLS_SESSION_INT_SECURITY_PARAMETERS_CLIENT_RANDOM 0x50 | ||
|
||
// gnutls_session_int->security_parameters.master_secret | ||
#define GNUTLS_SESSION_INT_SECURITY_PARAMETERS_MASTER_SECRET 0x20 | ||
|
||
// gnutls_session_int->key.proto.tls13.hs_ckey | ||
#define GNUTLS_SESSION_INT_KEY_PROTO_TLS13_HS_CKEY 0x17e4 | ||
|
||
// gnutls_session_int->key.proto.tls13.hs_skey | ||
#define GNUTLS_SESSION_INT_KEY_PROTO_TLS13_HS_SKEY 0x1824 | ||
|
||
// gnutls_session_int->key.proto.tls13.ap_ckey | ||
#define GNUTLS_SESSION_INT_KEY_PROTO_TLS13_AP_CKEY 0x1864 | ||
|
||
// gnutls_session_int->key.proto.tls13.ap_skey | ||
#define GNUTLS_SESSION_INT_KEY_PROTO_TLS13_AP_SKEY 0x18a4 | ||
|
||
// gnutls_session_int->key.proto.tls13.ap_expkey | ||
#define GNUTLS_SESSION_INT_KEY_PROTO_TLS13_AP_EXPKEY 0x18e4 | ||
|
||
// security_parameters_st->pversion | ||
#define SECURITY_PARAMETERS_ST_PVERSION 0xf8 | ||
|
||
// version_entry_st->id | ||
#define VERSION_ENTRY_ST_ID 0x8 | ||
|
||
#include "gnutls.h" | ||
#include "gnutls_masterkey.h" | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
#ifndef ECAPTURE_GNUTLS_3_7_0_KERN_H | ||
#define ECAPTURE_GNUTLS_3_7_0_KERN_H | ||
|
||
// version 3.7.0, 3.7.1, 3.7.2 | ||
|
||
// gnutls_session_int->security_parameters | ||
#define GNUTLS_SESSION_INT_SECURITY_PARAMETERS 0x0 | ||
|
||
// gnutls_session_int->security_parameters.prf | ||
#define GNUTLS_SESSION_INT_SECURITY_PARAMETERS_PRF 0x18 | ||
|
||
// mac_entry_st->id | ||
#define MAC_ENTRY_ST_ID 0x18 | ||
|
||
// gnutls_session_int->security_parameters.client_random | ||
#define GNUTLS_SESSION_INT_SECURITY_PARAMETERS_CLIENT_RANDOM 0x50 | ||
|
||
// gnutls_session_int->security_parameters.master_secret | ||
#define GNUTLS_SESSION_INT_SECURITY_PARAMETERS_MASTER_SECRET 0x20 | ||
|
||
// gnutls_session_int->key.proto.tls13.hs_ckey | ||
#define GNUTLS_SESSION_INT_KEY_PROTO_TLS13_HS_CKEY 0x1804 | ||
|
||
// gnutls_session_int->key.proto.tls13.hs_skey | ||
#define GNUTLS_SESSION_INT_KEY_PROTO_TLS13_HS_SKEY 0x1844 | ||
|
||
// gnutls_session_int->key.proto.tls13.ap_ckey | ||
#define GNUTLS_SESSION_INT_KEY_PROTO_TLS13_AP_CKEY 0x1884 | ||
|
||
// gnutls_session_int->key.proto.tls13.ap_skey | ||
#define GNUTLS_SESSION_INT_KEY_PROTO_TLS13_AP_SKEY 0x18c4 | ||
|
||
// gnutls_session_int->key.proto.tls13.ap_expkey | ||
#define GNUTLS_SESSION_INT_KEY_PROTO_TLS13_AP_EXPKEY 0x1904 | ||
|
||
// security_parameters_st->pversion | ||
#define SECURITY_PARAMETERS_ST_PVERSION 0xf8 | ||
|
||
// version_entry_st->id | ||
#define VERSION_ENTRY_ST_ID 0x8 | ||
|
||
#include "gnutls.h" | ||
#include "gnutls_masterkey.h" | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
#ifndef ECAPTURE_GNUTLS_3_7_3_KERN_H | ||
#define ECAPTURE_GNUTLS_3_7_3_KERN_H | ||
|
||
// version 3.7.3, 3.7.4, 3.7.5, 3.7.6 | ||
|
||
// gnutls_session_int->security_parameters | ||
#define GNUTLS_SESSION_INT_SECURITY_PARAMETERS 0x0 | ||
|
||
// gnutls_session_int->security_parameters.prf | ||
#define GNUTLS_SESSION_INT_SECURITY_PARAMETERS_PRF 0x18 | ||
|
||
// mac_entry_st->id | ||
#define MAC_ENTRY_ST_ID 0x18 | ||
|
||
// gnutls_session_int->security_parameters.client_random | ||
#define GNUTLS_SESSION_INT_SECURITY_PARAMETERS_CLIENT_RANDOM 0x50 | ||
|
||
// gnutls_session_int->security_parameters.master_secret | ||
#define GNUTLS_SESSION_INT_SECURITY_PARAMETERS_MASTER_SECRET 0x20 | ||
|
||
// gnutls_session_int->key.proto.tls13.hs_ckey | ||
#define GNUTLS_SESSION_INT_KEY_PROTO_TLS13_HS_CKEY 0x180c | ||
|
||
// gnutls_session_int->key.proto.tls13.hs_skey | ||
#define GNUTLS_SESSION_INT_KEY_PROTO_TLS13_HS_SKEY 0x184c | ||
|
||
// gnutls_session_int->key.proto.tls13.ap_ckey | ||
#define GNUTLS_SESSION_INT_KEY_PROTO_TLS13_AP_CKEY 0x188c | ||
|
||
// gnutls_session_int->key.proto.tls13.ap_skey | ||
#define GNUTLS_SESSION_INT_KEY_PROTO_TLS13_AP_SKEY 0x18cc | ||
|
||
// gnutls_session_int->key.proto.tls13.ap_expkey | ||
#define GNUTLS_SESSION_INT_KEY_PROTO_TLS13_AP_EXPKEY 0x190c | ||
|
||
// security_parameters_st->pversion | ||
#define SECURITY_PARAMETERS_ST_PVERSION 0xf8 | ||
|
||
// version_entry_st->id | ||
#define VERSION_ENTRY_ST_ID 0x8 | ||
|
||
#include "gnutls.h" | ||
#include "gnutls_masterkey.h" | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#ifndef ECAPTURE_GNUTLS_3_7_7_KERN_H | ||
#define ECAPTURE_GNUTLS_3_7_7_KERN_H | ||
|
||
// version 3.7.7, 3.7.8, 3.7.9, 3.7.10, 3.7.11 | ||
// version 3.8.0, 3.8.1, 3.8.2, 3.8.3 | ||
|
||
// gnutls_session_int->security_parameters | ||
#define GNUTLS_SESSION_INT_SECURITY_PARAMETERS 0x0 | ||
|
||
// gnutls_session_int->security_parameters.prf | ||
#define GNUTLS_SESSION_INT_SECURITY_PARAMETERS_PRF 0x18 | ||
|
||
// mac_entry_st->id | ||
#define MAC_ENTRY_ST_ID 0x18 | ||
|
||
// gnutls_session_int->security_parameters.client_random | ||
#define GNUTLS_SESSION_INT_SECURITY_PARAMETERS_CLIENT_RANDOM 0x50 | ||
|
||
// gnutls_session_int->security_parameters.master_secret | ||
#define GNUTLS_SESSION_INT_SECURITY_PARAMETERS_MASTER_SECRET 0x20 | ||
|
||
// gnutls_session_int->key.proto.tls13.hs_ckey | ||
#define GNUTLS_SESSION_INT_KEY_PROTO_TLS13_HS_CKEY 0x1794 | ||
|
||
// gnutls_session_int->key.proto.tls13.hs_skey | ||
#define GNUTLS_SESSION_INT_KEY_PROTO_TLS13_HS_SKEY 0x17d4 | ||
|
||
// gnutls_session_int->key.proto.tls13.ap_ckey | ||
#define GNUTLS_SESSION_INT_KEY_PROTO_TLS13_AP_CKEY 0x1814 | ||
|
||
// gnutls_session_int->key.proto.tls13.ap_skey | ||
#define GNUTLS_SESSION_INT_KEY_PROTO_TLS13_AP_SKEY 0x1854 | ||
|
||
// gnutls_session_int->key.proto.tls13.ap_expkey | ||
#define GNUTLS_SESSION_INT_KEY_PROTO_TLS13_AP_EXPKEY 0x1894 | ||
|
||
// security_parameters_st->pversion | ||
#define SECURITY_PARAMETERS_ST_PVERSION 0xf8 | ||
|
||
// version_entry_st->id | ||
#define VERSION_ENTRY_ST_ID 0x8 | ||
|
||
#include "gnutls.h" | ||
#include "gnutls_masterkey.h" | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
#ifndef ECAPTURE_GNUTLS_3_8_4_KERN_H | ||
#define ECAPTURE_GNUTLS_3_8_4_KERN_H | ||
|
||
// version 3.8.4, 3.8.5, 3.8.6 | ||
|
||
// gnutls_session_int->security_parameters | ||
#define GNUTLS_SESSION_INT_SECURITY_PARAMETERS 0x0 | ||
|
||
// gnutls_session_int->security_parameters.prf | ||
#define GNUTLS_SESSION_INT_SECURITY_PARAMETERS_PRF 0x18 | ||
|
||
// mac_entry_st->id | ||
#define MAC_ENTRY_ST_ID 0x18 | ||
|
||
// gnutls_session_int->security_parameters.client_random | ||
#define GNUTLS_SESSION_INT_SECURITY_PARAMETERS_CLIENT_RANDOM 0x50 | ||
|
||
// gnutls_session_int->security_parameters.master_secret | ||
#define GNUTLS_SESSION_INT_SECURITY_PARAMETERS_MASTER_SECRET 0x20 | ||
|
||
// gnutls_session_int->key.proto.tls13.hs_ckey | ||
#define GNUTLS_SESSION_INT_KEY_PROTO_TLS13_HS_CKEY 0x17dc | ||
|
||
// gnutls_session_int->key.proto.tls13.hs_skey | ||
#define GNUTLS_SESSION_INT_KEY_PROTO_TLS13_HS_SKEY 0x181c | ||
|
||
// gnutls_session_int->key.proto.tls13.ap_ckey | ||
#define GNUTLS_SESSION_INT_KEY_PROTO_TLS13_AP_CKEY 0x185c | ||
|
||
// gnutls_session_int->key.proto.tls13.ap_skey | ||
#define GNUTLS_SESSION_INT_KEY_PROTO_TLS13_AP_SKEY 0x189c | ||
|
||
// gnutls_session_int->key.proto.tls13.ap_expkey | ||
#define GNUTLS_SESSION_INT_KEY_PROTO_TLS13_AP_EXPKEY 0x18dc | ||
|
||
// security_parameters_st->pversion | ||
#define SECURITY_PARAMETERS_ST_PVERSION 0xf8 | ||
|
||
// version_entry_st->id | ||
#define VERSION_ENTRY_ST_ID 0x8 | ||
|
||
#include "gnutls.h" | ||
#include "gnutls_masterkey.h" | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
#ifndef ECAPTURE_GNUTLS_3_8_7_KERN_H | ||
#define ECAPTURE_GNUTLS_3_8_7_KERN_H | ||
|
||
// version 3.8.7 | ||
|
||
// gnutls_session_int->security_parameters | ||
#define GNUTLS_SESSION_INT_SECURITY_PARAMETERS 0x0 | ||
|
||
// gnutls_session_int->security_parameters.prf | ||
#define GNUTLS_SESSION_INT_SECURITY_PARAMETERS_PRF 0x18 | ||
|
||
// mac_entry_st->id | ||
#define MAC_ENTRY_ST_ID 0x18 | ||
|
||
// gnutls_session_int->security_parameters.client_random | ||
#define GNUTLS_SESSION_INT_SECURITY_PARAMETERS_CLIENT_RANDOM 0x50 | ||
|
||
// gnutls_session_int->security_parameters.master_secret | ||
#define GNUTLS_SESSION_INT_SECURITY_PARAMETERS_MASTER_SECRET 0x20 | ||
|
||
// gnutls_session_int->key.proto.tls13.hs_ckey | ||
#define GNUTLS_SESSION_INT_KEY_PROTO_TLS13_HS_CKEY 0x19d4 | ||
|
||
// gnutls_session_int->key.proto.tls13.hs_skey | ||
#define GNUTLS_SESSION_INT_KEY_PROTO_TLS13_HS_SKEY 0x1a14 | ||
|
||
// gnutls_session_int->key.proto.tls13.ap_ckey | ||
#define GNUTLS_SESSION_INT_KEY_PROTO_TLS13_AP_CKEY 0x1a54 | ||
|
||
// gnutls_session_int->key.proto.tls13.ap_skey | ||
#define GNUTLS_SESSION_INT_KEY_PROTO_TLS13_AP_SKEY 0x1a94 | ||
|
||
// gnutls_session_int->key.proto.tls13.ap_expkey | ||
#define GNUTLS_SESSION_INT_KEY_PROTO_TLS13_AP_EXPKEY 0x1ad4 | ||
|
||
// security_parameters_st->pversion | ||
#define SECURITY_PARAMETERS_ST_PVERSION 0xf8 | ||
|
||
// version_entry_st->id | ||
#define VERSION_ENTRY_ST_ID 0x8 | ||
|
||
#include "gnutls.h" | ||
#include "gnutls_masterkey.h" | ||
|
||
#endif |
Oops, something went wrong.