Contribute  :  Web Resources  :  Past Polls  :  Site Statistics  :  Downloads  :  Forum  
    BiW ReversingThe challenge is yours    
 Welcome to BiW Reversing
 Thursday, June 01 2023 @ 02:08 PM CEST
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Discussion about latest version of SoftWrap,better than Arm?

 
Post new topic   Reply to topic    www.reversing.be Forum Index -> Unpacking
View previous topic :: View next topic  
Author Message
balaiazataeara
New to the board
New to the board


Joined: 01 Mar 2007
Posts: 6

PostPosted: Fri Mar 02, 2007 8:46 pm    Post subject: Discussion about latest version of SoftWrap,better than Arm? Reply with quote

Hello! Looks like Biw has a great community. Let's try to discuss with them to see if they bite me. Very Happy

SoftWrap

The latest version of softwrap is very hard to crack, if you want to give a try, go on hxxp://www.g a m e maker.nl and download g a m e m a k e_r 7

Interesting how it detects Olly. I looked on google, I can't find articles or even one thread about a version softwrap greater than 6.11. How would like to discuss of ways to unpack it or atleast hide the debuggers. Softwrap is signing licenses with a lot of game houses. In a near future we will see more Softwarp than armadillo as I see it.

intructions where it seems to detect olly :
Code:

006841E6     FF95 C8770100        CALL DWORD PTR SS:[EBP+177C8]              ; USER32.GetDesktopWindow
006841EC     8D5D 0A              LEA EBX,DWORD PTR SS:[EBP+A]
006841EF     53                   PUSH EBX
006841F0     50                   PUSH EAX
006841F1     FF95 C0770100        CALL DWORD PTR SS:[EBP+177C0]                    ; USER32.GetWindowRect
006841F7     FF95 88770100        CALL DWORD PTR SS:[EBP+17788]                    ; kernel32.GetModuleHandleA


It sends a 0 as argument to GetModuleHandleA.
""If this parameter is NULL, GetModuleHandle returns a handle of the file used to create the calling process. ""
Could it be this ?
Or, ""The GetWindowRect function retrieves the dimensions of the bounding rectangle of the specified window. The dimensions are given in screen coordinates that are relative to the upper-left corner of the screen. ""
Does it detects Olly with this, if the dimensions aren't 0 then Debugguer is detected?

I have HideDebugguer and Olly invisible with all options. Also, I'm not a pro reverser so maybe i'm totally wrong.
Back to top
View user's profile Send private message
bengunn
Regular
Regular


Joined: 15 Apr 2005
Posts: 118

PostPosted: Fri Mar 02, 2007 11:27 pm    Post subject: Reply with quote

With a Repair patched Olly and Asterix Hidedebugger you shouldn't have any problems debugging it. From the quick look I had of there's nothing here that hasn't been covered in available tutorials, including if I'm not mistaken, one by haggar. Search this forum and snd tutorials.
Back to top
View user's profile Send private message
balaiazataeara
New to the board
New to the board


Joined: 01 Mar 2007
Posts: 6

PostPosted: Sat Mar 03, 2007 2:11 am    Post subject: Reply with quote

Thank you very much, I will look further into this. Very Happy
Back to top
View user's profile Send private message
haggar
Regular
Regular


Joined: 19 Mar 2005
Posts: 246

PostPosted: Sat Mar 03, 2007 11:41 am    Post subject: Reply with quote

Better than Armadillo - not even close.

Softwrap can be patched with ease, unpacking is harder because imports needs to be fixed. Disabled softwrap protected software can be enabled with ease too. That is if we talk about version 7.

I was examining it on "morpheus ultra". I have some OEP scripts.
Back to top
View user's profile Send private message
balaiazataeara
New to the board
New to the board


Joined: 01 Mar 2007
Posts: 6

PostPosted: Sat Mar 03, 2007 6:43 pm    Post subject: Reply with quote

I not sure it's ver.7 but I can say the unpacking process is VERYYYYYYY LOOOOOOOOONG in Olly. About 1 or 2 minutes.
Back to top
View user's profile Send private message
haggar
Regular
Regular


Joined: 19 Mar 2005
Posts: 246

PostPosted: Sat Mar 03, 2007 7:23 pm    Post subject: Reply with quote

Hi, try this script for finding OEP. It should work if version is the same:


Code:
/*
==================================================================
        Softwrap/Xlok v7 - OEP finder script by haggar
==================================================================
Notes:
- Remove ALL software, memory and hardware breakpoints!
- Ignore ALL exceptions!
- Script needs Windows NT operating system.
- Script only works on Softwrap v7 targets.

==================================================================
*/

var addr
var ImportBlock

//---------------- Preparing imports for dumping -----------------
gpa    "VirtualAlloc","kernel32.dll"
findop $RESULT,#C21000#
bp     $RESULT
esto
sti

find eip,#558BEC81C4E4FEFFFF608B45108945F88B450C8945F4#
cmp  $RESULT,0
je   ERROR
bp   $RESULT
esto
bc   eip
esto
bc   eip

mov  addr,eip
add  addr,36
fill addr,1,90
add  addr,1
fill addr,1,0e9
bp   addr
esto
bc   eip
sti
sti
sti
mov ImportBlock,ebx

//-------------- Skip Softwrap.dll loading -------------------
gpa    "LoadLibraryA","kernel32.dll"
findop $RESULT,#C20400#
bp     $RESULT
esto
bc     eip
sti
sti

find eip,#53FF15????????5F5E5B83C574C9C3FF742404#
cmp  $RESULT,0
je   ERROR
mov  eip,$RESULT

find eip,#33C05940C20C00#
cmp  $RESULT,0
je   ERROR
bp   $RESULT
esto
bc   eip
rtr
sti
rtr
sti

//------------------------ Find OEP ---------------------------
find eip,#E8000000005FBE3600000003F7B90F0100005681EE090000008BFE33C0AC#
cmp  $RESULT,0
je   ERROR
add  $RESULT,30
bp   $RESULT
esto
bc   eip
add  $RESULT,2
bp   $RESULT
esto
bc   eip

find eip,#803F9D740A8188#
cmp  $RESULT,0
je   ERROR
bpcnd $RESULT,"byte ptr ds:[edi]==9d"
esto
bc    eip

mov addr,edi
add addr,1
bp  addr
esto
bc  eip

find eip,#5A8BDB8BC0FFE0#
cmp  $RESULT,0
je   ERROR
add  $RESULT,5
bp   $RESULT
esto
bc   eip
sti
cmt  eip,"<--- This is OEP!"

//------------------------- END -----------------------------------
log " "
log "Block with import jumps is at:"
log ImportBlock

ret
ERROR:
msg "Error occurred! Send bugs to HAGGAR at BIW reversing."
ret
Back to top
View user's profile Send private message
balaiazataeara
New to the board
New to the board


Joined: 01 Mar 2007
Posts: 6

PostPosted: Sat Mar 03, 2007 8:25 pm    Post subject: Reply with quote

It doesn't work so this is a version higher than 7. It stops at :

Code:

779E8026   PUSH DWORD PTR DS:[77A653CC]
779E802C   CALL DWORD PTR DS:[<&KERNEL32.LoadLibraryA>]
779E8032   MOV ESI,DWORD PTR DS:[<&KERNEL32.GetProcAddress>]
779E8038   PUSH 779E80E8 ;CryptAcquireContextW
779E803D   PUSH EAX
779E803E   MOV DWORD PTR DS:[77A652D8],EAX
779E8043   CALL ESI
779E8045   PUSH 779E80D8 ;CryptSignHashW
779E804A   PUSH DWORD PTR DS:[77A652D8]


With the "send bug to haggar" windows.
Back to top
View user's profile Send private message
haggar
Regular
Regular


Joined: 19 Mar 2005
Posts: 246

PostPosted: Sat Mar 03, 2007 10:07 pm    Post subject: Reply with quote

Ha ha, I forgot that "bug report". I was planning to write general softwrap unpacker script but I lost interest. I didn't test it on enough targets. I should write instead "shit happens" Smile


It is probably different version. Try place bp at the end of LoadLibrary and run untill it loads softwrap.dll. That DLL has all anti tricks, don't remember anymore which one. But imortant thing is that you can skipp DLL code executing and by that skip all tricks, license checks, time limit. Procedure inside protected exe that loads DLL has two ends. One is if program will continue to OEP and unpacking, second is just exit in case that you close window or if trial has ended.


If you download Morpheus Ultra, I can explain you protection on that example. I have that app for some time on my hard drive.
Back to top
View user's profile Send private message
balaiazataeara
New to the board
New to the board


Joined: 01 Mar 2007
Posts: 6

PostPosted: Sun Mar 04, 2007 5:20 am    Post subject: Reply with quote

Thanks for the tips but, ho well, I tried. I bped on the mov esb,ebp then ran till I saw 'softwrap.dll' in argument, noped the call to LoadLibraryExA before passing it, then did an undo so everything is as it was, then when I reach the return, it brings me to somewhere in the main module totally not at the right place Confused . It bring me here :
Code:

0069AE22     84FF                 TEST BH,BH
0069AE24     A2 FEFF8985          MOV BYTE PTR DS:[8589FFFE],AL
0069AE29     8265 01 00           AND BYTE PTR SS:[EBP+1],0
0069AE2D     61                   POPAD
0069AE2E     C3                   RET
0069AE2F     33C0                 XOR EAX,EAX <-----------------------
0069AE31     394424 04            CMP DWORD PTR SS:[ESP+4],EAX
0069AE35     74 13                JE SHORT 0069AE4A
0069AE37     E8 00000000          CALL 0069AE3C
0069AE3C     58                   POP EAX


Also, verification are done before the dll is loaded. And when I press play, everything goes fine, but if I step, it detects me, probably with clock verifications. You should download the program, I will try to download morpheus with my slow connection Surprised and I will look at it Wink
Back to top
View user's profile Send private message
haggar
Regular
Regular


Joined: 19 Mar 2005
Posts: 246

PostPosted: Sun Mar 04, 2007 2:35 pm    Post subject: Reply with quote

It's like this with Morpheus, which should be latest Softwrap (but maybe new version is out):


- You place bp at LoadLibraryA API end. Ei,
go to -> expression -> LoadLibraryA

Code:
7C801D77 > 8BFF             MOV EDI,EDI                              ; ntdll.7C910738
7C801D79   55               PUSH EBP
7C801D7A   8BEC             MOV EBP,ESP
7C801D7C   837D 08 00       CMP DWORD PTR SS:[EBP+8],0
7C801D80   53               PUSH EBX
7C801D81   56               PUSH ESI
7C801D82   74 14            JE SHORT kernel32.7C801D98
7C801D84   68 F0E2807C      PUSH kernel32.7C80E2F0                   ; ASCII "twain_32.dll"
7C801D89   FF75 08          PUSH DWORD PTR SS:[EBP+8]                ; Morpheus.<ModuleEntryPoint>
7C801D8C   FF15 9C13807C    CALL DWORD PTR DS:[<&ntdll._strcmpi>]    ; ntdll._stricmp
7C801D92   85C0             TEST EAX,EAX
7C801D94   59               POP ECX                                  ; kernel32.7C816D4F
7C801D95   59               POP ECX                                  ; kernel32.7C816D4F
7C801D96   74 12            JE SHORT kernel32.7C801DAA
7C801D98   6A 00            PUSH 0
7C801D9A   6A 00            PUSH 0
7C801D9C   FF75 08          PUSH DWORD PTR SS:[EBP+8]                ; Morpheus.<ModuleEntryPoint>
7C801D9F   E8 ABFFFFFF      CALL kernel32.LoadLibraryExA
7C801DA4   5E               POP ESI                                  ; kernel32.7C816D4F
7C801DA5   5B               POP EBX                                  ; kernel32.7C816D4F
7C801DA6   5D               POP EBP                                  ; kernel32.7C816D4F
7C801DA7   C2 0400          RETN 4


Maybe API will look different in your case, but RETN 4 must be somewhere there. It is end of API, since LoadLibraryA has only one parameter it must end on RETN 4.

- Return to softwrap

Code:
00AD2828   FF15 20D0AD00    CALL DWORD PTR DS:[ADD020]               ; kernel32.LoadLibraryA
00AD282E   8BD8             MOV EBX,EAX                              ; softwrap.00AF0000
00AD2830   8D85 30FDFFFF    LEA EAX,DWORD PTR SS:[EBP-2D0]
00AD2836   50               PUSH EAX                                 ; softwrap.00AF0000
00AD2837   53               PUSH EBX
00AD2838   E8 1EFEFFFF      CALL 00AD265B
00AD283D   8B35 1CD0AD00    MOV ESI,DWORD PTR DS:[ADD01C]            ; kernel32.GetProcAddress
00AD2843   59               POP ECX                                  ; kernel32.7C801BF6
00AD2844   59               POP ECX                                  ; kernel32.7C801BF6
00AD2845   68 30D1AD00      PUSH 0ADD130                             ; ASCII "swNegotiate"
00AD284A   53               PUSH EBX
00AD284B   FFD6             CALL ESI                                 ; Morpheus.00583E51
00AD284D   68 20D1AD00      PUSH 0ADD120                             ; ASCII "swAccessQuery"
00AD2852   53               PUSH EBX
00AD2853   8945 5C          MOV DWORD PTR SS:[EBP+5C],EAX            ; softwrap.00AF0000
00AD2856   FFD6             CALL ESI                                 ; Morpheus.00583E51
00AD2858   8BF0             MOV ESI,EAX                              ; softwrap.00AF0000
00AD285A   8D85 68FFFFFF    LEA EAX,DWORD PTR SS:[EBP-98]
00AD2860   57               PUSH EDI
00AD2861   50               PUSH EAX                                 ; softwrap.00AF0000
00AD2862   FF55 5C          CALL DWORD PTR SS:[EBP+5C]
00AD2865   59               POP ECX                                  ; kernel32.7C801BF6
00AD2866   59               POP ECX                                  ; kernel32.7C801BF6
00AD2867   68 04010000      PUSH 104
00AD286C   8D85 64FEFFFF    LEA EAX,DWORD PTR SS:[EBP-19C]
00AD2872   50               PUSH EAX                                 ; softwrap.00AF0000
00AD2873   6A 00            PUSH 0
00AD2875   FF15 30D0AD00    CALL DWORD PTR DS:[ADD030]               ; kernel32.GetModuleFileNameA
00AD287B   8D45 CC          LEA EAX,DWORD PTR SS:[EBP-34]
00AD287E   50               PUSH EAX                                 ; softwrap.00AF0000
00AD287F   8D85 64FEFFFF    LEA EAX,DWORD PTR SS:[EBP-19C]
00AD2885   50               PUSH EAX                                 ; softwrap.00AF0000
00AD2886   E8 C5FAFFFF      CALL 00AD2350
00AD288B   8D45 24          LEA EAX,DWORD PTR SS:[EBP+24]
00AD288E   50               PUSH EAX                                 ; softwrap.00AF0000
00AD288F   8D85 68FFFFFF    LEA EAX,DWORD PTR SS:[EBP-98]
00AD2895   57               PUSH EDI
00AD2896   50               PUSH EAX                                 ; softwrap.00AF0000
00AD2897   E8 54FDFFFF      CALL 00AD25F0
00AD289C   8D85 9CFDFFFF    LEA EAX,DWORD PTR SS:[EBP-264]
00AD28A2   50               PUSH EAX                                 ; softwrap.00AF0000
00AD28A3   6A 40            PUSH 40
00AD28A5   8D85 68FFFFFF    LEA EAX,DWORD PTR SS:[EBP-98]
00AD28AB   50               PUSH EAX                                 ; softwrap.00AF0000
00AD28AC   6A 02            PUSH 2
00AD28AE   6A 01            PUSH 1
00AD28B0   6A 20            PUSH 20
00AD28B2   5F               POP EDI
00AD28B3   8D85 00FEFFFF    LEA EAX,DWORD PTR SS:[EBP-200]
00AD28B9   57               PUSH EDI
00AD28BA   50               PUSH EAX                                 ; softwrap.00AF0000
00AD28BB   E8 B00C0000      CALL 00AD3570
00AD28C0   FF75 7C          PUSH DWORD PTR SS:[EBP+7C]
00AD28C3   8D45 38          LEA EAX,DWORD PTR SS:[EBP+38]
00AD28C6   57               PUSH EDI
00AD28C7   50               PUSH EAX                                 ; softwrap.00AF0000
00AD28C8   FFD6             CALL ESI                                 ; Morpheus.00583E51
00AD28CA   8D85 9CFDFFFF    LEA EAX,DWORD PTR SS:[EBP-264]
00AD28D0   50               PUSH EAX                                 ; softwrap.00AF0000
00AD28D1   8D45 38          LEA EAX,DWORD PTR SS:[EBP+38]
00AD28D4   57               PUSH EDI
00AD28D5   50               PUSH EAX                                 ; softwrap.00AF0000
00AD28D6   E8 15FDFFFF      CALL 00AD25F0
00AD28DB   8D45 CC          LEA EAX,DWORD PTR SS:[EBP-34]
00AD28DE   83C4 48          ADD ESP,48
00AD28E1   50               PUSH EAX                                 ; softwrap.00AF0000
00AD28E2   E8 99E8FFFF      CALL 00AD1180
00AD28E7   57               PUSH EDI
00AD28E8   8D45 38          LEA EAX,DWORD PTR SS:[EBP+38]
00AD28EB   50               PUSH EAX                                 ; softwrap.00AF0000
00AD28EC   8D45 CC          LEA EAX,DWORD PTR SS:[EBP-34]
00AD28EF   50               PUSH EAX                                 ; softwrap.00AF0000
00AD28F0   E8 CBE8FFFF      CALL 00AD11C0
00AD28F5   8D45 CC          LEA EAX,DWORD PTR SS:[EBP-34]
00AD28F8   50               PUSH EAX                                 ; softwrap.00AF0000
00AD28F9   E8 E2E9FFFF      CALL 00AD12E0
00AD28FE   8D85 C4FCFFFF    LEA EAX,DWORD PTR SS:[EBP-33C]
00AD2904   50               PUSH EAX                                 ; softwrap.00AF0000
00AD2905   53               PUSH EBX
00AD2906   E8 50FDFFFF      CALL 00AD265B
00AD290B   83C4 1C          ADD ESP,1C
00AD290E   6A 04            PUSH 4
00AD2910   59               POP ECX                                  ; kernel32.7C801BF6
00AD2911   8DBD 1CFDFFFF    LEA EDI,DWORD PTR SS:[EBP-2E4]
00AD2917   8DB5 88FDFFFF    LEA ESI,DWORD PTR SS:[EBP-278]
00AD291D   33C0             XOR EAX,EAX                              ; softwrap.00AF0000
00AD291F   F3:A7            REPE CMPS DWORD PTR ES:[EDI],DWORD PTR D>
00AD2921   74 07            JE SHORT 00AD292A
00AD2923   50               PUSH EAX                                 ; softwrap.00AF0000
00AD2924   FF15 2CD0AD00    CALL DWORD PTR DS:[ADD02C]               ; Morpheus.00583E80
00AD292A   6A 04            PUSH 4
00AD292C   59               POP ECX                                  ; kernel32.7C801BF6
00AD292D   8D7D 60          LEA EDI,DWORD PTR SS:[EBP+60]
00AD2930   8D75 24          LEA ESI,DWORD PTR SS:[EBP+24]
00AD2933   33C0             XOR EAX,EAX                              ; softwrap.00AF0000
00AD2935   F3:A7            REPE CMPS DWORD PTR ES:[EDI],DWORD PTR D>
00AD2937   74 07            JE SHORT 00AD2940
00AD2939   50               PUSH EAX                                 ; softwrap.00AF0000
00AD293A   FF15 2CD0AD00    CALL DWORD PTR DS:[ADD02C]               ; Morpheus.00583E80
00AD2940   53               PUSH EBX <------------------- Place new origin here, when you exit LoadLibraryA.
00AD2941   FF15 24D0AD00    CALL DWORD PTR DS:[ADD024]               ; kernel32.FreeLibrary
00AD2947   5F               POP EDI
00AD2948   5E               POP ESI                                  ; Morpheus.00583E51
00AD2949   5B               POP EBX
00AD294A   83C5 74          ADD EBP,74
00AD294D   C9               LEAVE
00AD294E   C3               RETN


Notice that procedure has two conditional JE jumps at the end. Second jump skips ExitProcess and leads to FreeLibrary that will unload softwrap.dll. When you exit LoadLibraryA, place new origin at that line and softwrap.dll will be unloaded and anti--stuff will be skipped, trial end avoided, etc.
Back to top
View user's profile Send private message
balaiazataeara
New to the board
New to the board


Joined: 01 Mar 2007
Posts: 6

PostPosted: Sun Mar 04, 2007 4:52 pm    Post subject: Reply with quote

I did everything like you said but,

in morpheus ultra, the program terminated (not really surprising, it must just be a empty program, so you install the trojaned bar in you Internet explorer when you install it Rolling Eyes )

In gam_e_mm_a_ker 7, the verications are done anyway (a popup before the program start saying OMG YOU ARE USING LITE VERSION, YOU MUST BUY !)

Ok so I suppose it works, but the program is not registered by default, I try to find the oep, to see what can I do.

Thank you for your help ! Very Happy
Back to top
View user's profile Send private message
elance
New to the board
New to the board


Joined: 09 Mar 2007
Posts: 2

PostPosted: Tue Mar 13, 2007 11:28 am    Post subject: Reply with quote

balaiazataeara wrote:
And when I press play, everything goes fine, but if I step, it detects me, probably with clock verifications.


maybe multithred and check "0xCC"?
Back to top
View user's profile Send private message Visit poster's website
hunkiller
New to the board
New to the board


Joined: 17 Feb 2007
Posts: 1

PostPosted: Sun May 06, 2007 9:40 pm    Post subject: Reply with quote

Hi Haggar, could you please tell me how to find OEP in Morpheus Ultra (Softwrap 7)?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    www.reversing.be Forum Index -> Unpacking All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
 Copyright © 2023 BiW Reversing
 All trademarks and copyrights on this page are owned by their respective owners.
Powered By Geeklog 
Created this page in 0.91 seconds