Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
This repository was archived by the owner on Jun 8, 2023. It is now read-only.
/jsrtPublic archive

javascript runtime ( JSRT ) project for windows , based on chakra

License

NotificationsYou must be signed in to change notification settings

tinysec/jsrt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

  • javascript runtime for windows , based onchakra
  • author: TinySec(@TinySecEx )
  • JSRT is friend for binary hacker , special for windows.
  • this version is a public new version , feel free to open issue.
  • always download the latest version.

DOCUMENTS

https://github.com/tinysec/jsrt/wiki

host type

filenamehostarchusage
js.execonsolei386js.exe [options] [--eval script or script.js] [arguments]
js64.execonsoleamd64js64.exe [options] [--eval script or script.js] [arguments]
jsw.exewindowi386jsw.exe [options] [--eval script or script.js] [arguments]
jsw64.exewindowamd64jsw64.exe [options] [--eval script or script.js] [arguments]
jsida.plwIDAi386[options] [--eval script or script.js] [arguments]
jsida.p64IDAamd64[options] [--eval script or script.js] [arguments]
jswd.dllwindbgi386!js [options] [--eval script or script.js] [arguments]
jswd64.dllwindbgamd64!js [options] [--eval script or script.js] [arguments]
jsk.syskerneli386TODO , support kernel access
jsk64.syskernelamd64TODO , support kernel access

notice that , all other dll files under i386/amd64 is just optional

just compatible to my first version.

native support feature

  • real native multi-thread support
  • 64-bit number
  • Buffer
  • host full memory access , and support both GC and manual memory manager.
  • c-like printf and sprintf
  • ffi , support some windows type , full windows api access
  • serialize and unserialize
  • re-entry support for windbg and ida mode
  • portable fromwindows xp ~ windows 10 rs2
  • small dist.
  • anything you want for binary hack.

todolist

  • firefox style ctypes
  • c-style struct and union handle
  • kernel support
  • more documents.

usage

Usage:js[options][--evalscriptorscript.js][arguments]Options:--versionshowversion--verboseverbosemode--helpshowhelp--evalevalmodeEnvironment:JSRT_SYSTEM_MODULE_PATHsystemjsrtmodulesearchpathJSRT_MODULE_PATHcommonjsrtmodulesearchpathJSRT_IDA_MODULE_PATHjsrt-idamodulesearchpathJSRT_WINDBG_MODULE_PATHjsrt-windbgmodulesearchpathmoreinfoisat https://github.com/tinysec/jsrt

jsrt

xp ~ win10 rs2 support

xp_support

real multi thread support

thread_support

visual studio debug support( need windows 10 )

visual_stduio_support

example

enum windows

constffi=require("ffi");constprintf=require("cprintf").printf;constsprintf=require("cprintf").sprintf;constKdPrint=require("cprintf").KdPrint;varhUser32=ffi.loadLibrary("user32.dll");varfnEnumWindows=ffi.bindModule(hUser32,"BOOL WINAPI EnumWindows(_In_ void* lpEnumFunc,_In_ LPARAM      lParam); ");varfnGetClassNameA=ffi.bindModule(hUser32,"int WINAPI GetClassNameA(_In_  HWND   hWnd,_Out_ LPTSTR lpClassName,_In_  int    nMaxCount);");// BOOL CALLBACK EnumWindowsProc(_In_ HWND   hwnd,_In_ LPARAM lParam);functionenumRoutine(hWnd,lParam){varlpClassNameA=Buffer.alloc(250).fill(0);varnRet=0;nRet=fnGetClassNameA(hWnd,lpClassNameA,250);printf("0x%p -> %s|\n",hWnd,lpClassNameA.toString());lpClassNameA.free();returntrue;}functionmain(){varlpEnumFunc=ffi.thunk(enumRoutine,"BOOL CALLBACK EnumWindowsProc(_In_ HWND   hwnd,_In_ LPARAM lParam);");fnEnumWindows(lpEnumFunc,0);lpEnumFunc.free();return0;}if(!module.parent){main();}

and you will got

0x0001014A->ForegroundStaging|0x00010176->ForegroundStaging|0x000100FC->tooltips_class32|0x00010100->tooltips_class32|0x002F0A7E->NetUIToolWindow|0x01840922->NetUIToolWindow|0x02A50EF4->tooltips_class32|0x016D0E1A->UIRibbonStdCompMgr|0x02A00DCC->tooltips_class32|0x010C0DA4->tooltips_class32|0x00890D2E->tooltips_class32|0x0001041A->Chrome_SystemMessageWindow|0x00010414->Base_PowerMessageWindow|0x00010180->IME|0x00010148->IME|0x0001011C->IME|0x02630B5A->IME|0x015A074C->IME|..........

history

JSRT project had two version ,

  • the pre-version is self use , not-published , it was written between 2015-07 ~ 2016-09
  • the current version is going to public release , support some compatible to other bindings.

the pre-version is used for kernel fuzz ( self use , not-published)

javascript kernel fuzz

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp