mirror of
https://github.com/zeek/zeek.git
synced 2025-10-05 08:08:19 +00:00
Fix problem with extracting FTP passwords.
- Added "ftpuser" as another anonymous username. - Problem discovered by Patrik Lundin.
This commit is contained in:
parent
3f1811afd2
commit
6e2205aa68
1 changed files with 6 additions and 2 deletions
|
@ -22,7 +22,7 @@ export {
|
||||||
const default_capture_password = F &redef;
|
const default_capture_password = F &redef;
|
||||||
|
|
||||||
## User IDs that can be considered "anonymous".
|
## User IDs that can be considered "anonymous".
|
||||||
const guest_ids = { "anonymous", "ftp", "guest" } &redef;
|
const guest_ids = { "anonymous", "ftp", "ftpuser", "guest" } &redef;
|
||||||
|
|
||||||
type Info: record {
|
type Info: record {
|
||||||
## Time when the command was sent.
|
## Time when the command was sent.
|
||||||
|
@ -160,8 +160,12 @@ function ftp_message(s: Info)
|
||||||
# or it's a deliberately logged command.
|
# or it's a deliberately logged command.
|
||||||
if ( |s$tags| > 0 || (s?$cmdarg && s$cmdarg$cmd in logged_commands) )
|
if ( |s$tags| > 0 || (s?$cmdarg && s$cmdarg$cmd in logged_commands) )
|
||||||
{
|
{
|
||||||
if ( s?$password && to_lower(s$user) !in guest_ids )
|
if ( s?$password &&
|
||||||
|
!s$capture_password &&
|
||||||
|
to_lower(s$user) !in guest_ids )
|
||||||
|
{
|
||||||
s$password = "<hidden>";
|
s$password = "<hidden>";
|
||||||
|
}
|
||||||
|
|
||||||
local arg = s$cmdarg$arg;
|
local arg = s$cmdarg$arg;
|
||||||
if ( s$cmdarg$cmd in file_cmds )
|
if ( s$cmdarg$cmd in file_cmds )
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue