Sometimes MD5 is used to validate that a downloaded file is really valid.
So I want to know if is possible for a hacker to modify a file and introduce some malicious code AND make that file generate the original MD5.
Example
Original program
MD5:
eac2a0844b652ecea010ec38960d18ba
Malicious code
Original program
Malicious Code
MD5:
5c07d676b765510db628978dc593aa0d
Malicious code + random bits to modify the MD5
Original program
Malicious Code
00000000000000000000000000000000
MD5:
0ade6514efd2d247105ba6249e31ae47
Malicious code + random bits to modify the MD5
Original program
Malicious Code
00000000000000000000000000000001
MD5:
1a499c7ad2755cd66eeea78f5b56f6d0
... several combinations later ...
Malicious code + correct bits to modify the MD5
Original program
Malicious Code
d1bf573000019911b85cbeb24503e745
MD5:
eac2a0844b652ecea010ec38960d18ba //Just an example, real MD5: 882789190dcfee14d563913d345054e0
With enough time, could a malicious user find a string that generates the original MD5?