Git Product home page Git Product logo

frida-wshook's People

Contributors

idiom avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

frida-wshook's Issues

frida-wshook seems broken with recent versions of frida.re

Hello,

First of all, thank you very much for releasing frida-wshook.

I've tried to run the script with the current version of frida.re (12.6.16) and it seems that the script does not work correctly with this version.
I've managed to get it to successfully run with an older version of frida by using a pip install frida==10.1 to force a downgrade successfully.

I've tested with a simple ShellExec script (testing.js)

var shell = WScript.CreateObject("WScript.Shell");
shell.Run("calc.exe");

And here is the result:

> C:\Python27\python.exe .\frida-wshook.py .\testing.js
 [*] x64 detected..using SysWOW64
 [*] Setting Script Vars...
Setting Script Vars...
 [*] Hooking Process 4992
 Press ctrl-c to kill the process...
Microsoft (R) Windows Script Host Version 5.812
Copyright (C) Microsoft Corporation. All rights reserved.

 [!] Warning: Instrumentation script has been destroyed!
 [!] CScript process has terminated!
process-terminated
Traceback (most recent call last):
  File ".\frida-wshook.py", line 53, in on_detach
    print '     |- Process Id: %s' % message.pid
AttributeError: 'unicode' object has no attribute 'pid'

I believe the format of some structures changed in frida which requires probably some changes in the script. Additionally, I had to prefix script vars such as "ADDRESS_FAMILY" with "var " in order to remove some errors.

Dropping this issue for awareness - I will try to get a pull request if I get more time to look at it.

"Unable to wait for process" error causes script host to crash

Some scripts which call WScript.Shell.Run can cause an error to be thrown when the WaitOnReturn Parameter is set to True causing the command to be run synchronously
Example:
Set oShell = CreateObject("WScript.Shell") oShell.Run "cmd /c ping.exe 127.0.0.1 -n 250 > nul",0,1 WScript.Quit 0
Error: wsrun_fail.vbs(3, 1) WshShell.Run: Unable to wait for process.

Workaround
To work around the issue you can insert On Error Resume Next the line before the command which throws the error.

Although frida-wshook is hooking the windows API call, The error looks to be thrown before ShellExecute is called.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.