<?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>Projects &#8211; Adwiteeya Agrawal | Home</title>
	<atom:link href="https://adwiteeya.com/category/projects/feed/" rel="self" type="application/rss+xml" />
	<link>https://adwiteeya.com</link>
	<description>Security fanatic. Reverse Engineer and Web App Specialist.</description>
	<lastBuildDate>Tue, 03 Dec 2013 07:53:46 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0.7</generator>
	<item>
		<title>Code Obfusction &#124; Writing a VM</title>
		<link>https://adwiteeya.com/code-obfusction-writing-a-vm/</link>
					<comments>https://adwiteeya.com/code-obfusction-writing-a-vm/#comments</comments>
		
		<dc:creator><![CDATA[Adwiteeya Agrawal]]></dc:creator>
		<pubDate>Tue, 03 Dec 2013 07:18:19 +0000</pubDate>
				<category><![CDATA[At the College]]></category>
		<category><![CDATA[Information Security]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[adwiteeya agrawal]]></category>
		<category><![CDATA[Code Obfusction]]></category>
		<category><![CDATA[OIVM]]></category>
		<category><![CDATA[Protection Against Reversing]]></category>
		<category><![CDATA[Reverse Engineering]]></category>
		<category><![CDATA[Virtual Machine in C]]></category>
		<guid isPermaLink="false">http://adwiteeya.com/blog/?p=444</guid>

					<description><![CDATA[What is this Blog About ? It is about a minor project that i recently completed. That is writing a virtual machine to slow down the process of reverse engineering. This is not a tutorial to do the same however I have included the presentation that i used during the final presentation, the PDFs for [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><strong>What is this Blog About ?</strong></p>
<p>It is about a minor project that i recently completed. That is writing a virtual machine to slow down the process of reverse engineering. This is not a tutorial to do the same however I have included the presentation that i used during the final presentation, the PDFs for System Design and Sample Runs and one step by step sample run.<span id="more-444"></span></p>
<p><strong>#Presentation</strong></p>
<p><center><br />
<iframe style="border: 1px solid #CCC; border-width: 1px 1px 0; margin-bottom: 5px;" src="http://www.slideshare.net/slideshow/embed_code/28832154" height="356" width="427" allowfullscreen="" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe></center></p>
<div style="margin-bottom: 5px; text-align: center;"><strong> <a title="OIVM" href="https://www.slideshare.net/adwiteeyaagrawal/oivm" target="_blank">OIVM</a> </strong> from <strong><a href="http://www.slideshare.net/adwiteeyaagrawal" target="_blank">Adwiteeya Agrawal</a></strong></div>
<div style="margin-bottom: 5px;"></div>
<div style="margin-bottom: 5px;"></div>
<div style="margin-bottom: 5px;"><strong>#Design</strong></div>
<div style="margin-bottom: 5px;"></div>
<p><iframe style="border: 1px solid #CCC; border-width: 1px 1px 0; margin-bottom: 5px;" src="http://www.slideshare.net/slideshow/embed_code/28832223" height="613" width="574" allowfullscreen="" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe></p>
<div style="margin-bottom: 5px;"></div>
<div style="margin-bottom: 5px;"><strong>#Implementation &#8211; Sample Runs</strong></div>
<p><iframe style="border: 1px solid #CCC; border-width: 1px 1px 0; margin-bottom: 5px;" src="http://www.slideshare.net/slideshow/embed_code/28832221" height="613" width="574" allowfullscreen="" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe></p>
<p><strong>#Code</strong></p>
<p><script src="https://gist.github.com/adwiteeya/7765256.js"></script></p>
<p><strong>#Sample Run</strong></p>
<p>In this sample run I am going to implement the POC expansion algorithm that was the final program that was written for OIVM.1. Make sure bootrom.txt and OIVM.exe are in the same folder.<br />
2. Open the Bootrom.txt using a Hex Editor (example : Hex Workshop) and write the following hex stream to it.</p>
<p><strong>3F <span style="color: #000080;">11</span> 25 <span style="color: #333399;">00</span> 2F <span style="color: #333399;">08</span> 3F <span style="color: #333399;">38</span> 3F <span style="color: #333399;">38</span> 41 <span style="color: #333399;">3D</span> 09 <span style="color: #333399;">1B</span> 3C<span style="color: #333399;"> 4C</span> <span style="color: #000000;">21<span style="color: #000080;"> 25</span> 00 <span style="color: #000080;">2F</span> 14 <span style="color: #000080;">7C</span> 67 <span style="color: #000080;">63</span> 55 <span style="color: #000080;">64</span> 61 <span style="color: #000080;">38</span> 67 <span style="color: #000080;">7C</span> 63</span> <span style="color: #000080;">38</span> 55 <span style="color: #000080;">64</span> 61 <span style="color: #000080;">38</span> 37 <span style="color: #000080;">41</span> 3D <span style="color: #000080;">15</span> C9 <span style="color: #000080;">45</span> 3F <span style="color: #000080;">11</span> 3F 12 18 <span style="color: #000080;">68</span> 3C <span style="color: #000080;">25</span> 00 <span style="color: #000080;">2F</span> 08 <span style="color: #000080;">12</span> 86 <span style="color: #000080;">C5</span> 38 <span style="color: #000080;">41</span> 3D <span style="color: #000080;">09</span> 00 <span style="color: #000080;">02</span> 04 <span style="color: #000080;">06</span> 08 </strong></p>
<p>3. Save the file. This is basically in the format of [STUB][Compressed Code]. The stub is 60 Bytes long and extends till the 0x09 in the second line of the hexadecimal stream. The parallel <strong>assembly</strong> for this code is as follows :</p>
<p><strong>[EXPANSION STUB]</strong><br />
scanf(&#8220;%d&#8221;,&amp;STACK[SP])<br />
MOV A,STACK[SP]<br />
FLAG=A-ROM[++IP]<br />
JE 8 BYTES<br />
scanf(&#8220;%d&#8221;,&amp;STACK[SP])<br />
++SP<br />
scanf(&#8220;%d&#8221;,&amp;STACK[SP])<br />
++SP<br />
&#8211;A<br />
JMP -9 BYTES<br />
MOV B,ROM[++IP] //STUB LENGTH<br />
A = fileLen<br />
A=A-B<br />
FLAG=A-ROM[++IP]<br />
JE 14 BYTES<br />
MOV C ,ROM[B]<br />
MOV D,SP<br />
MOV SP,C<br />
MOV C,STACK[SP]<br />
MOV SP,D<br />
MOV STACK[SP],C<br />
++SP<br />
MOV D,SP<br />
MOV C,ROM[B]<br />
MOV SP,C<br />
++SP<br />
MOV C,STACK[SP]<br />
MOV SP,D<br />
MOV STACK[SP],C<br />
++SP<br />
++B<br />
&#8211;A<br />
JMP -21 BYTES<br />
ROM=(char *)realloc(ROM,ROM[++IP]) //FILE EXPANDED<br />
scanf(&#8220;%d&#8221;,&amp;STACK[SP])<br />
MOV A,STACK[SP]<br />
scanf(&#8220;%d&#8221;,&amp;STACK[SP])<br />
MOV B,STACK[SP]<br />
MOV SP,B<br />
MOV C,ROM[++IP]<br />
FLAG=A-ROM[++IP]<br />
JE 8 BYTES<br />
MOV B,STACK[SP]<br />
MOV ROM[C],B<br />
++C<br />
++SP<br />
&#8211;A<br />
JMP -9 BYTES<br />
<strong>[COMPRESSED FORM]</strong><br />
00 02 04 06 08</p>
<p>4. Now run the program.If however you dont speak assembly that doesnt matter here is the <strong>algorithm</strong> for it :</p>
<p>1. Enter the Number of elements in the dictionary.<br />
2. Enter the dictionary.<br />
(Dictionary is stored on the stack)<br />
(The dictionary is looked up for values corresponding to compressed code)<br />
(The new Values are updated over the stack)<br />
3. Enter the New Size.<br />
4. Enter the SP (which could have been hardcoded as well)<br />
(The code expands)<br />
(The execution is now passed on to the expanded program)<br />
5. Enter the first element. Hit Enter.<br />
6. Enter the second element. Hit Enter.<br />
7. The sum is Displayed.<br />
8. OIVM halts.</p>
<p><strong>Results/Output</strong></p>
<p><a href="http://adwiteeya.com/wp-content/uploads/2013/12/output.png"><img loading="lazy" decoding="async" class="size-full wp-image-453 aligncenter" alt="Output" src="http://adwiteeya.com/wp-content/uploads/2013/12/output.png" width="438" height="325" srcset="https://adwiteeya.com/wp-content/uploads/2013/12/output.png 438w, https://adwiteeya.com/wp-content/uploads/2013/12/output-300x222.png 300w" sizes="auto, (max-width: 438px) 100vw, 438px" /></a>#Thanks</p>
<p><strong>Special thanks</strong> to Mr. Atul Alex Cherian, Ms. Nishtha Jatana and Ms. Kritika Sobti.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://adwiteeya.com/code-obfusction-writing-a-vm/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
		<item>
		<title>Trolling func1()</title>
		<link>https://adwiteeya.com/trolling-func1/</link>
					<comments>https://adwiteeya.com/trolling-func1/#comments</comments>
		
		<dc:creator><![CDATA[Adwiteeya Agrawal]]></dc:creator>
		<pubDate>Wed, 18 Sep 2013 05:44:28 +0000</pubDate>
				<category><![CDATA[Information Security]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[breakpoint]]></category>
		<category><![CDATA[Loader]]></category>
		<category><![CDATA[OllyDbg]]></category>
		<category><![CDATA[openprocess]]></category>
		<category><![CDATA[Return Address]]></category>
		<category><![CDATA[Reverse Engineering]]></category>
		<category><![CDATA[Reversing]]></category>
		<category><![CDATA[stack]]></category>
		<category><![CDATA[waitfordebugevent]]></category>
		<category><![CDATA[windows]]></category>
		<category><![CDATA[windows debugging]]></category>
		<guid isPermaLink="false">http://adwiteeya.com/blog/?p=418</guid>

					<description><![CDATA[A note to the technical reader : This is basically a custom loader I wrote so that i could edit the return address of functions on the stack. Hi, non technical reader. Introduction So basically this is the small program I wrote, which we are going to play with. In this program there are two [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><strong>A note to the technical reader</strong> : This is basically a custom loader I wrote so that i could edit the return address of functions on the stack.</p>
<p>Hi, non technical reader.<span id="more-418"></span></p>
<p><span style="text-decoration: underline;"><strong>Introduction</strong></span></p>
<p>So basically this is the small program I wrote, which we are going to play with. In this program there are two functions : func1() and func2(). func1() is called from main, but func2() is never called.</p>
<p><script type="text/javascript" src="https://gist.github.com/adwiteeya/6605006.js"></script>So our aim is to execute func2 at run time.Here is the first run :</p>
<p><a href="http://adwiteeya.com/wp-content/uploads/2013/09/first-run.png"><img loading="lazy" decoding="async" class="size-full wp-image-423 aligncenter" alt="first run" src="http://adwiteeya.com/wp-content/uploads/2013/09/first-run.png" width="401" height="111" srcset="https://adwiteeya.com/wp-content/uploads/2013/09/first-run.png 401w, https://adwiteeya.com/wp-content/uploads/2013/09/first-run-300x83.png 300w" sizes="auto, (max-width: 401px) 100vw, 401px" /></a></p>
<p>As you can see we do not go inside func2.</p>
<p><span style="text-decoration: underline;"><strong>Reverse Engineering solution</strong></span> The first and the lot easier approach to this is, a RE solution. In this solution i just change some return addresses on the stack and we are done. Lets go step by step.</p>
<p><strong>Step1</strong> : Loading the program in OllyDbg</p>
<p><a href="http://adwiteeya.com/wp-content/uploads/2013/09/print2-in-olly.png"><img loading="lazy" decoding="async" class="size-full wp-image-424 aligncenter" alt="print2 in olly" src="http://adwiteeya.com/wp-content/uploads/2013/09/print2-in-olly.png" width="663" height="328" srcset="https://adwiteeya.com/wp-content/uploads/2013/09/print2-in-olly.png 663w, https://adwiteeya.com/wp-content/uploads/2013/09/print2-in-olly-300x148.png 300w, https://adwiteeya.com/wp-content/uploads/2013/09/print2-in-olly-624x308.png 624w" sizes="auto, (max-width: 663px) 100vw, 663px" /></a></p>
<p>As can be seen there are three functions main, func1 and func2. These are indicated by the square brackets. The order of these functions is func1, func2 and lastly main.</p>
<p><strong>Step2</strong> : Now I am going to put a breakpoint on func1 and then observe the stack.</p>
<p><a href="http://adwiteeya.com/wp-content/uploads/2013/09/print2-hit-breakpoint.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-425" alt="print2 hit breakpoint" src="http://adwiteeya.com/wp-content/uploads/2013/09/print2-hit-breakpoint.png" width="734" height="528" srcset="https://adwiteeya.com/wp-content/uploads/2013/09/print2-hit-breakpoint.png 734w, https://adwiteeya.com/wp-content/uploads/2013/09/print2-hit-breakpoint-300x215.png 300w, https://adwiteeya.com/wp-content/uploads/2013/09/print2-hit-breakpoint-624x448.png 624w" sizes="auto, (max-width: 734px) 100vw, 734px" /></a></p>
<p>We have two images here the first one represents the assembly view of print2.cpp when i hitthe breakpoint and the second one represents the stack when I hit the breakpoint. In figure 1 it can be seen that the func1 starts at 401334 and it(the address) is in read with black background. Which indicates that we have hit the breakpoint. In figure two we can see that the return address for func1() is 0040139A. If we look up this address in the assembly dump, it is the one just after func1() is called that is 401395. Hence, things are fine here, the function always returns to the immediate expression after a call to it. So we have two deductions from here. First that the return address is 40139A which can be changed to make the func1() jump somewhere else. and secondly that this address is placed on the memory address starting 28FF0C. <strong> </strong></p>
<p><strong>Step3</strong> : Now we are going to edit 40139A to 401359 so that we can jump over to func2().</p>
<p><a href="http://adwiteeya.com/wp-content/uploads/2013/09/stck-modified.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-427" alt="stck modified" src="http://adwiteeya.com/wp-content/uploads/2013/09/stck-modified.png" width="457" height="148" srcset="https://adwiteeya.com/wp-content/uploads/2013/09/stck-modified.png 457w, https://adwiteeya.com/wp-content/uploads/2013/09/stck-modified-300x97.png 300w" sizes="auto, (max-width: 457px) 100vw, 457px" /></a></p>
<p>After the modification even the comment changes to print2.00401359, which suggests that it is call. And as expected we enter the func2().</p>
<p><a href="http://adwiteeya.com/wp-content/uploads/2013/09/func2-entered.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-428" alt="func2 entered" src="http://adwiteeya.com/wp-content/uploads/2013/09/func2-entered.png" width="712" height="328" srcset="https://adwiteeya.com/wp-content/uploads/2013/09/func2-entered.png 712w, https://adwiteeya.com/wp-content/uploads/2013/09/func2-entered-300x138.png 300w, https://adwiteeya.com/wp-content/uploads/2013/09/func2-entered-624x287.png 624w" sizes="auto, (max-width: 712px) 100vw, 712px" /></a></p>
<p>However this is not enough. In a similar way we have to edit the return address of func2 to 40139A which was the original return address of func1. Now to be able to identify where is the return address of func2, we single step through func2 till we reach RETN.</p>
<p><strong>Step4</strong> : Here the top address on the stack is the return address for the stack. We need to change this address. In order to return and exit normally.</p>
<p><a href="http://adwiteeya.com/wp-content/uploads/2013/09/func2-return.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-431" alt="func2 return" src="http://adwiteeya.com/wp-content/uploads/2013/09/func2-return.png" width="570" height="296" srcset="https://adwiteeya.com/wp-content/uploads/2013/09/func2-return.png 570w, https://adwiteeya.com/wp-content/uploads/2013/09/func2-return-300x155.png 300w" sizes="auto, (max-width: 570px) 100vw, 570px" /></a></p>
<p>As can be seen on the stack 0028FF10 is the address where the return address 00403050 is stored. We modify this and then run the program.</p>
<p><a href="http://adwiteeya.com/wp-content/uploads/2013/09/re-success.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-432" alt="re success" src="http://adwiteeya.com/wp-content/uploads/2013/09/re-success.png" width="457" height="161" srcset="https://adwiteeya.com/wp-content/uploads/2013/09/re-success.png 457w, https://adwiteeya.com/wp-content/uploads/2013/09/re-success-300x105.png 300w" sizes="auto, (max-width: 457px) 100vw, 457px" /></a></p>
<p>We are able to do it neatly. :)</p>
<p><span style="text-decoration: underline;"><strong>Program Solution</strong></span></p>
<p>Now the RE solution was though easy, it wasn&#8217;t automated, and i had no fuckin idea about how do i make a permanent modification. What i mean here is like if you want to completely change an instruction you can do that and simply save changes to the new executable. But the stack is a dynamic memory region, it is not a part of the exe file that you save. So there was something more, some workaround that was needed. And thanks to Atul Alex Cherian, who told me about loader. So a loader is basically a program that lets the entire exe load in memory and then plays around with it. I first thought about using a tool for this, but then why not just code this shit out. So here is the algorithm that i followed for this. <strong></strong></p>
<p><strong>Step1</strong>. Use fread to read the bytes of print2.exe to an array.</p>
<p><strong>Step2</strong>. In this array modify the byte that represents beginning of func1 to CC (breakpoint).</p>
<p><strong>Step3.</strong> Save this array to a new myf.exe</p>
<p><strong>Step4</strong>. Detach pointer to myf.exe and open process myf.exe as a DEBUG_PROCESS <strong></strong></p>
<p><strong>Step5</strong>. Waitforadebugevent and use a simple condition to check that it orignates from the one that you forced.</p>
<p><strong>Step6</strong>. On receiving the EXCEPTION_BREAKPOINT DEBUG_EVENT suspend the thread using process information of myf.exe</p>
<p><strong>Step7</strong>, Now change the CC that you placed to the original byte</p>
<p><strong>Step8</strong>. Getthreadcontext of this thread and access the context structure to decrement EIP.</p>
<p><strong>Step9</strong>. Now change return addresses of func1 and func2. For func1 only one byte is edited and for func2 one has to edit 2 bytes.</p>
<p><strong>Step10</strong>. Resume thread. Myf.exe should exit after you press the first enter, then loader.exe should exit after you press the second enter. Here is the code :<script type="text/javascript" src="https://gist.github.com/adwiteeya/6605021.js"></script></p>
<p>Here is the screen shot showing its execution.</p>
<p><a href="http://adwiteeya.com/wp-content/uploads/2013/09/program-success.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-434" alt="program success" src="http://adwiteeya.com/wp-content/uploads/2013/09/program-success.png" width="671" height="338" srcset="https://adwiteeya.com/wp-content/uploads/2013/09/program-success.png 671w, https://adwiteeya.com/wp-content/uploads/2013/09/program-success-300x151.png 300w, https://adwiteeya.com/wp-content/uploads/2013/09/program-success-624x314.png 624w" sizes="auto, (max-width: 671px) 100vw, 671px" /></a></p>
<p>And special thanks to Dhanesh sir. :)</p>
<p>H3LL Y34H! :)</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
					
					<wfw:commentRss>https://adwiteeya.com/trolling-func1/feed/</wfw:commentRss>
			<slash:comments>4</slash:comments>
		
		
			</item>
		<item>
		<title>Debbuging Code by Modifying an EXE</title>
		<link>https://adwiteeya.com/one-hell-of-a-debug/</link>
					<comments>https://adwiteeya.com/one-hell-of-a-debug/#respond</comments>
		
		<dc:creator><![CDATA[Adwiteeya Agrawal]]></dc:creator>
		<pubDate>Fri, 12 Jul 2013 17:20:20 +0000</pubDate>
				<category><![CDATA[Information Security]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[Anti-debugging]]></category>
		<category><![CDATA[GetCurrentThread]]></category>
		<category><![CDATA[GetProcAddress]]></category>
		<category><![CDATA[Load Library]]></category>
		<category><![CDATA[Reverse Engineering]]></category>
		<category><![CDATA[Windows API]]></category>
		<category><![CDATA[ZwGetInformationThread]]></category>
		<guid isPermaLink="false">http://adwiteeya.com/blog/?p=351</guid>

					<description><![CDATA[Hey, So moving on to a relatively advanced API based debugger detection or anti-debugging techniques, i am going to today discuss the implmentation of ZwSetInformationThread routine. Now this is an undocumented win32 API and we need to get a pointer to the function inside a library and then make a call to the function. The [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>Hey,<br />
So moving on to a relatively advanced API based debugger detection or anti-debugging techniques, i am going to today discuss the implmentation of ZwSetInformationThread routine. Now this is an undocumented win32 API and we need to get a pointer to the function inside a library and then make a call to the function. The very first implementation is as follows (by the way I code on Code:Blocks 12.11): <span id="more-351"></span></p>
<p style="padding-left: 30px;"><span style="color: #339966;">#include &#8220;stdafx.h&#8221;</span><br />
<span style="color: #339966;">#include &#8220;windows.h&#8221;</span></p>
<p><strong><span style="color: #003366;">void</span></strong> antidebug<span style="color: #ff0000;">()</span>;<br />
<span style="color: #003366;"><strong>void</strong></span> antidebug<span style="color: #ff0000;">()</span><br />
<span style="color: #ff0000;">{</span><br />
HMODULE lib<span style="color: #ff0000;">;</span><br />
FARPROC _ZwSetInformationThread<span style="color: #ff0000;">;</span><br />
lib = LoadLibrary<span style="color: #ff0000;">(&#8220;</span><span style="color: #3366ff;">ntdll.dll</span><span style="color: #ff0000;">&#8220;)</span><span style="color: #ff0000;">;</span><br />
_ZwSetInformationThread <span style="color: #ff0000;">=</span> GetProcAddress<span style="color: #ff0000;">(</span>lib<span style="color: #ff0000;">, &#8220;</span><span style="color: #3366ff;">ZwSetInformationThread</span><span style="color: #ff0000;">&#8220;);</span><br />
<span style="color: #ff0000;">(</span>_ZwSetInformationThread<span style="color: #ff0000;">)(</span>GetCurrentThread<span style="color: #ff0000;">(),</span>0x11<span style="color: #ff0000;">,</span>0<span style="color: #ff0000;">,</span>0<span style="color: #ff0000;">);</span><br />
MessageBox<span style="color: #ff0000;">(</span>NULL<span style="color: #ff0000;">, &#8220;</span><span style="color: #3366ff;">Debugger Detached</span><span style="color: #ff0000;">&#8220;, &#8220;</span><span style="color: #3366ff;">Debugger Detached</span><span style="color: #ff0000;">&#8220;,</span> MB_OK<span style="color: #ff0000;">);</span><br />
<span style="color: #ff0000;">}</span></p>
<p><strong><span style="color: #003366;">int</span></strong> _tmain<span style="color: #ff0000;">(</span><strong><span style="color: #003366;">int</span></strong> argc<span style="color: #ff0000;">,</span> _TCHAR* argv<span style="color: #ff0000;">[])</span><br />
<span style="color: #ff0000;">{</span><br />
antidebug<span style="color: #ff0000;">();</span><br />
MessageBox<span style="color: #ff0000;">(</span>NULL<span style="color: #ff0000;">, &#8220;</span><span style="color: #3366ff;">Double Check&#8230;</span><span style="color: #ff0000;">&#8220;, &#8220;</span><span style="color: #3366ff;">Double Check</span><span style="color: #ff0000;">&#8220;,</span> MB_OK<span style="color: #ff0000;">);</span><br />
<span style="color: #003366;"><strong>return</strong></span> 0<span style="color: #ff0000;">;</span><br />
<span style="color: #ff0000;">}</span></p>
<p>Before I get into the BUGs lemme just try and explain what is happening here, so we are basically loading a handle to ntdll.dll by calling the LoadLibrary process and then we load the callback to _ZwSetInformationThread which is of datatype FARPROC[<a title="More on FARPROC" href="http://msdn.microsoft.com/en-us/library/windows/desktop/ms633571%28v=vs.85%29.aspx" target="_blank">more on FARPROC</a>] then we call ZwSetInformationThread routine which has four parameters as per http://msdn.microsoft.com/en-us/library/windows/hardware/ff567101%28v=vs.85%29.aspx .</p>
<p>The firstparameter is the handle to the current thread and since we want to run this function within our program we use the GetCurrentThread() function call which returns a handle to the current thread. Next is a value 11. This is basically the value because of which the debugger would get detached from the process. Now how did i get this value. As per documentation on msdn the second parameter is of the enumeration type _THREADINFOCLASS which is as follows <a title="THREADINFOCLASS enum" href="http://www.reversing.be/forum/viewtopic.php?t=520" target="_blank">[source]</a> :</p>
<p style="padding-left: 30px;">typedef enum _THREADINFOCLASS {<br />
ThreadBasicInformation,<br />
ThreadTimes,<br />
ThreadPriority,<br />
ThreadBasePriority,<br />
ThreadAffinityMask,<br />
ThreadImpersonationToken,<br />
ThreadDescriptorTableEntry,<br />
ThreadEnableAlignmentFaultFixup,<br />
ThreadEventPair_Reusable,<br />
ThreadQuerySetWin32StartAddress,<br />
ThreadZeroTlsCell,<br />
ThreadPerformanceCount,<br />
ThreadAmILastThread,<br />
ThreadIdealProcessor,<br />
ThreadPriorityBoost,<br />
ThreadSetTlsArrayAddress,<br />
ThreadIsIoPending,<br />
<strong>ThreadHideFromDebugger,</strong><br />
ThreadBreakOnTermination,<br />
MaxThreadInfoClass<br />
} THREADINFOCLASS;</p>
<p>So ThreadHideFromDebugger is 17 which is basically 11 in hex. And the remaining two parameters are obviously not of importance to us. :D</p>
<p>Now coming to the bugs. &#8220;|17|error: too many arguments to function|&#8221; But MSDN said that it needed four :O and now i started removing one parameter at a time and the function ran when i did not pass any arguments. After having searched a lot! The only solution that i could think of was to use the asm function and pass these arguments manually.</p>
<p>So i made the following changes.</p>
<p>(_ZwSetInformationThread)();<br />
GetCurrentProcess();<br />
<strong><span style="color: #000080;">asm</span></strong><span style="color: #ff0000;">(&#8220;</span><span style="color: #339966;">pushl 0</span><span style="color: #ff0000;">&#8220;);</span><br />
<span style="color: #000080;"><strong>asm</strong></span><span style="color: #ff0000;">(&#8220;</span><span style="color: #339966;">pushl 0</span><span style="color: #ff0000;">&#8220;);</span><br />
<span style="color: #000080;"><strong>asm</strong></span><span style="color: #ff0000;">(&#8220;</span><span style="color: #339966;">pushl 0x11<span style="color: #ff0000;">&#8220;</span></span><span style="color: #ff0000;">);</span><br />
<span style="color: #000080;"><strong>asm</strong></span><span style="color: #ff0000;">(&#8220;</span><span style="color: #339966;">pushl %eax</span><span style="color: #ff0000;"><span style="color: #339966;">&#8220;</span>);</span></p>
<p>Oh and by the way the assembly syntax utilized on GCC is the AT&amp;T asm. So yeah! I had to first read that because i have being doing the intel format. I read [<a title="ASM AT&amp;T on code::blocks" href="http://www.ibiblio.org/gferg/ldp/GCC-Inline-Assembly-HOWTO.html" target="_blank">this</a>]</p>
<p>So this was some success because atleast the exe compiled, i had already though that now i would easily debug everything on OllyDbg and get it through. But this is what GCC(or i) had done to the code. :</p>
<p><a href="http://adwiteeya.com/wp-content/uploads/2013/07/asm.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-352" alt="asm" src="http://adwiteeya.com/wp-content/uploads/2013/07/asm.png" width="631" height="324" srcset="https://adwiteeya.com/wp-content/uploads/2013/07/asm.png 631w, https://adwiteeya.com/wp-content/uploads/2013/07/asm-300x154.png 300w" sizes="auto, (max-width: 631px) 100vw, 631px" /></a></p>
<p>So this wasnt the best solution.But it was some success since i was atleast able to compile the exe now and look it up in Olly (Somehow i am more comfortable with that.)</p>
<p>I decided that since the value passed as the handle to the process is the only thing that i do not know lemme pass other values by modifying the assembly code manually in Olly and changed the code to the following :</p>
<p>HANDLE hndle = GetCurrentThread();<br />
(_NtSetInformationThread)();</p>
<p>The exe did compile and i was getting the pop up messages too.</p>
<p><a href="http://adwiteeya.com/wp-content/uploads/2013/07/popup.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-353" alt="popup" src="http://adwiteeya.com/wp-content/uploads/2013/07/popup.png" width="675" height="318" srcset="https://adwiteeya.com/wp-content/uploads/2013/07/popup.png 675w, https://adwiteeya.com/wp-content/uploads/2013/07/popup-300x141.png 300w" sizes="auto, (max-width: 675px) 100vw, 675px" /></a></p>
<p>Next thing was to immediately load this exe into my dearest OllyDbg and get started. Here is the very first look.</p>
<p><a href="http://adwiteeya.com/wp-content/uploads/2013/07/asm2.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-354" alt="asm2" src="http://adwiteeya.com/wp-content/uploads/2013/07/asm2.png" width="600" height="407" srcset="https://adwiteeya.com/wp-content/uploads/2013/07/asm2.png 600w, https://adwiteeya.com/wp-content/uploads/2013/07/asm2-300x203.png 300w" sizes="auto, (max-width: 600px) 100vw, 600px" /></a></p>
<p>You can see that a call gets made to GetCurrentThread at 00401365 and the value is returned into EAX which is them moved to our variable &#8220;handle&#8221; (EBP-14). So after a couple of runs i realized that this value was always the same and always returning FFFFFFFE i am not sure if this is a fixed constant for a each system or is it just the local handle to every thread. But this is what it was in the case that I had in front of me. Then later you can see that a different value is moved into EAX and at 00401370 we make a call to that address (call eax) hence this is the handle to the ZwSetInformationThread.</p>
<p>So far so good. Next i had to modify the code so that i could push values to the stack before the call eax is executed. If you at the address 00401362 you would see that MOV EBP-10,EAX instruction is executed just after GetProcAddress so basically this is the place where the handle to ZwGetInformationThread is placed on the stack hence we can only modify the code after this. That is from 401365 to 40136D where the value is pushed back into EAX. (Or we could NOP both of these so that the value remains unchanged)</p>
<p>So here are the modifications that i did, wait and after this modification i clicked analyse code. So you&#8217;d see that now Olly recognizes this as a function ^_^</p>
<p><a href="http://adwiteeya.com/wp-content/uploads/2013/07/asm3.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-355" alt="asm3" src="http://adwiteeya.com/wp-content/uploads/2013/07/asm3.png" width="618" height="259" srcset="https://adwiteeya.com/wp-content/uploads/2013/07/asm3.png 618w, https://adwiteeya.com/wp-content/uploads/2013/07/asm3-300x125.png 300w" sizes="auto, (max-width: 618px) 100vw, 618px" /></a></p>
<p>so we have obviously overwritten the call to GetCurrentThread but the code seems to fit just fine! :)</p>
<p>Now do you see a push -2 at 0040136B i had assembled PUSH 0xFFFFFFFE. :) And also since this is windows you would have to push the last argument first&#8230; just in case you did not know this.<br />
Now before you run the code remember to save all modifications to exe because if the code is successful you would be detached from the debugger.<br />
And finally we run the program. We Get the pop ups. And next we are detached from the debugger. :) (The code screen goes blank. Try reloading with &lt;&lt; button.<br />
The Blank Screen :</p>
<p><a href="http://adwiteeya.com/wp-content/uploads/2013/07/asm4.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-356" alt="asm4" src="http://adwiteeya.com/wp-content/uploads/2013/07/asm4.png" width="607" height="256" srcset="https://adwiteeya.com/wp-content/uploads/2013/07/asm4.png 607w, https://adwiteeya.com/wp-content/uploads/2013/07/asm4-300x126.png 300w" sizes="auto, (max-width: 607px) 100vw, 607px" /></a></p>
<p>The Error :</p>
<p><a href="http://adwiteeya.com/wp-content/uploads/2013/07/error.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-357" alt="error" src="http://adwiteeya.com/wp-content/uploads/2013/07/error.png" width="460" height="178" srcset="https://adwiteeya.com/wp-content/uploads/2013/07/error.png 460w, https://adwiteeya.com/wp-content/uploads/2013/07/error-300x116.png 300w" sizes="auto, (max-width: 460px) 100vw, 460px" /></a></p>
<p>H3LL Y34H! B)</p>
]]></content:encoded>
					
					<wfw:commentRss>https://adwiteeya.com/one-hell-of-a-debug/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>CheckRemoteDebuggerPresent API</title>
		<link>https://adwiteeya.com/checkremotedebuggerpresent-api/</link>
					<comments>https://adwiteeya.com/checkremotedebuggerpresent-api/#comments</comments>
		
		<dc:creator><![CDATA[Adwiteeya Agrawal]]></dc:creator>
		<pubDate>Thu, 11 Jul 2013 18:21:26 +0000</pubDate>
				<category><![CDATA[Information Security]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Anti-debugging]]></category>
		<category><![CDATA[RE]]></category>
		<category><![CDATA[summer project]]></category>
		<category><![CDATA[win32 api]]></category>
		<category><![CDATA[windows]]></category>
		<guid isPermaLink="false">http://adwiteeya.com/blog/?p=346</guid>

					<description><![CDATA[Hi, I am currently working on anti-debugging techniques which will also be my project for this year in college.Though i know for a fact  most basic anti-debug techniques are  API based techniques, but i am still doing this post because firstly i did not find any working code and whatever non-working code was present was [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>Hi,</p>
<p>I am currently working on anti-debugging techniques which will also be my project for this year in college.Though i know for a fact  most basic anti-debug techniques are  API based techniques, but i am still doing this post because firstly i did not find any working code and whatever non-working code was present was also implemented locally&#8230; By the way I am really impressed by the work compiled by Tyler Shields in 2009 and he has put up some of the best resources out there!</p>
<p>This post is basically about one of those standard API&#8217;s &gt; CheckRemoteDebuggerPresent function. <span id="more-346"></span>Now there is enough stuff on msdn and other websites that you can find about its implementations and about the working of the function however for some reason they did not work for me! So here is what finally worked. And I have done a remote process example too.</p>
<p><strong>Implementation for process locally </strong></p>
<p><span style="color: #339966;">#ifndef _WIN32_WINNT</span><br />
<span style="color: #339966;">#define _WIN32_WINNT 0x0601</span><br />
<span style="color: #339966;">#endif</span><br />
<span style="color: #339966;">#include&lt;windows.h&gt;</span><br />
<span style="color: #339966;">#include&lt;stdio.h&gt;</span><br />
<span style="color: #339966;">#include&lt;conio.h&gt;</span></p>
<p>int main()<br />
{<br />
BOOL pblsPresent = FALSE;<br />
HANDLE hndle = NULL;</p>
<p>CheckRemoteDebuggerPresent(GetCurrentProcess(),&amp;pblsPresent);<br />
if(pblsPresent){<br />
printf(&#8220;<span style="color: #3366ff;">Being Debugged\n</span>&#8220;);<br />
}<br />
else{<br />
printf(&#8220;<span style="color: #3366ff;">Not being debugged\n</span>&#8220;);<br />
}<br />
getch();<br />
return 0;<br />
}</p>
<p><strong>Implementation For Remote Process (</strong>with PID 2800<strong>)</strong></p>
<p><span style="color: #339966;">#ifndef _WIN32_WINNT</span><br />
<span style="color: #339966;">#define _WIN32_WINNT 0x0601</span><br />
<span style="color: #339966;">#endif</span><br />
<span style="color: #339966;">#include&lt;windows.h&gt;</span><br />
<span style="color: #339966;">#include&lt;stdio.h&gt;</span><br />
<span style="color: #339966;">#include&lt;conio.h&gt;</span></p>
<p>int main()<br />
{<br />
BOOL pblsPresent = FALSE;<br />
HANDLE hndle = NULL;</p>
<p>hndle=OpenProcess(PROCESS_ALL_ACCESS,FALSE,2800);</p>
<p>if(hndle){<br />
printf(&#8220;<span style="color: #3366ff;">Done getting a handle \n</span>&#8220;);<br />
}else {<br />
printf(&#8220;<span style="color: #3366ff;">Invalid PID \n</span>&#8220;);<br />
}<br />
CheckRemoteDebuggerPresent(hndle,&amp;pblsPresent);<br />
if(pblsPresent){<br />
printf(&#8220;<span style="color: #3366ff;">Being Debugged\n</span>&#8220;);<br />
}<br />
else{<br />
printf(&#8220;<span style="color: #3366ff;">Not being debugged\n</span>&#8220;);<br />
}<br />
getch();<br />
return 0;<br />
}</p>
]]></content:encoded>
					
					<wfw:commentRss>https://adwiteeya.com/checkremotedebuggerpresent-api/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>The First Delhi Null Meet I attended and presented.</title>
		<link>https://adwiteeya.com/the-first-delhi-null-meet-i-attended-and-presented/</link>
					<comments>https://adwiteeya.com/the-first-delhi-null-meet-i-attended-and-presented/#comments</comments>
		
		<dc:creator><![CDATA[Adwiteeya Agrawal]]></dc:creator>
		<pubDate>Sun, 19 Aug 2012 04:29:30 +0000</pubDate>
				<category><![CDATA[Information Security]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[asterisk]]></category>
		<category><![CDATA[delhi meet]]></category>
		<category><![CDATA[freepbx]]></category>
		<category><![CDATA[null]]></category>
		<category><![CDATA[null delhi meet]]></category>
		<category><![CDATA[null meet]]></category>
		<category><![CDATA[nullcon]]></category>
		<category><![CDATA[presentation at null]]></category>
		<category><![CDATA[voip interception]]></category>
		<guid isPermaLink="false">http://adwiteeya.com/blog/?p=175</guid>

					<description><![CDATA[Hi there, So today ie 18th august 2012. I attended my first null meet. I actually liked the concept there..wait let me start from the beginning. So i received the email regarding the Delhi meet&#8230; and after a little hesitation asked Mr. Aseem Jahakar if the meet would allow some on the spot presentations. He [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>Hi there,<br />
So today ie 18th august 2012. I attended my first null meet. I actually liked the concept there..wait let me start from the beginning. So i received the email regarding the Delhi meet&#8230; and after a little hesitation asked Mr. Aseem Jahakar if the meet would allow some on the spot presentations. He said that its planned before hand so, I need to tell him in advance if I wish to make a presentation. So, I told him that I am working on the project &#8230;the PBX vulnerabilities &#8230;but haven&#8217;t completed it yet.<span id="more-175"></span> He then encouraged me to present what ever I had prepared and try completing it before the meet. But then I obviously could not add anything because I had this seminar on 17th on sqli and had to prepare for that. So i decided that I would just present what all I have prepared till now. :)<a href="http://adwiteeya.com/wp-content/uploads/2012/08/pt_948_4878_o.jpg"><img loading="lazy" decoding="async" class="alignright size-medium wp-image-176" title="pt_948_4878_o" src="http://adwiteeya.com/wp-content/uploads/2012/08/pt_948_4878_o-300x231.jpg" alt="" width="300" height="231" srcset="https://adwiteeya.com/wp-content/uploads/2012/08/pt_948_4878_o-300x231.jpg 300w, https://adwiteeya.com/wp-content/uploads/2012/08/pt_948_4878_o.jpg 623w" sizes="auto, (max-width: 300px) 100vw, 300px" /></a><br />
So the entire week I was really worried about this presentation because I had not even prepared a powerpoint presentation, I did not know the what kind of audience am i gonna get and also I did not know weather things would work there.(some attacks worked seldom)<br />
All right no problemo! Challenge accepted! (Meanwhile Mr. Jahakar had already to put up my presentation on the list. )<br />
So here comes the day, 18th august I was all set to give this a shot &#8230;. Now the venue for the meet as per the email was<br />
&#8220;Times Internet Limited,<br />
Tlabs, First floor, FC-6,<br />
Sector 16A, Film City, Noida<br />
(Next to huge Shiv murti)<br />
Very close to Noida Sector 18 Metro Station&#8221;</p>
<p>so I reached sector 16A by 4:00pm and was looking was the &#8220;Times Internet Limited&#8221; however there was no such building&#8230; I realised that after having walked for 3 kms around the same building&#8230; so I showed the exact address to one of gaurds (you will see a lot of them if you are in this area). He could locate where the plot FC-6 is.. so i had to walk back the entire boundary wall to reach the enterance gate of Times India Limited. (not times internet limited). So finally i confirmed with the gaurds of the building weather tlabs was in the same building or not they said it was and I was finally relaxed! I reached the place, it was huge&#8230;looked almost like a 5 star hotel&#8217;s reception. So when i entered the first floor they gave me a slip which was required for exit. :O So when I reached the lab the Tlabs the entire room was larger than the auditorium we have at MSIT. I was a bit nervous then getting to question myself &#8230;weather my presentation would be good enough.. are they gonna like it&#8230; But man awesome building. :D So now I had talk with my friend who motivated me to go there and just do it&#8230; so I just went there&#8230; and actually there were two events going on simultaneously some hacking event and our meet&#8230; that mean have of the crowd was actually going to be my audience&#8230;</p>
<p>aah there i saw mr. Aseem&#8230;. pulled up a chair.. and sat near the &#8220;group&#8221;. Now in the large room&#8230; there were only around 15 people who had come for the meet&#8230;so it more of a drawing room chit chat kind of a thing.. we had been bags sofas and chairs&#8230; in the shape of a U facing this LED tv where we were supposed to connect the laptop to give the presentation.. The first part of the presentation was Newsbyte &#8230; it was basically the &#8220;new stuff&#8221; and &#8220;update&#8221; section. I liked the part&#8230; the guy delivered his part nicely. :) Then there was a problem that we did not have much time for two presentations &#8230;hence only one of the two speakers me or shubham bhaiya could speak&#8230; So mr. aseem asked the duration of our presentations and my presentation was a shorter one so I was told to give it :) So i just got up and connected my laptop and started with my thing&#8230; now this presentation was different from any presentation i have ever given&#8230; i could see people understanding what i am saying :D that was nice&#8230;. plus yes.. i perhaps was the only one who was from college here&#8230; other people who came here were already working at different places&#8230; But offcourse my presentation was different&#8230; off beat&#8230; hence deserved the small round of applause :) So i did what i was here to do&#8230; then came back to my seat&#8230; and we started discussing about &#8220;things&#8221; and &#8220;stuff&#8221; :D Was a nice experience all together&#8230; Just that the duration was really less&#8230; we were actually almost kicked out of the building :D But i liked the whole concept of hackers meeting like this and presenting stuff &#8230;talking about security.. developments in the industry and the problems they are facing .. :) was cool really cool. Apart from that I also made good friends&#8230; the nice nature hackers.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://adwiteeya.com/the-first-delhi-null-meet-i-attended-and-presented/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
		<item>
		<title>The SQL injection Presentation.</title>
		<link>https://adwiteeya.com/the-sql-injection-presentation/</link>
					<comments>https://adwiteeya.com/the-sql-injection-presentation/#comments</comments>
		
		<dc:creator><![CDATA[Adwiteeya Agrawal]]></dc:creator>
		<pubDate>Sat, 18 Aug 2012 02:07:30 +0000</pubDate>
				<category><![CDATA[At the College]]></category>
		<category><![CDATA[Information Security]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[5th semester project]]></category>
		<category><![CDATA[adwiteeya agrawal]]></category>
		<category><![CDATA[attack]]></category>
		<category><![CDATA[presentation]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[seminar]]></category>
		<category><![CDATA[sql injection]]></category>
		<category><![CDATA[Surajmal]]></category>
		<guid isPermaLink="false">http://adwiteeya.com/blog/?p=165</guid>

					<description><![CDATA[Hi, so we have this subject called DBMS (database management system) which is taken up by Miss. Nishtha Jatana. Nishtha maam follows a different routine for her classes&#8230;a rather constructive one. She converts her initial 2 &#8211; 3 tutorial classes into presentations that are delivered by the students. If you don&#8217;t know what a tutorial [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>Hi, so we have this subject called DBMS (database management system) which is taken up by Miss. Nishtha Jatana. Nishtha maam follows a different routine for her classes&#8230;a rather constructive one. She converts her initial 2 &#8211; 3 tutorial classes into presentations that are delivered by the students. If you don&#8217;t know what a tutorial class is.. it is basically a kind of an extra class where students can ask doubts or there can be revision of topics or some numerical problems related to the topics can be done. Now the presentations are conducted on a voluntary basis. There is no compulsion, so i decided<span id="more-165"></span>to give a presentation on SQL injection. Off course, this was the topic that was closely related to both DBMS and security. So I had the presentation scheduled for 13th august at 4:30pm. <a href="http://adwiteeya.com/wp-content/uploads/2012/08/presentation-boy-color.gif"><img loading="lazy" decoding="async" class="alignleft size-medium wp-image-171" title="presentation-boy-color" src="http://adwiteeya.com/wp-content/uploads/2012/08/presentation-boy-color-300x266.gif" alt="" width="300" height="266" srcset="https://adwiteeya.com/wp-content/uploads/2012/08/presentation-boy-color-300x266.gif 300w, https://adwiteeya.com/wp-content/uploads/2012/08/presentation-boy-color.gif 360w" sizes="auto, (max-width: 300px) 100vw, 300px" /></a>BUT I reached the room 10 minutes late! and then my laptop for some reason(winsock reset) did not connect to tata photon that wasted another 20 minutes so i was practically left with 20 minutes only&#8230; we (initially i and my friend were giving the presentation together) started the presentation but offcourse it did not end and also there were only 6 students in the class :D . So maam postponed it to 17th august at 2:20pm and the awesome part was she booked the seminar hall !!! and also I had two periods for the presentation!!! and one of the periods was a lecture!! not a tute!! I really thank her for making me do this&#8230; because I too learned a lot while researching on SQLi.</p>
<p>Though I had in my mind that 2 periods! thats long &#8230;am I really gonna be able to make it till then..! Allright so this time the presentation in the seminar hall and all my classmates present there! :) The best part is that I knew they were bored like hell&#8230; obviously its not of there interest &#8230; but they supported me&#8230; they were quite and occasionally tried listening as well.. :) Thanks to them for being awesome. :) Now I started with the presentation (this time only I was doing it) and noticed that even my proctor Saba maam was present there&#8230; Then it went on &#8230;.things worked fine.. one of examples took time hence was not completed on the spot&#8230; like you know when your software does not recognize the version of the DBMS on the server&#8230; But apart from that it was nice&#8230; it went how i had planned&#8230; and also i loved the complements &#8230; in fact I got the best compliment from my proctor. She said that it was really practical&#8230; and generally seminars are not so practical!!! And that pretty much is the motto of my life&#8230; to keep things practical. :) Then my classmates&#8217; comments&#8230; which actually gave me the right feedback and scope for improvement&#8230; Things like i need to take breaks in between, i have to interact more with the audience, include less of backtrack and I could use the zoom tool&#8217;s bar feature rather than zooming the entire screen. I would keep that in mind next time :) &#8230; and lastly the shocking part was i fucking took the entire too periods!! sorry classmates. :D<br />
Also my offer of sharing the resources for a total of more than 12 types of sql injections is still open if you buy me a coke. :D</p>
]]></content:encoded>
					
					<wfw:commentRss>https://adwiteeya.com/the-sql-injection-presentation/feed/</wfw:commentRss>
			<slash:comments>6</slash:comments>
		
		
			</item>
		<item>
		<title>The Asterisk Project.</title>
		<link>https://adwiteeya.com/the-asterisk-project/</link>
					<comments>https://adwiteeya.com/the-asterisk-project/#comments</comments>
		
		<dc:creator><![CDATA[Adwiteeya Agrawal]]></dc:creator>
		<pubDate>Wed, 25 Jul 2012 13:56:33 +0000</pubDate>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[5th semester project]]></category>
		<category><![CDATA[asterisk]]></category>
		<category><![CDATA[asterisk pbx]]></category>
		<category><![CDATA[call interception]]></category>
		<category><![CDATA[IVR]]></category>
		<category><![CDATA[pbx]]></category>
		<category><![CDATA[voip]]></category>
		<guid isPermaLink="false">http://adwiteeya.com/blog/?p=145</guid>

					<description><![CDATA[Hi reader, I am not sure if you stumbled upon this post from the archive or reached here by a search. But I am going to be verbose anyways :D Asterisk is an open source PBX. Well i would say its too less to call it as just a PBX. It has immense potential it [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>Hi reader,</p>
<p>I am not sure if you stumbled upon this post from the archive or reached here by a search. But I am going to be verbose anyways :D</p>
<p>Asterisk is an open source PBX. Well i would say its too less to call it as just a PBX. It has immense potential it can do things so easily and so correctly that it is actually an unparalleled solution for PBXs. Ohkay if you are wondering what a PBX is it is those system you see in offices, where the receptionist dials one and the call is transferred to another guy. So why am I playing around with this thing&#8230; ? Well there is this one very annoying thing, rather a concept called as the &#8220;5th semeseter Project&#8221;. Exactly thats why.! :<span id="more-145"></span></p>
<p><a href="http://adwiteeya.com/wp-content/uploads/2012/07/asterisk.gif"><img loading="lazy" decoding="async" class="alignright size-full wp-image-146" title="asterisk" src="http://adwiteeya.com/wp-content/uploads/2012/07/asterisk.gif" alt="" width="300" height="245" /></a>Now for the project I could have joined some course and could have easily got a project from that institution&#8230;. But I did not like that&#8230;I did not want that&#8230; I had to go for a training in hacking and so I went for ECSA (EC COUNCIL Certified Security Analyst). Well, now I had to make a project that was related to my training and hence hacking&#8230; Shit! You give me a server and ask me to do a penetration testing I would do that&#8230;but writing a PROJECT&#8230; it seemed like the world is ending. :D</p>
<p>But then there was this awesome friend of mine. Mr. Vipul Bhojwani who asked me if i had an IVR solution. I did not know what that was&#8230; so I googled. Interactive Voice Respone&#8230;.no i did not have a solution for that. So I asked him what does he wish to do.. He said he wants to set it up on gmail! Fuck. Wont that be awesome if someone calls you on gmail and you have an IVR set up there&#8230; yes it would be!!</p>
<p>I wanted that&#8230;. i started this from the scratch&#8230; and after 1 hour of googling i realized that this was possible only if i had a google voice number(which turns out to be incorrect)&#8230; which obviously i couldnt as I am in India. But every time i searched IVR on google there were results that let me to asterisk.org. I was curious that maybe somehow i can atleast complete it till the point i am not asked for a google voice number. So i downloaded asterisk. :D<br />
And successfully configured it. Now the very next day i had a class on VOIP penetration testing at my training so I should my trainer what i had set up&#8230;. That is i should him how i could make free VOIP calls within the subnet. So he told me to intercept the call. WHAT!!!</p>
<p>yes he told me to capture what to guys were talking &#8230;.something like phone tapping . So i did that ..infact was a piece of cake &#8230;and here was my project born. :)<br />
So I am making a project now on different vulnerabilites of a PBX system and the associated protocols and offcourse the ways to fix those issues. I am writing in the first person&#8230;i think that is the correct way&#8230; and i am being reaallllyyyy verbose&#8230; who so ever gets the project will be able to make such a system. I hope things work fine&#8230; I am doing a lot of reading for this&#8230; Getting to learn about new protocols day by day&#8230;</p>
]]></content:encoded>
					
					<wfw:commentRss>https://adwiteeya.com/the-asterisk-project/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
		<item>
		<title>The www.adwiteeya.com/board</title>
		<link>https://adwiteeya.com/the-www-adwiteeya-comboard/</link>
					<comments>https://adwiteeya.com/the-www-adwiteeya-comboard/#respond</comments>
		
		<dc:creator><![CDATA[Adwiteeya Agrawal]]></dc:creator>
		<pubDate>Sun, 29 Apr 2012 20:02:39 +0000</pubDate>
				<category><![CDATA[Projects]]></category>
		<guid isPermaLink="false">http://adwiteeya.com/blog/?p=27</guid>

					<description><![CDATA[I have tried to build up a forum quite a few times now. But every time i have successfully messed it up and closed the project before even giving it a good shot. Firstly when you install the phpBB, it is says the admin url is example.com/adm however that never worked for me. I have [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>I have tried to build up a forum quite a few times now. But every time i have successfully messed it up and closed the project before even giving it a good shot. Firstly when you install the phpBB, it is says the admin url is example.com/adm however that never worked for me. I have to sign in normally and then go all the way to the bottom of the page and click administration control panel.<br />
Then the second problem was I had no freakin idea about how did the cms work. I just had two forums in my mind. hackforums.net and governmentsecurity.org/forum. I wanted something that would work the similar way.</p>
<p><span id="more-27"></span><br />
Ohkay so i somehow managed to log into the phpBB  admin control panel and learn that there are categories at the top level which will have forums and then further sub forums which can further have topics.<br />
so by the time I understood this I had the following hierarchy ready.<br />
Information Security<br />
1.Information Gathering<br />
2.Wireless Hacking<br />
3. System Hacking<br />
4. Metasploit</p>
<p>Hosting<br />
1.Details and Plans</p>
<p>Linux -No Sub-forum<br />
Ohkay after this I was filled with joy for, i had learned a great deal or atleast i thought so.<br />
Then I logged in as a user and tried to post a new topic in the category wireless hacking. Their was just this one little problem. There was no freaking button to do that.<br />
So here came the big problem&#8230; [box type=&#8221;shadow&#8221;] THE FORUM PERMISSIONS[/box]</p>
<p>If you get to know how to do this you are almost going to be as comfortable with phpBB as wordpress<br />
Ohkay so spent a full day to get this working and finally was able to display the new topic on the user&#8217;s screen. Now i knew about the permissions in and out. I could let anyone do anything or nothing. Then came another problem&#8230; a very good friend of my pujit juneja is awesome at android and i wanted him to contribute something to the forum. I asked him weather he would do it or not&#8230;and he readily accepted to do it. But then I did not know how to upgrade a user to a moderator&#8230; well that took another hour to figure out.<br />
Ohkay all set i was finally ready to make my first post.<br />
And then i noticed my post could not have a code&#8230; i mean an html code&#8230; hence i could not post the youtube videos that i make&#8230; and the last problem was this adding the BBcode to do it&#8230;</p>
<p>If you want to add an html code you cannot add it directly&#8230;<br />
for example the code for an embedd of the youtube video&#8230; how ever you can create a bbcode such that you provide only the video id and the code gets embedded itself..<br />
Once i was able to do now I was happy&#8230; Finally i am expecting a lot from this forum hope I develop a healthy like minded community very soon.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
					
					<wfw:commentRss>https://adwiteeya.com/the-www-adwiteeya-comboard/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
