I love going to Costco but I hate the toxic LEDs. They’re mutating my 5$ rotisserie chickens and making me ingest red particles. Not a fan. 5 big dooms.
Which IP addresses attempted to login to the victim machine? List the addresses numerically, least to greatest, comma-separated. Wrap the addresses in sillyCTF{}. For example, if the addresses 1.2.3.4 and 1.2.3.5 attempted to log in, your flag would be sillyCTF
eb 20 20:33:15 ubuntu-virtual-machine sudo: root : TTY=pts/1 ; PWD=/var/log ; USER=root ; COMMAND=/usr/bin/echo Feb 20 20:33:15 ubuntu-virtual-machine sudo: pam_unix(sudo:session): session opened for user root(uid=0) by ubuntu(uid=0) Feb 20 20:33:15 ubuntu-virtual-machine sudo: pam_unix(sudo:session): session closed for user root Feb 20 20:33:34 ubuntu-virtual-machine su: (to ubuntu) root on pts/1 Feb 20 20:33:34 ubuntu-virtual-machine su: pam_unix(su:session): session opened for user ubuntu(uid=1000) by ubuntu(uid=0) Feb 20 20:35:01 ubuntu-virtual-machine CRON[2484]: pam_unix(cron:session): session opened for user observium(uid=1005) by (uid=0) Feb 20 20:35:01 ubuntu-virtual-machine CRON[2485]: pam_unix(cron:session): session opened for user observium(uid=1005) by (uid=0) Feb 20 20:35:03 ubuntu-virtual-machine CRON[2485]: pam_unix(cron:session): session closed for user observium Feb 20 20:35:07 ubuntu-virtual-machine CRON[2484]: pam_unix(cron:session): session closed for user observium Feb 20 20:36:06 ubuntu-virtual-machine sshd[2723]: Connection closed by 192.168.64.131 port 37496 [preauth] Feb 20 20:36:25 ubuntu-virtual-machine sshd[2763]: Connection closed by 192.168.64.131 port 60714 [preauth] Feb 20 20:36:57 ubuntu-virtual-machine sshd[2767]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=192.168.64.131 user=ubuntu Feb 20 20:36:59 ubuntu-virtual-machine sshd[2767]: Failed password for ubuntu from 192.168.64.131 port 48446 ssh2 Feb 20 20:37:05 ubuntu-virtual-machine sshd[2767]: Failed password for ubuntu from 192.168.64.131 port 48446 ssh2 Feb 20 20:37:09 ubuntu-virtual-machine sshd[2767]: Failed password for ubuntu from 192.168.64.131 port 48446 ssh2 Feb 20 20:37:09 ubuntu-virtual-machine sshd[2767]: Connection closed by authenticating user ubuntu 192.168.64.131 port 48446 [preauth] Feb 20 20:37:09 ubuntu-virtual-machine sshd[2767]: PAM 2 more authentication failures; logname= uid=0 euid=0 tty=ssh ruser= rhost=192.168.64.131 user=ubuntu Feb 20 20:39:01 ubuntu-virtual-machine CRON[2772]: pam_unix(cron:session): session opened for user root(uid=0) by (uid=0) Feb 20 20:39:01 ubuntu-virtual-machine CRON[2772]: pam_unix(cron:session): session closed for user root Feb 20 20:40:01 ubuntu-virtual-machine CRON[2823]: pam_unix(cron:session): session opened for user observium(uid=1005) by (uid=0) Feb 20 20:40:01 ubuntu-virtual-machine CRON[2824]: pam_unix(cron:session): session opened for user observium(uid=1005) by (uid=0) Feb 20 20:40:02 ubuntu-virtual-machine CRON[2824]: pam_unix(cron:session): session closed for user observium Feb 20 20:40:06 ubuntu-virtual-machine CRON[2823]: pam_unix(cron:session): session closed for user observium Feb 20 20:41:34 ubuntu-virtual-machine sshd[3114]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=192.168.64.131 user=ubuntu
# 读取日志文件并提取所有 IP 地址 defextract_all_ips_from_log(log_file): ip_list = [] withopen(log_file, 'r') as file: for line in file: matches = ip_pattern.findall(line) if matches: ip_list.extend(matches) return ip_list
# 统计 IP 地址出现次数 defcount_ip_occurrences(ip_list): ip_counter = Counter(ip_list) return ip_counter