Hack Forums
[.NET] VB.Net Read (executable) Data - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118)
+---- Thread: [.NET] VB.Net Read (executable) Data (/showthread.php?tid=3876913)



VB.Net Read (executable) Data - iNViSi8LE - Nov 20, 2013

I mean if you drop executable file to notepad.exe you see: i don't know how its called all these characters?
Its possible to view all these chars in vb.net program textbox?
I tried io.file.readalltext("random.exe"), Only "MZ" appears, nothing else.
and there is no more chars than 2. How i can view all of them?

[Image: fX0Wlk9.png]

Thank you HF 🤗


* - SIM-964740 - Nov 20, 2013

Reading the data is possible with a program called .NET Reflector. Using notepad will not work so you will need to download .NET Reflector which I believe offers a free trial. But do note that many applications are crypted to prevent people from stealing the applications source code; this means that .NET Reflector may not show you what you want.

http://www.red-gate.com/products/dotnet-development/reflector/


* - 0xBB - Nov 20, 2013

Yeah , those are ascii value of each bytes. If you want to see them in a textbox (as brute byte) you can loop each of em and display them:

PHP Code

<?php 
Dim bString 
As New System.Text.StringBuilder
  Dim bArray 
As Byte() = IO.File.ReadAllBytes(Environment.GetFolderPath(Environment.SpecialFolder.Desktop) & "\reshacker.exe")
  For 
Each b As Byte In bArray
    bString
.Append(CInt(b))
  
Next
  RichTextBox1
.Text = bString.ToString 

[Edit]
My mistake, ty for correcting banksy.

Or use convert function (which is an ENCODING) :

PHP Code

<?php 
RichTextBox1
.Text = Convert.ToBase64String(IO.File.ReadAllBytes(Environment.GetFolderPath(Environment.SpecialFolder.Desktop) & "\reshacker.exe")) 



* - Only3 - Nov 20, 2013

converting it to hex is ur best way


* - Banksу - Nov 20, 2013

(Nov 20, 2013 03:34 AM)ibennz Wrote:  Yeah , those are ascii value of each bytes. If you want to see them in a textbox (as brute byte) you can loop each of em and display them:

PHP Code

<?php 
Dim bString 
As New System.Text.StringBuilder
  Dim bArray 
As Byte() = IO.File.ReadAllBytes(Environment.GetFolderPath(Environment.SpecialFolder.Desktop) & "\reshacker.exe")
  For 
Each b As Byte In bArray
    bString
.Append(CInt(b))
  
Next
  RichTextBox1
.Text = bString.ToString 

Or use convert function (which is an encryption) :

PHP Code

<?php 
RichTextBox1
.Text = Convert.ToBase64String(IO.File.ReadAllBytes(Environment.GetFolderPath(Environment.SpecialFolder.Desktop) & "\reshacker.exe")) 

Base64 is an encoding, not an encryption.


* - iNViSi8LE - Nov 21, 2013

I want see all that in vb.net (richtextbox)
[Image: fX0Wlk9.png]