How to dynamically generate the hash value of a file while it gets downloaded from any website? Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 00:00UTC (8:00pm US/Eastern)Cryptographic Security of Dynamically Generated, Non-Random SaltsProperties for cryptographic hash functions (preimage, second preimage and collision resistant)Is a file hash checking system 100% secure and non-bypassable/fakable?Search on hashed dataHow SplashData knows about Worst Passwords used by users annuallyVerify CDN javascript's integrityIs it insecure to hash multiples times?Is This DIY Password Authentication Scheme Acceptable?Salted password + hash - is it really useful?If hash values are same, they lessen security. Why?

Why do early math courses focus on the cross sections of a cone and not on other 3D objects?

Can a new player join a group only when a new campaign starts?

What is the difference between globalisation and imperialism?

Amount of permutations on an NxNxN Rubik's Cube

What initially awakened the Balrog?

Is there a kind of relay only consumes power when switching?

A term for a woman complaining about things/begging in a cute/childish way

Is it ethical to give a final exam after the professor has quit before teaching the remaining chapters of the course?

Why does it sometimes sound good to play a grace note as a lead in to a note in a melody?

Is grep documentation about ignoring case wrong, since it doesn't ignore case in filenames?

Project Euler #1 in C++

How to react to hostile behavior from a senior developer?

Selecting user stories during sprint planning

What is the appropriate index architecture when forced to implement IsDeleted (soft deletes)?

Why should I vote and accept answers?

What's the meaning of "fortified infraction restraint"?

Effects on objects due to a brief relocation of massive amounts of mass

What is a fractional matching?

What is this clumpy 20-30cm high yellow-flowered plant?

How to write the following sign?

ArcGIS Pro Python arcpy.CreatePersonalGDB_management

Central Vacuuming: Is it worth it, and how does it compare to normal vacuuming?

AppleTVs create a chatty alternate WiFi network

Does the Weapon Master feat grant you a fighting style?



How to dynamically generate the hash value of a file while it gets downloaded from any website?



Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 23, 2019 at 00:00UTC (8:00pm US/Eastern)Cryptographic Security of Dynamically Generated, Non-Random SaltsProperties for cryptographic hash functions (preimage, second preimage and collision resistant)Is a file hash checking system 100% secure and non-bypassable/fakable?Search on hashed dataHow SplashData knows about Worst Passwords used by users annuallyVerify CDN javascript's integrityIs it insecure to hash multiples times?Is This DIY Password Authentication Scheme Acceptable?Salted password + hash - is it really useful?If hash values are same, they lessen security. Why?



.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








2















I've tried generating the hash value of a file that is trying to get downloaded and compared it against the list of hash values, and if there is a match then it doesn't get downloaded.Here i have manually given the details of websites url and the file that needs to be downloaded. Now i need this to be happen dynamically i.e whenever a file from any website is trying to get downloaded then its hash value should be generated and if it matches with the list of hash values available then it shouldn't get downloaded otherwise it can download.I also have idea of injecting a plugin on to the browser where this functionality is dynamically executed. But I don't know if the this workout or not.



I hope you understood my problem statement and I request you to help me in solving it.










share|improve this question









New contributor




Snehitha Gaddam is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















  • Just to be certain: you want to blacklist specific downloads on a file-by-file basis? This seems like an incredibly laborious process.

    – Johnny
    Apr 14 at 10:11






  • 15





    You have to download the file first to calculate the hash value. And which attacks will this discourage? Hash verification is fine for verifying that you didn't get a corrupt download, but less fine for verifying attacks, unless the hashes (or file) is signed by a trusted key.

    – vidarlo
    Apr 14 at 10:48






  • 3





    The definition of "downloaded" might matter here. If the data is transferred but not saved after checking the hash, then by some definition the download was prevented.

    – gowenfawr
    Apr 14 at 14:07

















2















I've tried generating the hash value of a file that is trying to get downloaded and compared it against the list of hash values, and if there is a match then it doesn't get downloaded.Here i have manually given the details of websites url and the file that needs to be downloaded. Now i need this to be happen dynamically i.e whenever a file from any website is trying to get downloaded then its hash value should be generated and if it matches with the list of hash values available then it shouldn't get downloaded otherwise it can download.I also have idea of injecting a plugin on to the browser where this functionality is dynamically executed. But I don't know if the this workout or not.



I hope you understood my problem statement and I request you to help me in solving it.










share|improve this question









New contributor




Snehitha Gaddam is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















  • Just to be certain: you want to blacklist specific downloads on a file-by-file basis? This seems like an incredibly laborious process.

    – Johnny
    Apr 14 at 10:11






  • 15





    You have to download the file first to calculate the hash value. And which attacks will this discourage? Hash verification is fine for verifying that you didn't get a corrupt download, but less fine for verifying attacks, unless the hashes (or file) is signed by a trusted key.

    – vidarlo
    Apr 14 at 10:48






  • 3





    The definition of "downloaded" might matter here. If the data is transferred but not saved after checking the hash, then by some definition the download was prevented.

    – gowenfawr
    Apr 14 at 14:07













2












2








2








I've tried generating the hash value of a file that is trying to get downloaded and compared it against the list of hash values, and if there is a match then it doesn't get downloaded.Here i have manually given the details of websites url and the file that needs to be downloaded. Now i need this to be happen dynamically i.e whenever a file from any website is trying to get downloaded then its hash value should be generated and if it matches with the list of hash values available then it shouldn't get downloaded otherwise it can download.I also have idea of injecting a plugin on to the browser where this functionality is dynamically executed. But I don't know if the this workout or not.



I hope you understood my problem statement and I request you to help me in solving it.










share|improve this question









New contributor




Snehitha Gaddam is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.












I've tried generating the hash value of a file that is trying to get downloaded and compared it against the list of hash values, and if there is a match then it doesn't get downloaded.Here i have manually given the details of websites url and the file that needs to be downloaded. Now i need this to be happen dynamically i.e whenever a file from any website is trying to get downloaded then its hash value should be generated and if it matches with the list of hash values available then it shouldn't get downloaded otherwise it can download.I also have idea of injecting a plugin on to the browser where this functionality is dynamically executed. But I don't know if the this workout or not.



I hope you understood my problem statement and I request you to help me in solving it.







hash






share|improve this question









New contributor




Snehitha Gaddam is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question









New contributor




Snehitha Gaddam is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question








edited Apr 14 at 17:23







Snehitha Gaddam













New contributor




Snehitha Gaddam is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked Apr 14 at 10:05









Snehitha GaddamSnehitha Gaddam

112




112




New contributor




Snehitha Gaddam is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





Snehitha Gaddam is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






Snehitha Gaddam is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.












  • Just to be certain: you want to blacklist specific downloads on a file-by-file basis? This seems like an incredibly laborious process.

    – Johnny
    Apr 14 at 10:11






  • 15





    You have to download the file first to calculate the hash value. And which attacks will this discourage? Hash verification is fine for verifying that you didn't get a corrupt download, but less fine for verifying attacks, unless the hashes (or file) is signed by a trusted key.

    – vidarlo
    Apr 14 at 10:48






  • 3





    The definition of "downloaded" might matter here. If the data is transferred but not saved after checking the hash, then by some definition the download was prevented.

    – gowenfawr
    Apr 14 at 14:07

















  • Just to be certain: you want to blacklist specific downloads on a file-by-file basis? This seems like an incredibly laborious process.

    – Johnny
    Apr 14 at 10:11






  • 15





    You have to download the file first to calculate the hash value. And which attacks will this discourage? Hash verification is fine for verifying that you didn't get a corrupt download, but less fine for verifying attacks, unless the hashes (or file) is signed by a trusted key.

    – vidarlo
    Apr 14 at 10:48






  • 3





    The definition of "downloaded" might matter here. If the data is transferred but not saved after checking the hash, then by some definition the download was prevented.

    – gowenfawr
    Apr 14 at 14:07
















Just to be certain: you want to blacklist specific downloads on a file-by-file basis? This seems like an incredibly laborious process.

– Johnny
Apr 14 at 10:11





Just to be certain: you want to blacklist specific downloads on a file-by-file basis? This seems like an incredibly laborious process.

– Johnny
Apr 14 at 10:11




15




15





You have to download the file first to calculate the hash value. And which attacks will this discourage? Hash verification is fine for verifying that you didn't get a corrupt download, but less fine for verifying attacks, unless the hashes (or file) is signed by a trusted key.

– vidarlo
Apr 14 at 10:48





You have to download the file first to calculate the hash value. And which attacks will this discourage? Hash verification is fine for verifying that you didn't get a corrupt download, but less fine for verifying attacks, unless the hashes (or file) is signed by a trusted key.

– vidarlo
Apr 14 at 10:48




3




3





The definition of "downloaded" might matter here. If the data is transferred but not saved after checking the hash, then by some definition the download was prevented.

– gowenfawr
Apr 14 at 14:07





The definition of "downloaded" might matter here. If the data is transferred but not saved after checking the hash, then by some definition the download was prevented.

– gowenfawr
Apr 14 at 14:07










1 Answer
1






active

oldest

votes


















9














Agreed with vidarlo, this is impossible.



Ultimately, you'll need to download the file, in order to determine its hash. What you're asking is to determine the hash of a file before downloading it!



What is possible is a script that hashes each file in your downloads directory and then perform some action depending on the hash matching. The script could be scheduled to run every 10 minutes or so.



It's hard to make a recommendation, since we have no idea what it is you're trying to accomplish by blacklisting a specific file.






share|improve this answer























  • Thank you keithRazario , I totally understood your solution. This is regarding my project named Formgrabbing malware analysis. The hashing technique is one of the prevention techniques I thought of using. Here I need not actually have the file of hash values which is signed by a trusted key. I just have to present my idea for demo purpose.

    – Snehitha Gaddam
    Apr 14 at 16:56






  • 1





    Executables on windows supports digital signatures. It's very commonly used. What will your scheme add? Who approves or disapproves files? Remember that a compiled executable is a complex beast that can behave differently dependent on the environment.

    – vidarlo
    Apr 14 at 17:34












  • I also have another concern with the solution i.e a file can be downloaded in any directory , it is not that it can download in only downloads directory. So how about taking the list latest files downloaded?

    – Snehitha Gaddam
    Apr 15 at 7:18











Your Answer








StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "162"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);






Snehitha Gaddam is a new contributor. Be nice, and check out our Code of Conduct.









draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsecurity.stackexchange.com%2fquestions%2f207378%2fhow-to-dynamically-generate-the-hash-value-of-a-file-while-it-gets-downloaded-fr%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









9














Agreed with vidarlo, this is impossible.



Ultimately, you'll need to download the file, in order to determine its hash. What you're asking is to determine the hash of a file before downloading it!



What is possible is a script that hashes each file in your downloads directory and then perform some action depending on the hash matching. The script could be scheduled to run every 10 minutes or so.



It's hard to make a recommendation, since we have no idea what it is you're trying to accomplish by blacklisting a specific file.






share|improve this answer























  • Thank you keithRazario , I totally understood your solution. This is regarding my project named Formgrabbing malware analysis. The hashing technique is one of the prevention techniques I thought of using. Here I need not actually have the file of hash values which is signed by a trusted key. I just have to present my idea for demo purpose.

    – Snehitha Gaddam
    Apr 14 at 16:56






  • 1





    Executables on windows supports digital signatures. It's very commonly used. What will your scheme add? Who approves or disapproves files? Remember that a compiled executable is a complex beast that can behave differently dependent on the environment.

    – vidarlo
    Apr 14 at 17:34












  • I also have another concern with the solution i.e a file can be downloaded in any directory , it is not that it can download in only downloads directory. So how about taking the list latest files downloaded?

    – Snehitha Gaddam
    Apr 15 at 7:18















9














Agreed with vidarlo, this is impossible.



Ultimately, you'll need to download the file, in order to determine its hash. What you're asking is to determine the hash of a file before downloading it!



What is possible is a script that hashes each file in your downloads directory and then perform some action depending on the hash matching. The script could be scheduled to run every 10 minutes or so.



It's hard to make a recommendation, since we have no idea what it is you're trying to accomplish by blacklisting a specific file.






share|improve this answer























  • Thank you keithRazario , I totally understood your solution. This is regarding my project named Formgrabbing malware analysis. The hashing technique is one of the prevention techniques I thought of using. Here I need not actually have the file of hash values which is signed by a trusted key. I just have to present my idea for demo purpose.

    – Snehitha Gaddam
    Apr 14 at 16:56






  • 1





    Executables on windows supports digital signatures. It's very commonly used. What will your scheme add? Who approves or disapproves files? Remember that a compiled executable is a complex beast that can behave differently dependent on the environment.

    – vidarlo
    Apr 14 at 17:34












  • I also have another concern with the solution i.e a file can be downloaded in any directory , it is not that it can download in only downloads directory. So how about taking the list latest files downloaded?

    – Snehitha Gaddam
    Apr 15 at 7:18













9












9








9







Agreed with vidarlo, this is impossible.



Ultimately, you'll need to download the file, in order to determine its hash. What you're asking is to determine the hash of a file before downloading it!



What is possible is a script that hashes each file in your downloads directory and then perform some action depending on the hash matching. The script could be scheduled to run every 10 minutes or so.



It's hard to make a recommendation, since we have no idea what it is you're trying to accomplish by blacklisting a specific file.






share|improve this answer













Agreed with vidarlo, this is impossible.



Ultimately, you'll need to download the file, in order to determine its hash. What you're asking is to determine the hash of a file before downloading it!



What is possible is a script that hashes each file in your downloads directory and then perform some action depending on the hash matching. The script could be scheduled to run every 10 minutes or so.



It's hard to make a recommendation, since we have no idea what it is you're trying to accomplish by blacklisting a specific file.







share|improve this answer












share|improve this answer



share|improve this answer










answered Apr 14 at 12:01









keithRozariokeithRozario

1,124213




1,124213












  • Thank you keithRazario , I totally understood your solution. This is regarding my project named Formgrabbing malware analysis. The hashing technique is one of the prevention techniques I thought of using. Here I need not actually have the file of hash values which is signed by a trusted key. I just have to present my idea for demo purpose.

    – Snehitha Gaddam
    Apr 14 at 16:56






  • 1





    Executables on windows supports digital signatures. It's very commonly used. What will your scheme add? Who approves or disapproves files? Remember that a compiled executable is a complex beast that can behave differently dependent on the environment.

    – vidarlo
    Apr 14 at 17:34












  • I also have another concern with the solution i.e a file can be downloaded in any directory , it is not that it can download in only downloads directory. So how about taking the list latest files downloaded?

    – Snehitha Gaddam
    Apr 15 at 7:18

















  • Thank you keithRazario , I totally understood your solution. This is regarding my project named Formgrabbing malware analysis. The hashing technique is one of the prevention techniques I thought of using. Here I need not actually have the file of hash values which is signed by a trusted key. I just have to present my idea for demo purpose.

    – Snehitha Gaddam
    Apr 14 at 16:56






  • 1





    Executables on windows supports digital signatures. It's very commonly used. What will your scheme add? Who approves or disapproves files? Remember that a compiled executable is a complex beast that can behave differently dependent on the environment.

    – vidarlo
    Apr 14 at 17:34












  • I also have another concern with the solution i.e a file can be downloaded in any directory , it is not that it can download in only downloads directory. So how about taking the list latest files downloaded?

    – Snehitha Gaddam
    Apr 15 at 7:18
















Thank you keithRazario , I totally understood your solution. This is regarding my project named Formgrabbing malware analysis. The hashing technique is one of the prevention techniques I thought of using. Here I need not actually have the file of hash values which is signed by a trusted key. I just have to present my idea for demo purpose.

– Snehitha Gaddam
Apr 14 at 16:56





Thank you keithRazario , I totally understood your solution. This is regarding my project named Formgrabbing malware analysis. The hashing technique is one of the prevention techniques I thought of using. Here I need not actually have the file of hash values which is signed by a trusted key. I just have to present my idea for demo purpose.

– Snehitha Gaddam
Apr 14 at 16:56




1




1





Executables on windows supports digital signatures. It's very commonly used. What will your scheme add? Who approves or disapproves files? Remember that a compiled executable is a complex beast that can behave differently dependent on the environment.

– vidarlo
Apr 14 at 17:34






Executables on windows supports digital signatures. It's very commonly used. What will your scheme add? Who approves or disapproves files? Remember that a compiled executable is a complex beast that can behave differently dependent on the environment.

– vidarlo
Apr 14 at 17:34














I also have another concern with the solution i.e a file can be downloaded in any directory , it is not that it can download in only downloads directory. So how about taking the list latest files downloaded?

– Snehitha Gaddam
Apr 15 at 7:18





I also have another concern with the solution i.e a file can be downloaded in any directory , it is not that it can download in only downloads directory. So how about taking the list latest files downloaded?

– Snehitha Gaddam
Apr 15 at 7:18










Snehitha Gaddam is a new contributor. Be nice, and check out our Code of Conduct.









draft saved

draft discarded


















Snehitha Gaddam is a new contributor. Be nice, and check out our Code of Conduct.












Snehitha Gaddam is a new contributor. Be nice, and check out our Code of Conduct.











Snehitha Gaddam is a new contributor. Be nice, and check out our Code of Conduct.














Thanks for contributing an answer to Information Security Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsecurity.stackexchange.com%2fquestions%2f207378%2fhow-to-dynamically-generate-the-hash-value-of-a-file-while-it-gets-downloaded-fr%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

getting Checkpoint VPN SSL Network Extender working in the command lineHow to connect to CheckPoint VPN on Ubuntu 18.04LTS?Will the Linux ( red-hat ) Open VPNC Client connect to checkpoint or nortel VPN gateways?VPN client for linux machine + support checkpoint gatewayVPN SSL Network Extender in FirefoxLinux Checkpoint SNX tool configuration issuesCheck Point - Connect under Linux - snx + OTPSNX VPN Ububuntu 18.XXUsing Checkpoint VPN SSL Network Extender CLI with certificateVPN with network manager (nm-applet) is not workingWill the Linux ( red-hat ) Open VPNC Client connect to checkpoint or nortel VPN gateways?VPN client for linux machine + support checkpoint gatewayImport VPN config files to NetworkManager from command lineTrouble connecting to VPN using network-manager, while command line worksStart a VPN connection with PPTP protocol on command linestarting a docker service daemon breaks the vpn networkCan't connect to vpn with Network-managerVPN SSL Network Extender in FirefoxUsing Checkpoint VPN SSL Network Extender CLI with certificate

Cannot Extend partition with GParted The 2019 Stack Overflow Developer Survey Results Are In Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) 2019 Community Moderator Election ResultsCan't increase partition size with GParted?GParted doesn't recognize the unallocated space after my current partitionWhat is the best way to add unallocated space located before to Ubuntu 12.04 partition with GParted live?I can't figure out how to extend my Arch home partition into free spaceGparted Linux Mint 18.1 issueTrying to extend but swap partition is showing as Unknown in Gparted, shows proper from fdiskRearrange partitions in gparted to extend a partitionUnable to extend partition even though unallocated space is next to it using GPartedAllocate free space to root partitiongparted: how to merge unallocated space with a partition

Marilyn Monroe Ny fiainany manokana | Jereo koa | Meny fitetezanafanitarana azy.