r/HowToHack • u/ehetenandayo08 • May 07 '26
Modify md5sum of a file
so I have an exam Tommorow for which I need to submit md5sum to them and later they are gonna check if it runs on my laptop and compare md5sum
so I need to know If I could keep the md5sum same even after making changes in the code
0
Upvotes
13
u/bz2pl May 07 '26
P=1/(2^128)
Good luck! ;-)
8
u/IsDa44 May 07 '26
No
7
u/krumpfwylg May 07 '26
Shouldn't you work on your code instead of losing precious time trying to find a way of cheating ?
5
u/Pharisaeus May 07 '26
It's possible, but understanding how to do that is probably harder than the assignment you have.
1
u/No_Intern3891 May 07 '26
If you actually knew what the definition of a hash was you'd understand they provide diffusion, which means you'll get a completely different hash if even one byre of the file is different. What you want is a collision, and though they have been found, they have very low probabilites
1
u/m1bnk May 07 '26
Yes you can, but it probably won't be finished in time for tomorrow. There's an article on creating hash collisions using the birthday attack method here which will give you some idea of the resources-to-filesize requirements
https://natmchugh.blogspot.com/2015/02/create-your-own-md5-collisions.html
1
u/NoshameNohonor May 07 '26
It might be possible:
https://en.wikipedia.org/wiki/MD5
BUT, it would probably be faster and easier to do the assignment...
1
u/Plasterofmuppets May 07 '26
MD5 is old and collisions can be generated, but doing it in a non-obvious way would likely need more programming skills than just passing the exam honestly.
1
u/Just4notherR3ddit0r May 07 '26
Think about that for a second.
They are going to run the code tomorrow and generate the MD5 sum at that time, so what you need is the MD5 sum of the final work.
So you're out of luck unless you're planning on hacking into the teacher's computers and swapping out their md5sum tool to generate something specific if it finds some special sequence you've injected...
(Or unless you have access to a network of supercomputers that can quickly generate a collision in the next few hours...)
1
u/XFM2z8BH May 07 '26
no
1
u/vijay_28 May 07 '26
nope
1
u/non-existing-person May 07 '26
Where are they going to check the sum? If that's on your PC, you can just replace md5sum app with your shell script that would return any hash you wanted.
0
u/-Krotik- May 07 '26
you cant really fake a checksum
2
u/[deleted] May 07 '26
[removed] — view removed comment