<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Range Discovery Tool Archives - Tech Chronicles</title>
	<atom:link href="http://kostacipo.stream/tag/range-discovery-tool/feed/" rel="self" type="application/rss+xml" />
	<link>http://kostacipo.stream/tag/range-discovery-tool/</link>
	<description>Ramblings of a Tech Dude</description>
	<lastBuildDate>Sun, 02 Jun 2024 21:50:19 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.2</generator>

<image>
	<url>https://kostacipo.stream/wp-content/uploads/2019/12/cropped-profile-32x32.jpg</url>
	<title>Range Discovery Tool Archives - Tech Chronicles</title>
	<link>http://kostacipo.stream/tag/range-discovery-tool/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>HardCIDR – Network CIDR and Range Discovery Tool</title>
		<link>http://kostacipo.stream/hardcidr-network-cidr-and-range-discovery-tool/</link>
					<comments>http://kostacipo.stream/hardcidr-network-cidr-and-range-discovery-tool/#respond</comments>
		
		<dc:creator><![CDATA[Majordomo]]></dc:creator>
		<pubDate>Sun, 02 Jun 2024 21:50:19 +0000</pubDate>
				<category><![CDATA[Exploitation Tools]]></category>
		<category><![CDATA[Networks]]></category>
		<category><![CDATA[Network CIDR]]></category>
		<category><![CDATA[Range Discovery Tool]]></category>
		<guid isPermaLink="false">https://kostacipo.stream/?p=2210</guid>

					<description><![CDATA[<p>hardCIDR Background A Linux Bash script to discover the netblocks, or ranges, (in CIDR notation) owned by the target organization during the intelligence gathering phase of a penetration test. This information is maintained by the five Regional Internet Registries (RIRs): ARIN (North America) RIPE (Europe/Asia/Middle East) APNIC (Asia/Pacific) LACNIC (Latin America) AfriNIC (Africa) In addition [&#8230;]</p>
<p>The post <a href="http://kostacipo.stream/hardcidr-network-cidr-and-range-discovery-tool/">HardCIDR – Network CIDR and Range Discovery Tool</a> appeared first on <a href="http://kostacipo.stream">Tech Chronicles</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div class="markdown-heading" dir="auto">
<h1 class="heading-element" dir="auto" tabindex="-1">hardCIDR</h1>
</div>
<div class="markdown-heading" dir="auto">
<h2 class="heading-element" dir="auto" tabindex="-1">Background</h2>
</div>
<p dir="auto">A Linux Bash script to discover the netblocks, or ranges, (in CIDR notation) owned by the target organization during the intelligence gathering phase of a penetration test. This information is maintained by the five Regional Internet Registries (RIRs):</p>
<p dir="auto"><em>ARIN</em> (North America)<br />
<em>RIPE</em> (Europe/Asia/Middle East)<br />
<em>APNIC</em> (Asia/Pacific)<br />
<em>LACNIC</em> (Latin America)<br />
<em>AfriNIC</em> (Africa)</p>
<p dir="auto">In addition to netblocks and IP addresses, Autonomous System Numbers (ASNs) are also of interest. ASNs are used as part of the Border Gateway Protocol (BGP) for uniquely identifying each network on the Internet. Target organizations may have their own ASNs due to the size of their network or as a result of redundant service paths from peered service providers. These ASNs will reveal additional netblocks owned by the organization.</p>
<div class="markdown-heading" dir="auto">
<h2 class="heading-element" dir="auto" tabindex="-1">Requirements</h2>
</div>
<p dir="auto">ipcalc (for RIPE, APNIC, LACNIC, AfriNIC queries)</p>
<div class="markdown-heading" dir="auto">
<h2 class="heading-element" dir="auto" tabindex="-1">LACNIC</h2>
</div>
<p dir="auto">A note on LACNIC before diving into the usage. LACNIC only allows query of either network range, ASN, Org Handle, or PoC Handle. This does not help us in locating these values based upon the organization name. They do however publish a list of all assigned ranges on a publically accessible FTP server, along with their rate-limiting thresholds. So, there is an accompanying data file, which the script checks for, used to perform LACNIC queries locally. The script includes an update option <strong>-r</strong>, that can be used to update this data on an interval of your choosing. Approximate run time is just shy of 28 hours.</p>
<div class="markdown-heading" dir="auto">
<h2 class="heading-element" dir="auto" tabindex="-1">Usage</h2>
</div>
<p dir="auto">The script with no specified options will query ARIN and a pool of BGP route servers. The route server is selected at random at runtime. The <strong>-h</strong> option lists the help:</p>
<p dir="auto"><a href="https://camo.githubusercontent.com/33d13d755adc7bf86d0a6304ba7272e98a4ce9d68016300ebbd605afaf124ca2/68747470733a2f2f7777772e747275737465647365632e636f6d2f77702d636f6e74656e742f75706c6f6164732f323031372f30332f696d67312e706e67" target="_blank" rel="noopener noreferrer nofollow"><img decoding="async" src="https://camo.githubusercontent.com/33d13d755adc7bf86d0a6304ba7272e98a4ce9d68016300ebbd605afaf124ca2/68747470733a2f2f7777772e747275737465647365632e636f6d2f77702d636f6e74656e742f75706c6f6164732f323031372f30332f696d67312e706e67" alt="" data-canonical-src="https://www.trustedsec.com/wp-content/uploads/2017/03/img1.png" /></a></p>
<p dir="auto">The options may be used in any combination, all, or none. Unfortunately, none of the “other” RIRs note the actual CIDR notation of the range, so <code>ipcalc</code> is used to perform this function. If it is not installed on your system, the script will install it for you.</p>
<p dir="auto">At the prompts, enter the organization name, the email domain, and whether country codes are used as part of the email. If answered <strong>Y</strong> to country codes, you will be prompted as to whether they precede the domain name or are appended to the TLD. A directory will be created for the output files in /tmp/. If the directory is found to exist, you will be prompted whether to overwrite. If answered <strong>N</strong>, a time stamp will be appended to the directory name.</p>
<p dir="auto"><a href="https://camo.githubusercontent.com/8ddd1a77d8860117f3be417056d9855cd09a26c1e6e62d0059bead7a329aa583/68747470733a2f2f7777772e747275737465647365632e636f6d2f77702d636f6e74656e742f75706c6f6164732f323031372f30332f696d67322e706e67" target="_blank" rel="noopener noreferrer nofollow"><img decoding="async" src="https://camo.githubusercontent.com/8ddd1a77d8860117f3be417056d9855cd09a26c1e6e62d0059bead7a329aa583/68747470733a2f2f7777772e747275737465647365632e636f6d2f77702d636f6e74656e742f75706c6f6164732f323031372f30332f696d67322e706e67" alt="" data-canonical-src="https://www.trustedsec.com/wp-content/uploads/2017/03/img2.png" /></a></p>
<p dir="auto">The script queries each RIR, as well as a BGP route server, prompting along the way as to whether records were located. Upon completion, three files will be generated: a CSV based on Org Handle, a CSV based on PoC Handle, and a line delimited file of all located raanges in CIDR notation.</p>
<p dir="auto"><a href="https://camo.githubusercontent.com/d0b5b2b09ee476dc980ff7b63a33b578f225db2c9076c54b3fe3c9fb64d41a74/68747470733a2f2f7777772e747275737465647365632e636f6d2f77702d636f6e74656e742f75706c6f6164732f323031372f30332f696d67332e706e67" target="_blank" rel="noopener noreferrer nofollow"><img decoding="async" src="https://camo.githubusercontent.com/d0b5b2b09ee476dc980ff7b63a33b578f225db2c9076c54b3fe3c9fb64d41a74/68747470733a2f2f7777772e747275737465647365632e636f6d2f77702d636f6e74656e742f75706c6f6164732f323031372f30332f696d67332e706e67" alt="" data-canonical-src="https://www.trustedsec.com/wp-content/uploads/2017/03/img3.png" /></a></p>
<p dir="auto">Cancelling the script at any time will remove any temporary working files and the directory created for the resultant output files.</p>
<p dir="auto"><a href="https://camo.githubusercontent.com/e7a2ec184f748d383fb88d2c946419f768f34eafaa992fcd1c49ecfba269b40e/68747470733a2f2f7777772e747275737465647365632e636f6d2f77702d636f6e74656e742f75706c6f6164732f323031372f30332f696d67342e706e67" target="_blank" rel="noopener noreferrer nofollow"><img decoding="async" src="https://camo.githubusercontent.com/e7a2ec184f748d383fb88d2c946419f768f34eafaa992fcd1c49ecfba269b40e/68747470733a2f2f7777772e747275737465647365632e636f6d2f77702d636f6e74656e742f75706c6f6164732f323031372f30332f696d67342e706e67" alt="" data-canonical-src="https://www.trustedsec.com/wp-content/uploads/2017/03/img4.png" /></a></p>
<p dir="auto">It should be noted that, due to similarity in some organization names, you could get back results not related to the target. The CSV files will provide the associated handles and URLs for further validation where necessary. It is also possible that employees of the target organization used their corporate email address to register their own domains. These will be found within the results as well.</p>
<div class="markdown-heading" dir="auto">
<h2 class="heading-element" dir="auto" tabindex="-1">Running with Docker</h2>
</div>
<pre class="notranslate"><code>docker build -t hardcidr .
</code></pre>
<p dir="auto">Building the hardcidr image</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto">
<pre class="notranslate"><code>docker run -v $(pwd):/tmp -it hardcidr
</code></pre>
</div>
<p>Running the container. Output will be saved to current directory</p>
<p>The post <a href="http://kostacipo.stream/hardcidr-network-cidr-and-range-discovery-tool/">HardCIDR – Network CIDR and Range Discovery Tool</a> appeared first on <a href="http://kostacipo.stream">Tech Chronicles</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>http://kostacipo.stream/hardcidr-network-cidr-and-range-discovery-tool/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
