Coder Social home page Coder Social logo

unmanaged struct Context64 about boo HOT 5 CLOSED

physics-sec avatar physics-sec commented on August 30, 2024
unmanaged struct Context64

from boo.

Comments (5)

masonwheeler avatar masonwheeler commented on August 30, 2024 1

Good to hear you got it working! 😄

from boo.

masonwheeler avatar masonwheeler commented on August 30, 2024

I don't see any obvious problem. So either there's something wrong with your struct definition, or there's something wrong with the function call, or there's something wrong with the original code. So try this:

  • First, verify that it works in C#.
  • Then, add the C# test as a dependency of your Boo project. Try calling the method from Boo, with the C# version of the struct.
  • Then try calling the C# method with the Boo version of the struct.

At one of these three points, it should break. That should tell you where the problem lies.

from boo.

physics-sec avatar physics-sec commented on August 30, 2024

That is a great idea, thank you!

from boo.

physics-sec avatar physics-sec commented on August 30, 2024

Well I am using this repo now: https://github.com/pwndizzle/c-sharp-memory-injection/blob/master/thread-hijack.cs
And I can confirm it works properly.
Same issue if I translate the structs/enums into my Boo script

I am not sure how to add that project to my Boo script as a dependency, do you have any resource or example I can see?
I don't wan't to waste much of your time

The idea of adding external dependencies to my Boo scripts sounds great. So far, I have been loading the .net assembly of some compiled program and then invoking the methods I want. I can just try that, but not sure how much informations it would give us about the issue

Boo is truly amazing, especially the compile from memory feature
Is like .net python, I love it

from boo.

physics-sec avatar physics-sec commented on August 30, 2024

Ok, turns out that the struct was well defined,
the issue was how I was calling GetThreadContext. I needed to add the line in the middle:

        context = CONTEXT64()
        context.ContextFlags = CONTEXT_FLAGS.CONTEXT_FULL
        success = GetThreadContext(threadHandle, context)

Sorry to wast your time!

from boo.

Related Issues (20)

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.