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

运行报错了 #5

Open
YDHCUI opened this issue Aug 30, 2022 · 6 comments
Open

运行报错了 #5

YDHCUI opened this issue Aug 30, 2022 · 6 comments

Comments

@YDHCUI
Copy link

YDHCUI commented Aug 30, 2022

thread '' panicked at 'cannot access a Thread Local Storage value during or after destruction: AccessError', library\std\src\thread\local.rs:388:26
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace
error: process didn't exit successfully: target\debug\saas.exe (exit code: 0xc0000409, STATUS_STACK_BUFFER_OVERRUN)

exe是用rust写的 直接运行是没问题的

@YDHCUI
Copy link
Author

YDHCUI commented Aug 30, 2022

我试了go写的exe 正常exe能运行,upx压缩过的exe就不行了

@EddieIvan01
Copy link
Owner

这个库用在免杀框架里,所以没更新,bug 还有好几处

https://github.com/EddieIvan01/memexec/blob/master/src/peloader/mod.rs#L179 加上

mem::transmute::<*const c_void, PIMAGE_TLS_CALLBACK>(*tls_callback_addr)(
    base_addr,
    DLL_THREAD_ATTACH,
    0 as _,
);

@YDHCUI
Copy link
Author

YDHCUI commented Aug 30, 2022

好吧,我fork一份自己来改

@HToTH
Copy link

HToTH commented Feb 15, 2023

图片

我也是go程序可以,但是rust程序不行,我调试的时候感觉是载入内存后算入口函数出了问题,是不是rust和go编译后的pe有区别。

@jihuoyouxiang
Copy link

@YDHCUI 你好,你解决这个问题了吗?我也遇到同样的问题了

@HToTH
Copy link

HToTH commented Mar 19, 2023

我解决这个问题了,主要是因为gnu和msvc的不同。内存执行x86_64-pc-windows-gnu编译的exe就不会出问题。@jihuoyouxiang

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

4 participants