I found many vulnerabilities but almost all of them require gcc which is not available on most of my target machines.

I was wondering if it's possible to run dirtycow without gcc installed or what is the alternative to do it?

  • 1
    This question is just a "how do I compile a piece of software on machine A, and run it on machine B". Relation to infosec is incidental. – domen Jan 3 '19 at 15:12

The DirtyCOW PoC page contains a list of proof of concept exploits, including several that do not require GCC. There is one written in Go and even one which requires only an assembler. You can also analyze how the exploit works and implement it yourself in whatever language is available to you.

  • cc: error trying to exec 'cc1': execvp: No such file or directory I will try ruby – Born vs. Me Jan 3 '19 at 14:18
  • @Bornvs.Me Oh so I guess the Ruby one was just a compiler wrapper. Yeah. – forest Jan 3 '19 at 14:20
  • Yes I saw it, its for metasploit, I ahve access to the machine already, I dont know what metasploit can help me do – Born vs. Me Jan 3 '19 at 14:23
  • @Bornvs.Me I removed the mention of Ruby. You can use Go, or implement it yourself. – forest Jan 3 '19 at 14:24
  • is go available out of the box? how can I implement it myself? any tuts? – Born vs. Me Jan 3 '19 at 14:29

Unless i'm missing something... just compile it on another machine and copy it over? Although if you dont have access to a system with a compatible compiler then i suppose THAT is your problem. You do not strictly need gcc on the target.

  • DO I need to compile with another identical machine? – Born vs. Me Jan 3 '19 at 14:49
  • I did compile with anothe rlinux (higher version) but It displays an error – Born vs. Me Jan 3 '19 at 14:50
  • 1
    Is there any list of precompiled dirtycow? – Born vs. Me Jan 3 '19 at 14:51

Not the answer you're looking for? Browse other questions tagged or ask your own question.