0

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?

sepp2k
  • 363,768
  • 54
  • 674
  • 675
frkntrn
  • 101
  • 1
  • 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 Answers1

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