mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-18 19:41:01 -05:00
New logging mode, which records the exact bytes sent over the wire
in an SSH connection _in addition_ to the decrypted packets. This will hopefully come in useful for debugging wire data corruption issues: you can strace the server, enable this mode in the client, and compare the sent and received data. I'd _like_ to have this mode also log Diffie-Hellman private exponents, session IDs, encryption and MAC keys, so that the resulting log file could be used to independently verify the correctness of all cryptographic operations performed by PuTTY. However, I haven't been able to convince myself that the security implications are acceptable. (It doesn't matter that this information would permit an attacker to decrypt the session, because the _already_ decrypted session is stored alongside it in the log file. And I'm not planning, under any circumstances, to log users' private keys. But gaining access to the log file while the session was still running would permit an attacker to _hijack_ the session, and that's the iffy bit.) [originally from svn r6835]
This commit is contained in:
22
config.c
22
config.c
@ -1171,20 +1171,24 @@ void setup_config_box(struct controlbox *b, int midsession,
|
||||
* logging can sensibly be available.
|
||||
*/
|
||||
{
|
||||
char *sshlogname;
|
||||
char *sshlogname, *sshrawlogname;
|
||||
if ((midsession && protocol == PROT_SSH) ||
|
||||
(!midsession && backends[3].name != NULL))
|
||||
sshlogname = "Log SSH packet data";
|
||||
else
|
||||
sshlogname = NULL; /* this will disable the button */
|
||||
ctrl_radiobuttons(s, "Session logging:", NO_SHORTCUT, 1,
|
||||
(!midsession && backends[3].name != NULL)) {
|
||||
sshlogname = "SSH packets";
|
||||
sshrawlogname = "SSH packets and raw data";
|
||||
} else {
|
||||
sshlogname = NULL; /* this will disable both buttons */
|
||||
sshrawlogname = NULL; /* this will just placate optimisers */
|
||||
}
|
||||
ctrl_radiobuttons(s, "Session logging:", NO_SHORTCUT, 2,
|
||||
HELPCTX(logging_main),
|
||||
loggingbuttons_handler,
|
||||
I(offsetof(Config, logtype)),
|
||||
"Logging turned off completely", 't', I(LGTYP_NONE),
|
||||
"Log printable output only", 'p', I(LGTYP_ASCII),
|
||||
"Log all session output", 'l', I(LGTYP_DEBUG),
|
||||
"None", 't', I(LGTYP_NONE),
|
||||
"Printable output", 'p', I(LGTYP_ASCII),
|
||||
"All session output", 'l', I(LGTYP_DEBUG),
|
||||
sshlogname, 's', I(LGTYP_PACKETS),
|
||||
sshrawlogname, 'r', I(LGTYP_SSHRAW),
|
||||
NULL);
|
||||
}
|
||||
ctrl_filesel(s, "Log file name:", 'f',
|
||||
|
Reference in New Issue
Block a user