Jump to content
Tuts 4 You

AdvancedScript x64dbg Plugin


ahmadmansoor

Recommended Posts

ahmadmansoor
Posted (edited)

just a try to add more feature's to x64dbg script system
History Section:
- version 2.0:
1-all numbers are hex numbers.
2-more nested in arguments.
3-Build bridge to make plugin system Compatible with x64dbg script system.
4-create parallel Functions to x64dbg Functions, like ( cmp >> cmpx ).
5-rename new name (Varx Getx Setx) and fix array index entry.
6-add VarxClear ( clear all variable to help user in test's ) , memdump with print style.
- version 1.6:
1- add Parser system to recognize arguments.
2- begin build Script system.
3- add more Helper Functions.
- version 1.4:
1- make StrCompx in separate Thread and add Sleep time to wait x64dbg to finish process.
2- Fix Hex2duint function add length check in case it less than 2 .
- version 1.3:
1- Add another argument to cbLogxJustAtBP for printing on LogxWindow.
2- now it accept bool argument like this (true/false-on/off-1/0).
3- add StrComp_BP function for compare string in memory at BP.
4- compiled x32.

Source Code:
https://github.com/Ahmadmansoor/AdvancedScript

If you find it useful please let me know, and if you want to add more feature's please leave a comment.

support both x86 and x64
BR

AdvancedScript.v2.0.rar

Edited by ahmadmansoor
  • Like 10
  • 1 month later...
Posted (edited)

AdvancedScript beta version

it is beta version it could have bug, so please report and if u like to add more features let me know.
version 2.5 beta :
1- Script window is sperate.
2- Create Folder for script,form Load script with category.
3- add more mirror Functions (xorx - pushx ...), and Functions like
( if , goto,writestr ) to shortcut the work.
4- show all variables in a list with it's values.
5- edit script onfly.
6- enable to define array with range like z[n].
7- writestr Function.
8- run from anyware in the script.
9- rest variables list in case maintenance.
10- insert rows as much as you need.
11- insert from clipboard replace all script.
12- insert from clipboard inside the script.
13- copy separated lines to used in other script.
14- insert description without confusing wink.gif.
15- add the dll file of c++ runtime for each package.
16- add some scripts samples.
17- as it is beta version so it support one step not auto step , use F12 for step, sorry for that
I need to check if it work then I will add auto step :}

note : I forget to say use (Scriptw) command to show the Script window , but git has stop working frown.gif
and copy the script sample to ur script folder in x64dbg folder

and pls read the help first

 

52273727-1d816b00-2964-11e9-83a5-2e587e7

 

AdvancedScript_2.5beta.zip

Edited by ahmadmansoor
  • Like 5
  • Thanks 1
  • 3 weeks later...
Posted (edited)

- version 2.8 :
1- fix a lot of bugs in calculations and get values.
2- F11 run/stop script now Enabled, F12 step script.
3- get values for nasted variables like $x[$z+1]
4- add new commands (ret ,GetAPIName ,ResizeArray ,GetArraySize ,Write2File ,inputbox).
5- add Dependency and samples Script as separate package.

releases 2.8

this is sample to write a tracer:

varx str,path,"E:\temp1\log.txt"
varx str,addr
varx str,APIname
varx int,OEP,0000000140226B80
varx array,temp[1]
varx int,i,0
if {rip}=$OEP,int,14d,7d
resizearray $temp,1
setx $addr,{rax}
GETAPIName $APIname,$addr
setx $temp[$i],$addr    $APIname
setx $i,$i + 1
go
goto 6d
varx int,sizeArray,0
GetArraySize $temp,$sizeArray
if $sizeArray=0,int,19d,17d
write2file $path,1,$temp[$sizeArray]
setx $sizeArray,$sizeArray -1
goto 16d

 

 

52273727-1d816b00-2964-11e9-83a5-2e587e7

 

AdvancedScript_2.8.zip

Edited by ahmadmansoor
  • Like 5
  • 4 weeks later...
ahmadmansoor
Posted (edited)

AdvancedScript version 3.0

releases

 

1- add help file and command help on the form.
2- add ads lib like ("GetAPIName","GetArraySize","ReadStr","GetdesCallJmp","isInArray","isAddrBelongSection").
3- Write2File_ can write array directly.
4- add commentset command.
5- replace Script:biggrin.gifebug::Wait(); with waitPauseProcess();
6- at ret command .
7- AutoComplete for Functions and variables and ads lib.
8- add log box for future work.
9- add AutoUpdate checkbox for enable disable update of variables list.
10- fix some bug and improve some others like (findallmemx) .
11- add tuts how to use.
 

AdvancedScript How to

 

Script How to fix IAT

 

Themida API Comment Script Good for Static Analyzing

ScriptWindow 3.0.png

Edited by ahmadmansoor
  • Like 2
  • Thanks 1
  • 1 month later...
ahmadmansoor
Posted (edited)
AdvancedScript_3.1

- fix CheckHexIsValid ( fix length ).

- add menu to (copy - follow - delete) variables .

- add more check for StrAnalyze.

- add MsgBox for if command in a case does not resolve arguments.

note : copy can copy one value or all values in case Array variables 

 

image.png.256146a1b8af7c0dc6df812bf84849d5.png

AdvancedScript_3.1.zip Script.zip

Edited by ahmadmansoor
  • Like 2
  • Thanks 2
CodeExplorer
Posted

No File->Load ??? Or the ability to run a script txt file?
 

  • Like 1
ahmadmansoor
Posted (edited)

hmmm for now there is no File load,But I will add this in next version.

but u can copy the Script from the text file then Insert in Script Window.

after that u can define category then save Script,which will be saved in Script Folder under x64dbg under  category .

please check the tuts in previous post .

and Thanks for testing, if u find any bugs or any Improve , I will be happy to do it.

 

note : for run the Script by F12 or F11, if the DataGridView not have the focus then when you press F11 or F12 for the  first  time it will set the  focus on the DataGridView  then second press will executed the command.

Edited by ahmadmansoor
  • 1 month later...
Posted

hello,

could you  tell me' varx str,MagicLine,"480B0424"'   what's  the  MagicLine mean>  like  Magic jump ?

ahmadmansoor
Posted

New update AdvancedScript 4.0 with new GUI
will upload it soon, I hope u like it guys smile.gif
https://youtu.be/pEMKHpYjqxs

@ysl146 my friend it's var name not else the value after it is the one u need it :)

 

 

ahmadmansoor
Posted

59259568-1c7e8400-8c4b-11e9-8c3e-3bbf2b6

 

image.png.19c1ccd7e1c749110350215bf3dcf585.png

- version 4.0:
	1- add RegexSearch form.
	2- New GUI after replace DataGridView with RichTextBox to easy deal and fast coding.
	3- edit CustomBuildStep to Auto copy files (AdvSconfig.txt , HelpAdvancedScript.txt).
	4- add AutocompleteMenu.dll .
	5- add copy AutocompleteMenu.dll to x64dbg root .
	6- add AdvSconfig.txt for AutoComplete list for define Commands and variables.
	7- update AutocompleteMenu.dll.
	8- add comments_ to Variables class to add it next to the description of the variables when call them by Ctrl+j
	9- call list var's by Ctrl+j
	10- add ReFill_FunctionsAutoComplete_AtLoad.	 
	11- highlight_system done for good look and analyze.
	12- add autoCompleteFlexibleList to handle commands defined in AdvSconfig.txt.
	13- add open Script from out side.
	14- refresh by menu and F5 to refresh highlight_system.
	15- add var of x64dbg system.
	
	note : by AdvSconfig.txt u can define the commands in AdvancedSecript .

 

 

 

AdvancedScript_4.0.zip

  • Like 8
  • Thanks 3
  • 3 weeks later...
ahmadmansoor
Posted (edited)

Hi
New Update with more features smile.gif :
https://github.com/Ahmadmansoor/AdvancedScript

AdvancedScript version 4.3

https://github.com/Ahmadmansoor/AdvancedScript/releases

* Add new commands and fix some bugs
* fix error load of the Auto Commands when there is no ;
* Fix AutoRun and stepson ( wait command to finish).
* Fix color variable name.
* Add ReadFile , Write2Mem , ReadMem
* Add GoToByBase Form  ( https://www.youtube.com/watch?v=gQxlbC8RnRg )
* Assigne variable directly no need to Setx Commandsmile.gif.

 

image.png.fccd5bd91e5065b8742328b42221d59d.png

Sample :
Varx str,memory			// var will hold the hex value 
Varx int,rax_,0			// read rax value +1 
Varx str,ourStr			// read test string
ReadMem $memory,{rax},5
$rax_={rax} +1
$rax_=ads.exebase 
ReadStr $ourStr,{rdx}

 

Edited by ahmadmansoor
  • Like 4
  • 5 months later...
Posted

I'm I able to code scripts there that auto makes patches over the asm via x64dbg core? Because I don't think the the current scripts functions in there is supporting that

Posted

what u mean ? can u explain more !

new update coming ( Support SDK ).

  • 4 months later...
Posted

i can not start AdvancedScript in x64dbg ?? It is not shown in plugins.

Posted

Write Scriptw in command line.

  • 3 weeks later...
Posted

nice work man😉 Thanks!

  • 2 weeks later...
CoronaVyris
Posted
On 4/11/2020 at 2:47 PM, hacko said:

i can not start AdvancedScript in x64dbg ?? It is not shown in plugins.

same

  • 8 months later...
Posted
On 12/7/2019 at 6:48 PM, ahmadmansoor said:

what u mean...

hi 

can you help me with this?

this a script for ollydbg that i want to use in x64dbg:

pause
////////////////////////
LOOP:
bc eip
run
jmp LOOP

 

  • 3 months later...
sitikomariah
Posted (edited)

Sorry, my mistake. 

 

--- post deleted ---

 

Edited by sitikomariah

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...