Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question #2

Open
KRAFMA opened this issue Oct 3, 2022 · 25 comments
Open

Question #2

KRAFMA opened this issue Oct 3, 2022 · 25 comments

Comments

@KRAFMA
Copy link

KRAFMA commented Oct 3, 2022

Hello why you not implemented the :
InitializeProcThreadAttributeList
UpdateProcThreadAttribute
on the TransactedHollowing ?

Cause the actual parent id work but i know a better , is cause Ntcreateprocess ? need createprocess ?

@daem0nc0re
Copy link
Owner

My PE Injection PoCs use NtCreateProcessEx which allows PPID for 4th parameter, ao InitializeProcThreadAttributeList API and UpdateProcThreadAttribute API are not required.

public static extern NTSTATUS NtCreateProcessEx(

Additionally, I do so because I want to use only Nt APIs for PoC whenever possible.

@KRAFMA
Copy link
Author

KRAFMA commented Oct 4, 2022

Yes but is for implement block dll : BLOCK_NON_MICROSOFT_BINARIES_ALWAYS_ON

@daem0nc0re
Copy link
Owner

Thanks for sharing your opinion.
Essentially, the purpose of this repository is not to provide attack tools, but to provide PoCs for research or investigation about process execution techniques.
If the current implementation is inconvenient to investigate the technique, please give me specific examples so I can consider changing it.

@KRAFMA
Copy link
Author

KRAFMA commented Oct 9, 2022

i try some solution for Ntcreate and check the integrity process before spoof the ppid for have more target , i update you later
btw
Any your poc can load .net file ? or only for native file ?

@daem0nc0re
Copy link
Owner

Thanks for your support.

Any your poc can load .net file ? or only for native file ?

I have not tried with .NET file yet.
I've been busy lately and won't have time for a while, sorry.

@KRAFMA
Copy link
Author

KRAFMA commented Oct 10, 2022

@daem0nc0re
Copy link
Owner

Thanks for sharing!
I will try to address this issue next week or the week after.

@KRAFMA
Copy link
Author

KRAFMA commented Oct 11, 2022

I like your poc so i want try improve a bit :)
Good luck

@daem0nc0re
Copy link
Owner

I'm happy to hear that!
I will try as soon as possible 💪

@daem0nc0re
Copy link
Owner

I started from .NET binary issue and added .NET binary support to PE file parser of TransactedHollowing PoC.
But NtCreateProcessEx and NtMapViewOfSection returns NTSTATUS 0x4000000E : {Machine Type Mismatch} for .NET binary.
Do you have any idea?

@KRAFMA
Copy link
Author

KRAFMA commented Oct 17, 2022

<3 love you going test

@KRAFMA
Copy link
Author

KRAFMA commented Oct 17, 2022

I started from .NET binary issue and added .NET binary support to PE file parser of TransactedHollowing PoC. But NtCreateProcessEx and NtMapViewOfSection returns NTSTATUS 0x4000000E : {Machine Type Mismatch} for .NET binary. Do you have any idea?

Not very but i can investigate

@daem0nc0re
Copy link
Owner

OK.
I will continue to investigate the .NET issue, but will work on the PPID first.

@daem0nc0re
Copy link
Owner

Added the feature you requested to my TransactedHollowing PoC.
Check this commit.

@KRAFMA
Copy link
Author

KRAFMA commented Oct 24, 2022

Added the feature you requested to my TransactedHollowing PoC. Check this commit.

Love your work !!! good job
i have tested some solutions for try add net support but nothings new from my part

@KRAFMA
Copy link
Author

KRAFMA commented Oct 29, 2022

Little issue , if i choose block dll but the ppid is 0 we can got a error like this (sorry french pc)

1f112ee408e5afa03c5df1e5cf5e96ed

@KRAFMA
Copy link
Author

KRAFMA commented Oct 29, 2022

Simply fixed if you add int ppid = 0 in your parameter for method call :CreateTransactedHollowingProcess and CreateInitialProcess

@daem0nc0re
Copy link
Owner

I cannot reproduce your issue and found no issue in the code.
It seems that you tried to execute GUI required PE image.
My NtCreateUserProcess implementation is minimal so does not support GUI required PE image.

@KRAFMA
Copy link
Author

KRAFMA commented Oct 30, 2022

Is the block dll make this , cause a process try open the transacted process injected i think

@KRAFMA
Copy link
Author

KRAFMA commented Nov 22, 2022

Hey how are you ? can you check transacted on win 7 , seem the block dll not work or not implemented on win 7 so the new transacted crash but not the old , maybe just check os like this return (string)Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\Windows NT\CurrentVersion").GetValue("ProductName");
If i put false on the block dll the NtCreateUserProcess crash on the processparameter

@daem0nc0re
Copy link
Owner

daem0nc0re commented Nov 25, 2022

Hi.
Currently, my interest lies in other projects and not interested in Windows 7 things so much.
So it will take some time, but will deal with it in due time.

@KRAFMA
Copy link
Author

KRAFMA commented Feb 26, 2023

Hello how are you ?
i'm back to work and i'm find this : https://github.com/Shrfnt77/DynamicSyscalls/tree/main/Examples/ProcessHollowing

Is a simply processhollow very light and work for .net payload with NtApi (ppid spoof and PROCESS_CREATION_MITIGATION_POLICY) but only for x64
Maybe this can help you for find how add or fix your poc's for support .net payload

@daem0nc0re
Copy link
Owner

Thanks for sharing!
I am busy these days and will check when it comes (maybe after April).

@KRAFMA
Copy link
Author

KRAFMA commented Feb 28, 2023

I can try reduce a maximum for more simply if you need/want
And put normal api vs syscall

@KRAFMA
Copy link
Author

KRAFMA commented Mar 17, 2023

How i can contact you please ? I trying twitter but seem your dm not opened

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants