Comments (4)
Right now the answer is: sort of... and you'd have to implement it yourself.
The long answer is that it's tricky due to Rust's strict memory aliasing rules, I'm using shared borrows all over the place to reference parts of the PE file exposed through that specific object's API. However that means you can't at the same time modify that memory (even though it may be disjoint, Rust just sees a &[u8]
spanning the whole image.
While I would like an API for setting up the PE for running from memory, due to the above considerations it is not implemented as I don't really know of a clean way to implement it in Rust.
So if you don't mind just hacking it, the proper way would be to copy the necessary information (imports, relocations, TLS) and then act on them after you've released all borrows you used to gather this information and implement it yourself.
from pelite.
I realized it. Thank you!
from pelite.
It turned out I was mistaken and it's fairly trivial to extend the functionality to manually map a DLL, see #12
It lacks support for:
- Prepare an EXE for the RunPE process creation technique, right now it can only load DLLs
- Inject a manually mapped DLL in another process, right now it can only load in your own process space.
from pelite.
I'll close this in favor of just tracking the pull request
from pelite.
Related Issues (20)
- Missing documentation on pattern macro
- Resources documentation is a mess
- Windows defender detects `tests\pocs\blob` as Trojan:Win32/Fuery.B!cl HOT 6
- Add json output to pedump HOT 1
- Read please!
- fchghfhfghxd
- Sample does not work since last pull (master) HOT 2
- New version of pelite-macros broke 0.8.1 HOT 3
- no `pattern_attribute` in the root HOT 2
- Misaligned address when trying to access Import section of some PEs HOT 4
- crates.io lists pelite as a command when it is a library HOT 1
- Add pelite::Wrap to the top level crate documentation HOT 2
- Writing to imports HOT 3
- UNWIND_INFO and unwind_info() is broken HOT 1
- Unable to read PE version on Linux HOT 5
- VersionInfo.fixed() return None while version info does exist HOT 5
- 32-bit linux build broken HOT 2
- Please help me get the version of the file in string format HOT 1
- Incorrect module base address used for PE32 mapped images using ASLR
- Add .rustfmt.toml to repo + format code HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pelite.