WindSLIC boot CD

Discussion in 'MDL Projects and Applications' started by nononsence, Sep 3, 2009.

  1. junkie_

    junkie_ MDL Novice

    Sep 29, 2009
    1
    0
    0
    Indeed.

    I registered just to post this comment. This activator works perfectly. Best designed of the bunch.

    Thank you so much!

    Cheers.
     
  2. nononsence

    nononsence MDL Addicted

    Aug 18, 2009
    806
    826
    30
    #62 nononsence, Sep 29, 2009
    Last edited by a moderator: Apr 20, 2017
    (OP)
    I think this way might be better

    Code:
    Private Sub Form1_closing(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles MyBase.Closing
            If busy = 1 Then
                e.Cancel = True
            End If
        End Sub
    
    this will stop the form from closing when busy is set to 1

    at the top of the code

    Code:
    dim busy
    
    then set busy = 1 at the top Sub Button1_Click
    busy = 0 at the bottom of Sub Button1_Click

    and do the same for Sub Button2_Click
     
  3. VIIZ

    VIIZ MDL Novice

    Sep 30, 2009
    10
    0
    0
    Great job nononsence!! keep it up ;)
     
  4. Hazar

    Hazar MDL Guru

    Jul 29, 2009
    2,507
    456
    90
    This is a nice bit of kit, your VB skills are better than mine :D
     
  5. Alphawaves

    Alphawaves Super Moderator/Developer
    Staff Member

    Aug 11, 2008
    6,218
    22,277
    210
    Im also using nononsense's as my base it works on all machines here, but im new to vb so i would pm nononsense he is very helpful, im sure he will know the problem..

    Alfa:);)
     
  6. Hazar

    Hazar MDL Guru

    Jul 29, 2009
    2,507
    456
    90
    His examples are really good to learn how to migrate from scripts, even if he does hate me j/k

    Like detecting the key.

    Just one thing though, why are you adding the extra space at the end and the microsoft in front of the reg detection for the key? Just remove the from the string search and the edition value.
     
  7. Brainsuck

    Brainsuck MDL Addicted

    Oct 9, 2009
    676
    157
    30
    #68 Brainsuck, Oct 9, 2009
    Last edited by a moderator: Apr 20, 2017


    or you could do it like this

    Code:
    private busy as boolean


    Code:
    Private Sub Form1_closing(ByVal sender As System.Object, ByVal e As 
                e.Cancel = busy
     End Sub
    

    then set busy = true at the top Sub Button1_Click
    busy = false at the bottom of Sub Button1_Click

    and do the same for Sub Button2_Click


    lol just to get rid of the if then statements
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  8. PAYMYRENT

    PAYMYRENT MDL Developer

    Jul 28, 2009
    1,460
    420
    60
    #70 PAYMYRENT, Oct 9, 2009
    Last edited by a moderator: Apr 20, 2017
    oops like this

    Code:
    
        Private busy As Boolean
        Private Sub Form1_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
    
            If busy = False Then
                Unmount()
                CleanUp()
            Else
                e.Cancel = busy
                Exit Sub
            End If
    
        End Sub
    
    
     
  9. nononsence

    nononsence MDL Addicted

    Aug 18, 2009
    806
    826
    30
    #71 nononsence, Oct 9, 2009
    Last edited by a moderator: Apr 20, 2017
    (OP)
    thats perfect! it seemed off when I wrote it.

    because this app has executables as resources, it is vulnerable to a resource
    exploit, if you plan on publicly posting your completed work, please consider
    doing a check on booinst.exe an bootsect.exe before the app launches it.

    take a peek at the System.Security.Cryptography namespace
     
  10. PAYMYRENT

    PAYMYRENT MDL Developer

    Jul 28, 2009
    1,460
    420
    60
    #72 PAYMYRENT, Oct 9, 2009
    Last edited by a moderator: Apr 20, 2017
    what brain suck did was a tweak to your original program

    i can or you can add md5 or sha1 hashing to check bootinst.exe and or bootsect.exe if you want lol



    Code:
    
    
    
    Namespace SHA1MD5
        'This code comes from codeproject.com
        'It was originally written in C# but has been converted to vb.net
        Public NotInheritable Class DTHasher
            Private Sub New()
            End Sub
            Private Shared Function ConvertStringToByteArray(ByVal data As String) As Byte()
                Return (New System.Text.UnicodeEncoding()).GetBytes(data)
            End Function
            Private Shared Function GetFileStream(ByVal pathName As String) As System.IO.FileStream
                Return (New System.IO.FileStream(pathName, System.IO.FileMode.Open, System.IO.FileAccess.Read, System.IO.FileShare.ReadWrite))
            End Function
            Public Shared Function GetSHA1Hash(ByVal pathName As String) As String
                Dim strResult As String = ""
                Dim strHashData As String = ""
    
                Dim arrbytHashValue As Byte()
                Dim oFileStream As System.IO.FileStream = Nothing
    
                Dim oSHA1Hasher As New System.Security.Cryptography.SHA1CryptoServiceProvider()
    
                Try
                    oFileStream = GetFileStream(pathName)
                    arrbytHashValue = oSHA1Hasher.ComputeHash(oFileStream)
                    oFileStream.Close()
    
                    strHashData = System.BitConverter.ToString(arrbytHashValue)
                    strHashData = strHashData.Replace("-", "")
                    strResult = strHashData
                Catch ex As System.Exception
                    System.Windows.Forms.MessageBox.Show(ex.Message, "Error!", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.[Error], System.Windows.Forms.MessageBoxDefaultButton.Button1)
                End Try
    
                Return (strResult)
            End Function
            Public Shared Function GetMD5Hash(ByVal pathName As String) As String
                Dim strResult As String = ""
                Dim strHashData As String = ""
                Dim arrbytHashValue As Byte()
                Dim oFileStream As System.IO.FileStream = Nothing
                Dim oMD5Hasher As New System.Security.Cryptography.MD5CryptoServiceProvider()
                Try
                    oFileStream = GetFileStream(pathName)
                    arrbytHashValue = oMD5Hasher.ComputeHash(oFileStream)
                    oFileStream.Close()
    
                    strHashData = System.BitConverter.ToString(arrbytHashValue)
                    strHashData = strHashData.Replace("-", "")
                    strResult = strHashData
                Catch ex As System.Exception
                    System.Windows.Forms.MessageBox.Show(ex.Message, "Error!", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.[Error], System.Windows.Forms.MessageBoxDefaultButton.Button1)
                End Try
    
                Return (strResult)
            End Function
        End Class
    End Namespace
    
    
    
    
    
    
    
     
  11. sadom

    sadom MDL Novice

    Jul 8, 2009
    25
    1
    0
    #73 sadom, Oct 9, 2009
    Last edited: Oct 9, 2009
    only the first line:
    , is the difference between working and --------? :eek:
    thx, will try that :)


    EDIT:
    does not work: :confused:

     
  12. nononsence

    nononsence MDL Addicted

    Aug 18, 2009
    806
    826
    30
    #74 nononsence, Oct 10, 2009
    Last edited by a moderator: Apr 20, 2017
    (OP)
    Im not really that concerned about it, this app isnt challanging anyone to
    use an attack like that. and even the weakest AV will catch the normal
    way apps get repacked with malware. If someone wanted to goto war with
    the malware guys the resource exploit would be the next probable attack, they should be aware of it.

    but if you want to post code for other people to use feel free.

    .
     
  13. PAYMYRENT

    PAYMYRENT MDL Developer

    Jul 28, 2009
    1,460
    420
    60
    you told brainsuck to look af system.security.cryptography namespace and i was only giving code i had to make it easier for anyone that wanted to look at or even use that namespace
     
  14. sadom

    sadom MDL Novice

    Jul 8, 2009
    25
    1
    0
    @nononsense: ill try that, thx
     
  15. nononsence

    nononsence MDL Addicted

    Aug 18, 2009
    806
    826
    30
    added the Samsung keys
    added some simple attempts at resource obfuscation, checking.
    added can't close app when busy
     
  16. PAYMYRENT

    PAYMYRENT MDL Developer

    Jul 28, 2009
    1,460
    420
    60
    #79 PAYMYRENT, Oct 11, 2009
    Last edited by a moderator: Apr 20, 2017

    Attached Files:

  17. nononsence

    nononsence MDL Addicted

    Aug 18, 2009
    806
    826
    30
    #80 nononsence, Oct 11, 2009
    Last edited by a moderator: Apr 20, 2017
    (OP)