I am doing a penetration test right now. The machine I have low privileged shell doesn't have gcc on it. So I have to compile the C code in my Kali machine first. But the victim has lower kernel version and different architecture. Victim(Cent-OS) has i386, Kali has x86_64 arch. How can I do it in Kali?
Asked
Active
Viewed 748 times
0
-
Possible duplicate of [Cross compilation: special cross compiler or just gcc with option -march?](https://stackoverflow.com/questions/52521138/cross-compilation-special-cross-compiler-or-just-gcc-with-option-march) – Nic Jul 09 '19 at 19:24
1 Answers
3
Search the internet for "cross compilation", it's the real name standing for "compile from one arch to another". The process is well documented...
In my opinion, the kernel version mismatch isn't very important.
But you must take care about libc
version.
Moreover, try compiling with -static
flag will avoid dependency problems...
Note that is isn't a security question ... would better be asked in StackOverflow ...

binarym
- 357
- 2
- 10
-
3In the future, please flag questions that are off-topic instead of answering them. – MechMK1 Jul 09 '19 at 13:34