Comments (3)
yes lets temporarily use UC_HOOK_MEM_INVALID & UC_MEM_NX for now. will be be able to comment further when your code is out. thanks.
from unicorn.
NX is usually a global setting that is applied to the whole virtual machine. imho, as long as we are using uc_mem_* apis to allocate memory and use it, and the only way to allow code running in unicorn to allocate more memory is via syscalls (which needs to be emulated by the host code) i dont see much reason into marking the mem pages with this permission.
So, if we use normal RWX permission logic we can handle mprotect syscalls and restrict whatever W^X, NX or any other custom thing we want to handle. Also, malware and other magic software overlaps two memory maps on the same address, or concatenating them in order to have two maps at different virtual address with different permissions, but same physical address, and therefor bypassing those kernel page protection restrictions. Is this possible with the current uc_mem api?
Btw, qemu also supports configuring the MMU in assembly, how's that handled by unicorn?
from unicorn.
PR merged, thanks.
from unicorn.
Related Issues (20)
- Invalid instruction (vpxorq) HOT 6
- RISC-V Compilation Error HOT 27
- Unicorn2 crashes but Unocorn1 ok HOT 1
- https://github.com/unicorn-engine/unicorn/pull/1801#issuecomment-1462736510
- use cmake build for macos Xcode show errors! HOT 7
- Function `code_gen_alloc` calls `exit()` HOT 2
- Segfault on tb_target_set_jmp_target_x86_64 HOT 2
- v2.1.0 Plan HOT 9
- Re-align Unicorn register enum values with updated Capstone register enum values HOT 2
- Question and maybe even suggestion : ) HOT 3
- unicorn for cygwin HOT 1
- RISC-V64 incorrectly returns error when calling `emu_start` with `count` = 1 at end of page
- Memory hooks cause incorrect emulation of the carry flag for the SAR instrution on x86_64 HOT 2
- ctl_set_cpu_model issues HOT 2
- Difference between memory and block hooks HOT 5
- mips 3 issues HOT 2
- When running x86 simulation in unrestricted mode, there's an EFLAGS error upon exiting HOT 3
- distutils deprecation
- UC_HOOK_INTR not observed HOT 1
- Changing x86 32 bit execution to x86 64 bit and vice versa HOT 3
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 unicorn.