Jump to content

Obfuscator (discontinued)


Jos
 Share

Recommended Posts

I've seen this before. trancexxx has some really long lines / line continuations in the WinHttp UDF, especially the __WinHttpMIMEAssocString function, which I think is the specific problem. Instead of the current string implementation of that function, try something like:

Func a()
    Local $s = "start the string"
    $s &= "continue the string"
    $s &= "end the string"
    Return $s
EndFunc

Yes, you are right. the __WinHttpMIMEAssocString function in WinHTTP.au3 UDF has a very long string. Thanks a lot.

Edited by meokey
Link to comment
Share on other sites

  • 4 months later...

The obfuscator does not obfuscate the functionnames parsed to _Timer_SetTimer.

Example:

#include <Timers.au3>

$hWnd = GUICreate("random GUI")
GUISetState()
_Timer_SetTimer($hWnd, 300, "_MyTimerCallback")

Do
Until GUIGetMsg() = -3

Func _MyTimerCallback($hWnd, $Msg, $iIDTimer, $dwTime)
    Static $i = 1
    $i += 1
    If $i > 5 Then _Timer_KillTimer($hWnd, $iIDTimer)
    MsgBox(0, "Hey", "It worked.")
EndFunc

Output:

>### current Func: _Timer_SetTimer
C:\Program Files\AutoIt3\include\Timers.au3(275,1) Warning for line:$hCallBack = DllCallbackRegister($sTimerFunc, "none", "hwnd;int;uint_ptr;dword")

I think it would be ok if included UDFs do not throw any error and if function parameters get fixxed, depending on the work time.

Link to comment
Share on other sites

  • Developers

Not sure what you are proposing here, but Obfuscator will throw this Error/Warning whenever DllCallbackRegister() or other funcs are used that will likely disable the script.

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

What I meant is that you actually know the "built in UDFs" and can make them compatible so that the Obfuscator will obfuscate the string for the functionname (given as parameter to _Timer_SetTimer()) as well (like in AdlibRegister()) and will not produce any errors. I don't know if this is can be done for every function but this DllCallbackRegister() call can be modified easily.

Edited by FichteFoll
Link to comment
Share on other sites

Hm, I didn't think about that since I never used it... That would be complicated, yeah.

Well, _Timer_SetTimer is buggy on Win XP/Vista and had a different behavior than I experienced on my Win7 system so I couldn't use it anyway. But maybe you think about it.

Link to comment
Share on other sites

file: main.au3

#AutoIt3Wrapper_Run_Obfuscator=y
#Obfuscator_Parameters=/striponly
#include 'include_pre_main.au3'
#OnAutoItStartRegister "AutoStart_main"
#include 'include_post_main.au3'
Func AutoStart_main()
EndFunc
file: include_pre.au3
#OnAutoItStartRegister "AutoStart_include_pre_main"
Func AutoStart_include_pre_main()
EndFunc
file: include_post.au3
#OnAutoItStartRegister "AutoStart_include_post_main"
Func AutoStart_include_post_main()
EndFunc
file: main_Obfuscated.au3
#OnAutoItStartRegister "AutoStart_include_pre_main"
#OnAutoItStartRegister "AutoStart_main"
#OnAutoItStartRegister "AutoStart_include_post_main"
Func AutoStart_main()
EndFunc

Why are the functions "AutoStart_include_pre_main()" and "AutoStart_include_post_main()" stripped/missing in the "main_Obfuscated.au3" file ?

"Straight_and_Crooked_Thinking" : A "classic guide to ferreting out untruths, half-truths, and other distortions of facts in political and social discussions."
"The Secrets of Quantum Physics" : New and excellent 2 part documentary on Quantum Physics by Jim Al-Khalili. (Dec 2014)

"Believing what you know ain't so" ...

Knock Knock ...
 

Link to comment
Share on other sites

  • Developers

Uploaded a new Beta version of Obfuscator which has the following fixes:

v1.0.28.14 : Fixed multi layer #CS / #CE
v1.0.28.13 : Added support for #OnAutoItStartRegister

Thanks for the reports,

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • Developers

hi Jos, where i can find this v1.0.28.14

thanks

LHW

http://www.autoitscript.com/autoit3/scite/download/beta_SciTE4AutoIt3/

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Does anyone have solution for ?

-### Obfuscation Error: Found DllCallbackRegister() statement using unsolvable Func, which will/could lead to problems running your obfuscated script.
>### current Func: _Timer_SetTimer
d:\Program Files\AutoIt3\include\Timers.au3(275,1) Warning for line:$hCallBack = DllCallbackRegister($sTimerFunc, "none", "hwnd;int;uint_ptr;dword")

Btw @Jos, i dont complain, awesome job but if anyone can help me make this work would be great :)

Link to comment
Share on other sites

  • 2 weeks later...

In:

#Obfuscator_Parameters=/cs=0 /cn=0 /cf=0 /cv=1 /sf=1 ;; (/sv=0|1) (/om)
;; <snip, +inside function ... a OnAutoItStart function, in case that matters.>
    Assign('DebugOut_NULL', Eval('DB_EA8D_sNULL'), 2)
Log:
>Running Obfuscator (1.0.28.14)  from:C:\CODE\AutoIt3\SciTE cmdline:
- Iteration 1 Strip Functions result: Output  1363 lines and stripped 711 lines
- Iteration 2 Strip Variables result: Output  1105 lines and stripped 215 lines
- Iteration 3 Strip Variables result: Output  1098 lines and stripped 7 lines
- Iteration 4 Start the actual Obfuscation.
+> Source    6541 lines 370819 Characters.
+> Stripped  933 Func/Var lines and  4461 comment lines, Total 332047 Characters.
+> Saved     82% lines 89% Characters.
+> Obfuscator v1.0.28.14 finished obfuscating 1096 lines, created:D:\...\____STARTUP_____Obfuscated.au3
Out:
Assign('DebugOut_NULL', Eval('A0130102A4D'), 2)

q1: No warning(s)/error(s) from Obfuscator for Assign() use ?

(do get them when changing /sf=1 to /sf=0.)

q2: Seeing varname's in Eval() got adjusted, is same (limited) support for Assign() statements planned ? (or already WIP)

Edited by singularity

"Straight_and_Crooked_Thinking" : A "classic guide to ferreting out untruths, half-truths, and other distortions of facts in political and social discussions."
"The Secrets of Quantum Physics" : New and excellent 2 part documentary on Quantum Physics by Jim Al-Khalili. (Dec 2014)

"Believing what you know ain't so" ...

Knock Knock ...
 

Link to comment
Share on other sites

  • Developers

I get this with the posted script:

- Iteration 1 Strip Functions result: Output  1 lines and stripped 0 lines
- Iteration 2 Strip Variables result: Output  1 lines and stripped 0 lines
- Iteration 3 Start the actual Obfuscation.
-###2 Obfuscation Error: Found Assign() statement which will lead to problems running your obfuscated script.
>### current Func: Main Script
C:\....\OBs47E4.tmp(1,1) Warning for line:Assign('DebugOut_NULL', Eval('DB_EA8D_sNULL'), 2) 

-#############################################################################################
-#### Obfuscator Found   1 Error(s)!!!!    This means your script could have problems running properly.  ####
-#############################################################################################
+> Obfuscator v1.0.28.14 finished obfuscating 1 lines, stripped 2 comment lines. created:C:\....\test2_Obfuscated.au3

2. Literal strings that represent FuncNames or VarNames are supported by Obfuscator in some occasions in some internal functions.

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

More debugging needed on my part ... bummer.

"Straight_and_Crooked_Thinking" : A "classic guide to ferreting out untruths, half-truths, and other distortions of facts in political and social discussions."
"The Secrets of Quantum Physics" : New and excellent 2 part documentary on Quantum Physics by Jim Al-Khalili. (Dec 2014)

"Believing what you know ain't so" ...

Knock Knock ...
 

Link to comment
Share on other sites

Not done yet ... but will probably turn out to be a local issue, if I get that far ...

But:

1) <snip>

2) "#Obfuscator_Parameters=/cs=0 /cn=0 /cf=0 /cv=0 /sf=0 /sv=0" trigger's Assign() warnings, while there seem to be no need for them. (no variable- or function-name renaming or any string mangling is active) ... Or is there a need I'm not seeing ?

"Straight_and_Crooked_Thinking" : A "classic guide to ferreting out untruths, half-truths, and other distortions of facts in political and social discussions."
"The Secrets of Quantum Physics" : New and excellent 2 part documentary on Quantum Physics by Jim Al-Khalili. (Dec 2014)

"Believing what you know ain't so" ...

Knock Knock ...
 

Link to comment
Share on other sites

Here you go, a full minimal working example. With no distracting items.

#AutoIt3Wrapper_Run_Obfuscator=y

#Obfuscator_Parameters=/cs=0 /cn=0 /cf=0 /cv=1 /sf=1 /sv=0
;~ #Obfuscator_Parameters=/cs=0 /cn=0 /cf=0 /cv=1 /sf=1 /sv=1

;~ #Obfuscator_Parameters=/cs=0 /cn=0 /cf=0 /cv=1 /sf=0 /sv=0
;~ #Obfuscator_Parameters=/cs=0 /cn=0 /cf=0 /cv=1 /sf=0 /sv=1

#OnAutoItStartRegister "AutoStart_main"

Func AutoStart_main()
    Assign('variable', 'Data', 0)
    ConsoleWrite('Eval("variable") = ' & Eval('variable') & @CRLF)
EndFunc

"Straight_and_Crooked_Thinking" : A "classic guide to ferreting out untruths, half-truths, and other distortions of facts in political and social discussions."
"The Secrets of Quantum Physics" : New and excellent 2 part documentary on Quantum Physics by Jim Al-Khalili. (Dec 2014)

"Believing what you know ain't so" ...

Knock Knock ...
 

Link to comment
Share on other sites

  • Developers

Uploaded a new Beta version of Obfuscator which has the following fixes:

v1.0.28.15 : Fixed assign/execute warnings in case parameter /sf=1 is specified.

Thanks for the report,

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Lately been considering stopping support on the obfuscation part and renaming the program to something like au3strip.exe because the only bit I use myself is the stripping of unused Funcs and Global variables.

Mmm, Not that I think it would make a difference. But to counteract a possible "well, nobody seemed to have a problem with it" result.

[-1]

Don't know if it makes sens to split the different obfuscator parts ... as obfuscation is a combination of multiple things. But some things can be done as single stand alone (per pre-compile) tools. (for which there is also no need to protect there source code.)

If obfuscator would only deal with, or target, string and number encryption ... it might simplify things a bit ... or not of course.

Edited by singularity

"Straight_and_Crooked_Thinking" : A "classic guide to ferreting out untruths, half-truths, and other distortions of facts in political and social discussions."
"The Secrets of Quantum Physics" : New and excellent 2 part documentary on Quantum Physics by Jim Al-Khalili. (Dec 2014)

"Believing what you know ain't so" ...

Knock Knock ...
 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...