<?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>credentials Archive - Robert Skibbe</title>
	<atom:link href="https://robbelroot.de/blog/tag/credentials/feed/" rel="self" type="application/rss+xml" />
	<link></link>
	<description>alias RobbelRoot – Freelance Full Stack Developer .NET</description>
	<lastBuildDate>Sun, 13 Feb 2022 07:02:50 +0000</lastBuildDate>
	<language>de</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://robbelroot.de/wp-content/uploads/2020/12/cropped-favicon-32x32.png</url>
	<title>credentials Archive - Robert Skibbe</title>
	<link></link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>&#x1f575;&#xfe0f; Hacking a NET Application</title>
		<link>https://robbelroot.de/blog/hacking-a-net-application/</link>
					<comments>https://robbelroot.de/blog/hacking-a-net-application/#comments</comments>
		
		<dc:creator><![CDATA[Robert Skibbe]]></dc:creator>
		<pubDate>Wed, 12 Jan 2022 22:02:00 +0000</pubDate>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[app]]></category>
		<category><![CDATA[application]]></category>
		<category><![CDATA[avoid]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[credentials]]></category>
		<category><![CDATA[dangerous]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[developer]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[ftp]]></category>
		<category><![CDATA[guide]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[hacked]]></category>
		<category><![CDATA[hacker]]></category>
		<category><![CDATA[hacking]]></category>
		<category><![CDATA[hardcode]]></category>
		<category><![CDATA[hardcoding]]></category>
		<category><![CDATA[hd]]></category>
		<category><![CDATA[help]]></category>
		<category><![CDATA[login]]></category>
		<category><![CDATA[password]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[user]]></category>
		<category><![CDATA[vbnet]]></category>
		<category><![CDATA[video]]></category>
		<category><![CDATA[vulnerable]]></category>
		<guid isPermaLink="false">https://robbelroot.de/?p=7320</guid>

					<description><![CDATA[<p>Hacking User &#38; Password information from a NET Assembly So you are interested in hacking a simple NET Application with like all the nerdy stuff!? Then i&#8217;m glad to tell you, that you are very welcome, go ahead and let&#8217;s hack! This example will work for C# as well, even &#8230;</p>
<p>Der Beitrag <a href="https://robbelroot.de/blog/hacking-a-net-application/">&#x1f575;&#xfe0f; Hacking a NET Application</a> erschien zuerst auf <a href="https://robbelroot.de">Robert Skibbe</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<figure class="wp-block-image size-full"><a href="https://robbelroot.de/wp-content/uploads/2022/01/Hacking-User-Pass-Thumbnail.png"><img fetchpriority="high" decoding="async" width="1920" height="1080" src="https://robbelroot.de/wp-content/uploads/2022/01/Hacking-User-Pass-Thumbnail.png" alt="" class="wp-image-7324"/></a></figure>






<h2 class="wp-block-heading" id="hacking-user-password-information-from-a-net-assembly">Hacking User &amp; Password information from a NET Assembly</h2>



<p>So you are interested in <strong>hacking a simple NET Application</strong> with like <strong>all </strong>the <strong>nerdy stuff</strong>!?</p>



<p>Then i&#8217;m glad to tell you, that you are <strong>very welcome</strong>, <strong>go </strong>ahead and <strong>let&#8217;s hack</strong>!</p>



<p>This example <strong>will work for C# as well</strong>, even it is presented with a Visual Basic NET Application.</p>



<p>In the <strong>first few lines </strong>i will <strong>write </strong>a bit <strong>about </strong>my <strong>own experience </strong>with hacking, that i experienced &#8222;on&#8220; myself. </p>



<p><strong>After that </strong>i <strong>will show </strong>you some kind of <strong>basic example </strong>application, which is like our victim.</p>



<p><strong>In </strong>the<strong> last step </strong>i will explain, <strong>which tool </strong>you would need to inspect those specific files.</p>



<p>You will also learn how to <strong>find the information</strong> you need inside those tools.</p>



<h2 class="wp-block-heading" id="liking-humour-videos-heres-the-youtube-version">Liking humour &amp; videos? Heres the YouTube version</h2>



<p><strong>If</strong> you <strong>like watching videos </strong>and <strong>having </strong>like <strong>actual </strong>live <strong>examples </strong>– i&#8217;ve also got you covered!</p>



<p>Just <strong>visit <a href="https://youtube.com/RobbelRoot" target="_blank" rel="noreferrer noopener">my YouTube channel</a></strong> <strong>or click </strong>the following <strong>video </strong>to load and watch it:</p>


<div class="async-youtube" data-embed="tdJTEg7swlI" data-alt="">
    <div class="play-button"></div>      
  </div>



<h2 class="wp-block-heading" id="why-knowing-how-to-hack-some-things-is-important">Why knowing how to hack some things is important</h2>



<p><strong>Even if you&#8217;re not </strong>that in the dark sitting <strong>hacker person</strong>, yet <strong>knowing </strong>about hacking <strong>is </strong>very <strong>important </strong>in terms of programming.</p>



<p>Why – you ask? Because <strong>actively hacking</strong> has <strong>obviously </strong>something really important <strong>to do with the opposite</strong>.</p>



<p><strong>Knowing how </strong>attacker actually <strong>attacks</strong>, will <strong>make </strong>you <strong>stronger in defending </strong>yourself.</p>



<p>So <strong>if </strong>you <strong>understand </strong>the <strong>concepts</strong>, you <strong>have </strong>a (better) <strong>chance to </strong>actually <strong>defend </strong>against them – right!?</p>



<p>You can see, that the old and good saying &#8222;<strong>wisdom is power</strong>&#8220; <strong>isn&#8217;t</strong> that <strong>bad </strong>at all.</p>



<p>This also <strong>counts for programming</strong> or software development as well.</p>



<h3 class="wp-block-heading" id="sometimes-learning-attacking-turns-to-defending">Sometimes learning attacking turns to defending</h3>



<p><strong>Defending against hackers </strong>in a <strong>possible matter</strong>, is like one of the basic essences.</p>



<p>I mean <strong>who wants </strong>to build <strong>application </strong>basically everyone could get like <strong>for free</strong>, or <strong>even </strong>script <strong>kiddies can </strong>crack.</p>



<p><strong>Sure there </strong>are <strong>unavoidable </strong>situations or better said <strong>different aspects</strong>, <strong>where </strong>you <strong>can&#8217;t protect</strong> yourself, or your app.</p>



<p>I <strong>had to </strong>hardly <strong>learn myself</strong>, that those aspects <strong>aren&#8217;t the real key</strong> of importance, too!</p>



<p>This is <strong>where </strong>we are about to switch to <strong>my own </strong>little <strong>story behind </strong>that whole thing.</p>



<h2 class="wp-block-heading" id="my-own-background-and-contact-points-of-hacking">My own background and contact points of hacking</h2>



<figure class="wp-block-image size-full"><a href="https://robbelroot.de/wp-content/uploads/2022/01/Hacking-a-NET-Application-My-Story.png"><img decoding="async" width="1200" height="628" src="https://robbelroot.de/wp-content/uploads/2022/01/Hacking-a-NET-Application-My-Story.png" alt="My Story- Hacking a NET Application" class="wp-image-7341" title="My Story- Hacking a NET Application"/></a><figcaption>My Story – Hacking a NET Application</figcaption></figure>



<p><strong>Even if i don&#8217;t </strong>really <strong>know </strong>to <strong>where </strong>like i should actually <strong>start </strong>telling you, i will try to find some starting point.</p>



<p><strong>One of the things</strong>, which <strong>stuck in my mind</strong> till today – and it&#8217;s like 15 years ago – <strong>is the following</strong> thingy.</p>



<p><strong>I was a</strong> little <strong>gamer </strong>bro, who was <strong>playing </strong>his current <strong>MMO </strong>called &#8222;Silkroad Online&#8220; like insane.</p>



<p><strong>Everyone who knows </strong>about the so called &#8222;<strong>china grinders</strong>&#8220; knows what i&#8217;m talking about..</p>



<p><strong>Those games </strong>are the <strong>definition </strong>of &#8222;spend all your time&#8220;, because they are so <strong>grinding based</strong>, hence the name..</p>



<h3 class="wp-block-heading" id="a-whole-load-of-work-gone">A whole load of work – gone</h3>



<p>You are <strong>essentially slaying like 5000</strong> monsters <strong>to get </strong>almost no drops and <strong>zero </strong>exp.</p>



<p>As you can imagine there were like many <strong>scammers </strong>and <strong>fakers </strong>which <strong>tried to scam or hack your account</strong>.</p>



<p>Despite this <strong>i liked the game</strong> and i <strong>can&#8217;t</strong> exactly <strong>tell why</strong>, i think it was the chinese and dragonball like style.</p>



<p>You <strong>had </strong>like this <strong>whole chinese world </strong>built <strong>around </strong>the <strong>silkroad lore</strong> (and i really love &#8222;the&#8220; asian lore).</p>



<p><strong>Then </strong>there was this <strong>dragonball </strong>like aspect, where you <strong>can shoot your own</strong> &#8222;<strong>kamehameha</strong>&#8220; which kept me for long enough.</p>



<p><strong>In the end</strong> i <strong>spent hours </strong>and hours <strong>fighting </strong>those <strong>monsters for </strong>like almost <strong>nothing and </strong>even <strong>wasted </strong>some *cough* <strong>bucks</strong>.</p>



<figure class="wp-block-image size-full"><a href="https://robbelroot.de/wp-content/uploads/2022/01/Hacking-a-NET-Application-Speeding-things-up-with-a-bot.png"><img decoding="async" width="1200" height="628" src="https://robbelroot.de/wp-content/uploads/2022/01/Hacking-a-NET-Application-Speeding-things-up-with-a-bot.png" alt="Speeding things up with a bot – Hacking a NET Application" class="wp-image-7352" title="Speeding things up with a bot – Hacking a NET Application"/></a><figcaption>Speeding things up with a bot – Hacking a NET Application</figcaption></figure>



<p><strong>As </strong>i <strong>always </strong>had this &#8222;hmm, i gotta <strong>find a solution</strong> for that&#8220;-mentality, i also <strong>tried to</strong> do this time.</p>



<p><strong>After all </strong>the <strong>outcome wasn&#8217;t</strong> that <strong>good </strong>in the end, but well, i think that&#8217;s the price you gotta pay, huh!?</p>



<h3 class="wp-block-heading" id="searching-for-help">Searching for help</h3>



<p>So i <strong>started searching</strong> for like helpers with leveling and <strong>found different leveling services</strong>, but they <strong>were </strong>mostly very <strong>expensive</strong>..</p>



<p><strong>Not much time after </strong>that, i <strong>found </strong>something called &#8222;<strong>bot</strong>&#8222;, which was basically just a software.</p>



<p><strong>Those </strong>were/are <strong>tools </strong>which will <strong>take </strong>the <strong>leveling aspect</strong> in their hand and basically <strong>tell your </strong>ingame <strong>character what to do</strong> – so you don&#8217;t have to.</p>



<p><strong>There was a free bot</strong> which i downloaded and installed and <strong>boom </strong>– the <strong>problem happened</strong>.</p>



<p>It <strong>did its level job pretty well</strong>, <strong>but had </strong>like an integrated <strong>trojan </strong>aspect, which <strong>spied on </strong>my <strong>credentials </strong>and <strong>transferred </strong>my <strong>data </strong>to its owner.</p>



<p>So not <strong>many days after</strong> the installation, one of my <strong>accounts was gone</strong> – yeah, i had multiple&#8230;</p>



<p><strong>This is the whole story why i started learning programming and hacking</strong> – i wanted to create my own bot to compensate my lost time and my lost account!</p>



<p><strong>Back to </strong>the main <strong>topic </strong>– hacking a NET application!</p>



<h2 class="wp-block-heading" id="how-i-started-programming-like-logins-ew">How i started programming like logins – ew</h2>



<figure class="wp-block-image size-full"><a href="https://robbelroot.de/wp-content/uploads/2022/01/Login-Screens-how-to-hack-a-net-application.png"><img loading="lazy" decoding="async" width="1200" height="628" src="https://robbelroot.de/wp-content/uploads/2022/01/Login-Screens-how-to-hack-a-net-application.png" alt="Login Screens - how to hack a net application" class="wp-image-7365" title="Login Screens - how to hack a net application"/></a><figcaption>Login Screens &#8211; how to hack a net application</figcaption></figure>



<p>So <strong>now the story begins</strong>, where <strong>i started programming</strong> at all and like <strong>login screens</strong>.</p>



<p>I think <strong>every beginner in programming did it like this</strong> at some point.</p>



<p><strong>On </strong>the <strong>one side </strong>you are just <strong>making your first steps</strong> and on the <strong>other side </strong>you just want to <strong>make it work</strong>.</p>



<p>You <strong>don&#8217;t have much knowledge</strong> – if any at all – about this persistence thingy called <strong>database</strong>, <strong>nor </strong>the <strong>security </strong>thingy called <strong>cryptography</strong>, etc.</p>



<p><strong>This makes you </strong>– especially at the beginning – <strong>think</strong>, that you <strong>can just do </strong>this thing, which is known as <strong>hardcoding</strong>.</p>



<p>You <strong>just put variables inside </strong>the code (or something similar) <strong>with fixed</strong> values like:</p>



<pre class="wp-block-code"><code>variableA = "ValueB"</code></pre>



<p><strong>Then </strong>you can go ahead and <strong>easily compare </strong>this <strong>value in </strong>terms of an <strong>authentication screen </strong>like:</p>



<pre class="wp-block-code"><code>user = "User"
password = "password"
if enteredUser = user and enteredPassword = password then...</code></pre>



<p><strong>So far</strong> this doesn&#8217;t seem like anything <strong>hacky</strong>, but <strong>read </strong>a few <strong>more </strong>lines and <strong>let me explain</strong>!</p>



<p><strong>One big problem </strong>is, that even <strong>if you think</strong> that <strong>only </strong>&#8222;<strong>noobs</strong>&#8220; <strong>do this</strong>, <strong>i&#8217;ve seen too many agencies</strong> and similar small firms did that as well.</p>



<p>I mean it&#8217;s <strong>one thing</strong> if you&#8217;re <strong>doing </strong>this <strong>on </strong>your <strong>own</strong>, <strong>local computer</strong>, for yourself <strong>with </strong>no <strong>customer data </strong>involved.</p>



<p>But i really think it&#8217;s <strong>something different when </strong>&#8222;<strong>companies</strong>&#8220; do things like this, <strong>knowing that </strong>it&#8217;s totally <strong>wrong</strong>!</p>



<p><strong>Especially in my work as a freelancer &amp; teacher</strong> i learned, that small business i supported, sometimes persisted on like &#8222;nah we will do it like this, it&#8217;s okay&#8220;.</p>



<p>Some <strong>other excuses</strong> i hear a lot are like &#8222;It&#8217;s <strong>only a small customer</strong>, that&#8217;s okay&#8220;, or &#8222;there&#8217;s <strong>no budget left</strong>, just do it&#8220;!</p>



<p><strong>Even </strong>if this <strong>involved software</strong> for other customers which <strong>got their software</strong> like <strong>delegated </strong>to freelancers.</p>



<h2 class="wp-block-heading" id="creating-the-sample-application-our-victim">Creating the sample application – our victim</h2>



<figure class="wp-block-image size-full"><a href="https://robbelroot.de/wp-content/uploads/2022/01/Login-Dialog-example-hardcoded-credentials-in-NET-application.png"><img loading="lazy" decoding="async" width="1280" height="720" src="https://robbelroot.de/wp-content/uploads/2022/01/Login-Dialog-example-hardcoded-credentials-in-NET-application.png" alt="Login Dialog example - hardcoded credentials in NET application" class="wp-image-7379" title="Login Dialog example - hardcoded credentials in NET application"/></a><figcaption>Login Dialog example &#8211; hardcoded credentials in NET application</figcaption></figure>



<p>So now <strong>let&#8217;s jump to the hacking action</strong> and see what malicous things can actually happen if you&#8217;re doing it like above yourself.</p>



<p>You can <strong>go ahead </strong>now and <strong>create a new windows forms application</strong> (dotnet Core 3.1 in the example above).</p>



<p>The <strong>first Form </strong>will be the &#8222;<strong>frmLogin</strong>&#8222;, which is – as you&#8217;ve may guessed – the <strong>form where the login will happen</strong>.</p>



<h3 class="wp-block-heading" id="basic-login-form-controls">Basic login form controls</h3>



<p><strong>Add </strong>the usual login <strong>controls like 2 textboxes for the user and the password</strong>, as well as the <strong>button to start the login</strong> process.</p>



<p><strong>Name the button</strong> – like you should always do – for example &#8222;btnLogin&#8220; and put <strong>the following code</strong> inside the handler:</p>



<pre class="EnlighterJSRAW" data-enlighter-language="visualbasic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="VB.NET" data-enlighter-group="btn-login-sub">Private Sub btnLogin_Click(sender As Object, e As EventArgs) Handles btnLogin.Click
    Dim loginFailed = Not CheckLogin(tbUser.Text, tbPassword.Text)
    If loginFailed Then
        MessageBox.Show("Login failed!")
        Return
    End If
    successfullySubmitted = True
    Dim mainForm = New frmMain()
    mainForm.Show()
    Close()
End Sub</pre>



<pre class="EnlighterJSRAW" data-enlighter-language="csharp" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="C#" data-enlighter-group="btn-login-sub">private void btnLogin_Click(object sender, EventArgs e)
{
    var loginFailed = !CheckLogin(tbUser.Text, tbPassword.Text);
    if (loginFailed)
    {
        MessageBox.Show("Login failed!");
        Return;
    }
    successfullySubmitted = true;
    var mainForm = new frmMain();
    mainForm.Show();
    Close();
}</pre>



<p>The <strong>code will call the check &#8222;Check-Login&#8220;-function</strong> which we will declare in a second <strong>and invert </strong>the <strong>result</strong>.</p>



<p>We are <strong>doing this to</strong> use this &#8222;<strong>early return</strong>&#8222;-block in the next few lines, to display a <strong>short message</strong> and well – <strong>return </strong>early.</p>



<p><strong>Then </strong>we are <strong>setting a flag to true</strong>, to avoid closing the form, but ignore this for now, you can see it later with the complete code.</p>



<h3 class="wp-block-heading" id="the-protected-content-the-main-form">The protected content – the main form</h3>



<p><strong>Next </strong>we are <strong>creating a new</strong> &#8222;<strong>frmMain</strong>&#8220; instance <strong>and show it</strong> in the next step.</p>



<p><strong>In </strong>the <strong>last step</strong> we are <strong>closing </strong>the <strong>current form</strong>, so we are basically <strong>closing the login form</strong>, to only <strong>leave </strong>the <strong>main </strong>form open.</p>



<p><strong>Right now</strong> is the time to <strong>define </strong>the &#8222;<strong>CheckLogin</strong>&#8222;-<strong>function</strong>, before we continue adding the main form:</p>



<pre class="EnlighterJSRAW" data-enlighter-language="visualbasic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="VB.NET" data-enlighter-group="checklogin-function">Private Function CheckLogin(user As String, password As String) As Boolean
    Dim credentialsMatching = user = "User" AndAlso password = "password"
    Return credentialsMatching
End Function</pre>



<pre class="EnlighterJSRAW" data-enlighter-language="csharp" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="C#" data-enlighter-group="checklogin-function">private bool CheckLogin(string user, string password)
{
    var credentialsMatching = user == "User" &amp;&amp; password == "password";
    returnn credentialsMatching;
}</pre>



<p>Now <strong>create </strong>an <strong>additional form </strong>and call it like &#8222;frmMain&#8220;, you can<strong> leave the form as it is</strong>.</p>



<p>You <strong>could add </strong>something like <strong>code to handle the closing</strong> of the app for you, <strong>but </strong>this <strong>isn&#8217;t necessary</strong>.</p>



<p><strong>Maybe </strong>you want to <strong>download </strong>the <strong>complete project</strong> down below, so you can see everything in total.</p>



<p>Currently the app <strong>should look something like this</strong>:</p>



<figure class="wp-block-image size-full"><a href="https://robbelroot.de/wp-content/uploads/2022/01/Hacking-NET-Application-Example-App.gif"><img loading="lazy" decoding="async" width="885" height="446" src="https://robbelroot.de/wp-content/uploads/2022/01/Hacking-NET-Application-Example-App.gif" alt="Hacking NET Application Example App" class="wp-image-7392" title="Hacking NET Application Example App"/></a><figcaption>NET Application Example App hacking</figcaption></figure>



<h2 class="wp-block-heading" id="hacking-our-sample-application">Hacking our sample application</h2>



<figure class="wp-block-image size-full"><a href="https://robbelroot.de/wp-content/uploads/2022/01/Hacking-our-NET-sample-application-extracting-hardcoded-credentials.png"><img loading="lazy" decoding="async" width="1280" height="960" src="https://robbelroot.de/wp-content/uploads/2022/01/Hacking-our-NET-sample-application-extracting-hardcoded-credentials.png" alt="Hacking our NET sample application - extracting hardcoded credentials" class="wp-image-7396" title="Hacking our NET sample application - extracting hardcoded credentials"/></a><figcaption>Hacking our NET sample application &#8211; extracting hardcoded credentials</figcaption></figure>



<p><strong>To </strong>actually <strong>start hacking </strong>our little <strong>NET application</strong>, you <strong>need </strong>a <strong>tool</strong>, which is actually <strong>provided by </strong>the <strong>NET </strong>Framework itself.</p>



<p>So there is <strong>no big magic</strong>, <strong>or </strong>big action like &#8222;yeah you need to download x, y, z.. blabla..&#8220;.</p>



<p><strong>Everything </strong>you need, is <strong>mostly already in place</strong>, <strong>if </strong>you <strong>installed Visual Studio</strong>.</p>



<h3 class="wp-block-heading" id="the-needed-tool-ildasm">The needed tool – &#8222;ildasm&#8220;</h3>



<p>The <strong>tool needed is called</strong> &#8222;<strong>IL-Disassembler</strong>&#8220; or in short &#8222;<strong>ildasm</strong>&#8220; and resides in the &#8222;C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools&#8220; folder.</p>



<p><strong>Maybe </strong>you will <strong>find </strong>the tool <strong>in </strong>a slightly <strong>different location</strong>, <strong>if </strong>you have a <strong>different version </strong>of Visual Studio, etc.</p>



<p><strong>Double click the tool</strong> to open it and the <strong>following screen </strong>will appear:</p>



<figure class="wp-block-image size-full"><a href="https://robbelroot.de/wp-content/uploads/2022/01/IL-Disassembler-ildasm-screenshot.png"><img loading="lazy" decoding="async" width="389" height="282" src="https://robbelroot.de/wp-content/uploads/2022/01/IL-Disassembler-ildasm-screenshot.png" alt="IL-Disassembler ildasm screenshot" class="wp-image-7403" title="IL-Disassembler ildasm screenshot"/></a><figcaption>IL-Disassembler ildasm screenshot</figcaption></figure>



<p>Then <strong>go ahead and select your</strong> &#8222;&lt;YourApplicationName&gt;.<strong>dll</strong>&#8222;-<strong>file </strong>with the <strong>&#8222;File-&gt;Open&#8220; menu item</strong> (sorry, i only have the german version).</p>



<p>You can <strong>find this file inside the debug folder of your app </strong>(don&#8217;t forget to start debugging at least once, so the files are created!).</p>



<p>Just a <strong>quick side note</strong>: This will <strong>also work for </strong>the <strong>release </strong>&#8222;.dll&#8220;-file!</p>



<p><strong>Expand the nodes as shown</strong> in the screenshot, then you will find the function we are looking for.</p>



<figure class="wp-block-image size-full"><a href="https://robbelroot.de/wp-content/uploads/2022/01/IL-Disassembler-ildasm-viewing-the-checklogin-function.png"><img loading="lazy" decoding="async" width="389" height="597" src="https://robbelroot.de/wp-content/uploads/2022/01/IL-Disassembler-ildasm-viewing-the-checklogin-function.png" alt="IL-Disassembler ildasm viewing the checklogin function" class="wp-image-7411" title="IL-Disassembler ildasm viewing the checklogin function"/></a><figcaption>IL-Disassembler ildasm viewing the checklogin function</figcaption></figure>



<p>If you <strong>finally double click that &#8222;CheckLogin&#8220;-function</strong>, a <strong>dialog will</strong> appear, where you can <strong>inspect the IL code</strong> for this function.</p>



<p><strong>There </strong>you will <strong>see </strong>you <strong>hardcoded credentials</strong> – <strong>congratulations, you hacked the program</strong>!</p>



<figure class="wp-block-image size-full"><a href="https://robbelroot.de/wp-content/uploads/2022/01/Finished-hacking-the-net-application-by-revealing-hardcoded-credentials.png"><img loading="lazy" decoding="async" width="624" height="394" src="https://robbelroot.de/wp-content/uploads/2022/01/Finished-hacking-the-net-application-by-revealing-hardcoded-credentials.png" alt="Finished hacking the net application by revealing hardcoded credentials" class="wp-image-7414" title="Finished hacking the net application by revealing hardcoded credentials"/></a><figcaption>Finished hacking the net application by revealing hardcoded credentials</figcaption></figure>



<h2 class="wp-block-heading" id="downloads">Downloads</h2>



<div class="wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex">
<div class="wp-block-button"><a class="wp-block-button__link" href="https://bit.ly/hacking-a-dot-net-application-download" target="_blank" rel="noreferrer noopener">SimpleHackExample.zip</a></div>
</div>



<h2 class="wp-block-heading" id="related-posts">Related posts</h2>



<ul class="wp-block-list"><li><strong><a href="https://robbelroot.de/blog/creating-a-vb-net-datagridview-filter-functionality/" target="_blank" rel="noreferrer noopener">How to filter a DataGridView in VB NET</a></strong></li><li><strong><a href="https://robbelroot.de/blog/hacking-a-webshop/" target="_blank" rel="noreferrer noopener">Hacking a Webshop</a></strong></li><li><strong><a href="https://robbelroot.de/blog/converting-davinci-resolve-markers-to-youtube-chapters/" target="_blank" rel="noreferrer noopener">Converting DaVinci Resolve markers to YouTube chapters</a></strong></li></ul>
<p>Der Beitrag <a href="https://robbelroot.de/blog/hacking-a-net-application/">&#x1f575;&#xfe0f; Hacking a NET Application</a> erschien zuerst auf <a href="https://robbelroot.de">Robert Skibbe</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://robbelroot.de/blog/hacking-a-net-application/feed/</wfw:commentRss>
			<slash:comments>7</slash:comments>
		
		
			</item>
	</channel>
</rss>
