Attempts in binary exploitation and creating exploits have been documented here.
Metasploit Utilities, Post Exploit Scripts and other scripts primarily for reference