Hack Forums
[.NET] [SOURCE/TUT]VB.NET - Simple Builder and Stub! - 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] [SOURCE/TUT]VB.NET - Simple Builder and Stub! (/showthread.php?tid=5178964)



[SOURCE/TUT]VB.NET - Simple Builder and Stub! - .Lynx. - Feb 21, 2016

Hello!


For anyone who does not know how basic builder/stub works in VB.net, here is how to do it....


Here are both Visual Studio projects:


https(:)//drive(.)google.com/open?id=0B6a4KrMeAdDUUWdUcDB6bnBvdUk

I think this is as simple as it gets with Builder/Stub...
Basically builder sets the options for the stub and then the stub loads them..
Dont forget to add stub to builder´s resources.


If anyone has got any questions, feel free to pm me or reply to this thread.


STUB:

Code
Public Class Form1

    Const spl = "asdf"


    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load


        FileOpen(1, Application.ExecutablePath, OpenMode.Binary, OpenAccess.Read)
        Dim stub As String = Space(LOF(1))
        FileGet(1, stub)
        FileClose(1)
        Dim Options() As String = Split(stub, spl)

    
        Dim domain As String



        domain = Options(1)

        MsgBox(domain)

    End Sub
End Class




BUILDER:

Code
Private Sub BetaBlueButton1_Click(sender As Object, e As EventArgs) Handles BetaBlueButton1.Click



        Dim s As New SaveFileDialog
        s.Title = "Save as  exe!!!"
        Dim stub As String
        Dim all As String = ""
        Const Filesplit = "FormStub"
        Dim temp As String = IO.Path.GetTempPath() & "stub.exe"
        s.ShowDialog()
        If s.FileName > "" Then
            IP = domain.Text
            
            File.WriteAllBytes(temp, My.Resources.stub)   ' DONT FORGET TO ADD YOUR STUB TO RESOURCES
            FileOpen(1, temp, OpenMode.Binary, OpenAccess.Read, OpenShare.Default)
            stub = Space(LOF(1))
            FileGet(1, stub)
            FileClose(1)
            FileOpen(1, s.FileName & ".exe", OpenMode.Binary, OpenAccess.ReadWrite, OpenShare.Default)
            FilePut(1, stub & spl & IP & spl & Port & spl & Startup & spl & Regedit & spl & Melt & spl)
            FileClose(1)
            MsgBox("Done!", MsgBoxStyle.OkOnly)
        End If
    End Sub



* - Ninja - Feb 21, 2016

This is not a tutorial as it does not explain anything. All you do is release source. And I heard this method was a very detectable method. Anyways, you do not dispose of the filedialog. You do not check if the result was OK (so if someone exited the dialog then it can crash). You declare strings and later on assign their values, why not declare them when you assign the values? Saves a few lines. Also, you declared a variable FileSplit in the builder which you never used. Also, I swear I saw this code before somewhere.


* - ScΛrƒΛc3_ - Feb 21, 2016

This code is a 7-8 years back time travel tho.


* - .Lynx. - Feb 21, 2016

(Feb 21, 2016 11:11 AM)Tyranitar Wrote:  This is not a tutorial as it does not explain anything. All you do is release source. And I heard this method was a very detectable method. Anyways, you do not dispose of the filedialog. You do not check if the result was OK (so if someone exited the dialog then it can crash). You declare strings and later on assign their values, why not declare them when you assign the values? Saves a few lines. Also, you declared a variable FileSplit in the builder which you never used. Also, I swear I saw this code before somewhere.


Ok... maybe you did not get me.....
You might have seen it somewhere before..... But the thing is that its really well known. In fact its so simple that i can simply write it on a piece of paper w/o even looking it up on stackoverflow.. You think i ripped it off ? Ok then. That is your opinion..

But i dont get why you have to repfuck me.

Get your stuff straight first......


* - Ninja - Feb 21, 2016

(Feb 21, 2016 12:04 PM).Lynx. Wrote:  Ok... maybe you did not get me.....
You might have seen it somewhere before..... But the thing is that its really well known. In fact its so simple that i can simply write it on a piece of paper w/o even looking it up on stackoverflow.. You think i ripped it off ? Ok then. That is your opinion..

But i dont get why you have to repfuck me.

Get your stuff straight first......
I didn't repfuck you. And this is probably the worst code I have seen today, and it looks %100 similar to some code I saw today as well.


* - N3oNight - Feb 21, 2016

(Feb 21, 2016 11:33 AM)ScΛrƒΛc3_ Wrote:  This code is a 7-8 years back time travel tho.

looks like you missed some years 😅


* - .Lynx. - Feb 21, 2016

(Feb 21, 2016 12:09 PM)Tyranitar Wrote:  I didn't repfuck you. And this is probably the worst code I have seen today, and it looks %100 similar to some code I saw today as well.


You are clearly a "HQ" user....

==> Sees widely used piece of code

==> Sees similar one again

==> Repfucks the second user and says he ripped it off , yet the code is here for long time.......



Take a bit of time and think about yourself...


* - ScΛrƒΛc3_ - Feb 21, 2016

(Feb 21, 2016 12:09 PM)Tyranitar Wrote:  I didn't repfuck you. And this is probably the worst code I have seen today, and it looks %100 similar to some code I saw today as well.

Just today? Sure u have seen it. Is a method used at least since 8 years ago, u will find 100000000000 exact same on the web, posted here also multiple times in these years, was used before everyone jumped to Codedom or Cecil or dnlib or byte replacement, or Native Resources or other teqniques, and EOF get constantly detected.

OP, even a simple search here would give u better and "up to date" examples. Using EOF (with this method) will put you in a bad position from the start since is heavily detected.


(Feb 21, 2016 12:24 PM)N3oNight Wrote:  looks like you missed some years 😅

Probably im been quite optimistic, i cant even remember mate. 😏


* - Odus - Feb 21, 2016

(Feb 21, 2016 10:58 AM).Lynx. Wrote:  
Code
If s.FileName > "" Then

Whelp if nothing else, I haven't seen length validation like this before here.


* - Ninja - Feb 21, 2016

(Feb 21, 2016 12:26 PM).Lynx. Wrote:  You are clearly a "HQ" user....

==> Sees widely used piece of code

==> Sees similar one again

==> Repfucks the second user and says he ripped it off , yet the code is here for long time.......



Take a bit of time and think about yourself...
%100 similar means its the same. And again, repfuck is when all your positive rep is removed. I just -repped you. And this exact sample has been posted many times, so I am pretty sure it is not coded by you and you take credit for it.


* - tweety - Feb 21, 2016

Ah, this again .


* - Oliver Sykes - Feb 21, 2016

Well uh...
Not sure about you, but most of my classes don't include BetaBlueButtons.


* - .Lynx. - Feb 22, 2016

This was my original builder.... i just removed a lot of stuff in order to make it simple and understandable


* - LUOIdeRentA - Feb 22, 2016

Code
Public Class Form1

    Const spl = "asdf"


    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load


        FileOpen(1, Application.ExecutablePath, OpenMode.Binary, OpenAccess.Read)
        Dim stub As String = Space(LOF(1))
        FileGet(1, stub)
        FileClose(1)
        Dim Options() As String = Split(stub, spl)

    
        Dim domain As String



        domain = Options(1)

        MsgBox(domain)

    End Sub
End Class

[Image: dSitUBD.png]

Here's the link to the video: https://www.youtube.com/watch?v=cVQbZsNilDA
You'll find a few other coincidences as well ;)