I'm interested in studying the effects (crashes, signals sent, logs, etc.) of different types of exploited vulnerabilities (DoS, ROP, remote shells, etc.) in specific software (particularly webservers such as NGINX, Apache, etc.). For instance, I'm interested in comparing different error logs generated by Apache when attacks are launched.
Setting such a test environment is cumbersome and time-consuming. Currently, my best option seems to be to utilize exploit-db to find a variety of exploits and set up the appropriate vulnerable software. However, different versions of a software have different behavior. For instance, Apache 1 and Apache 2 have slightly different log generation functions, and thus, comparing logs between them is not ideal. Also, it can be the case that an exploit works in one version and not in another and so on.
Ideally, I would love to have something like a Damn Vulnerable Apache in which the software behavior stays the same but I easily exploit it in a variety of ways. Is there such a thing? Ideas on how to best approach this need?
I have toyed with the idea of getting Apache's source and purposefully inserting bugs so that I can take advantage of them. However, this still seems to be quite time consuming and I have not done this before.
This question is platform-independent. However, it seems like staying in a Linux environment might be the most convenient.
It is also quite important that the software/OS be somewhat current. I plan on analyzing logs and other information using the ELK stack, thus compatibility with those tools is important.