Skip to content

Repository files navigation

Blockchain Logger Implementation

The Blockchain Logger is a proof-of-concept prototype that securely captures Windows Event Logs and stores them on a private Ethereum blockchain to ensure tamper-proof, immutable and verifiable log storage.

Before running the implementation, the following will need to be installed:

Once you have cloned or downloaded the repository, you can then install all the necessary dependencies by running:
npm install

Now that the repository is set up, and the dependencies installed, the batch file needs to be added to the task scheduler. To do this, Windows Powershell with administrator privileges must be used to run the following command:

schtasks /create /sc minute /mo 2 /tn "BlockchainLogMonitor" /tr "cmd /c "D:\Varsity Work\Honours\COS700\Implementation\runLogMonitor.bat"" /ru SYSTEM /rl HIGHEST

(Please replace the path name with the path to the runLogMonitor.bat file in the repository on your system)

Once running this command, you should be able to see the batch file in your task scheduler as shown here: Screenshot 2025-10-29 071550

Please also ensure that the path In your runLogMonitor.bat file is the path to the repository on your machine: Screenshot 2025-10-29 071706

Next, you will need to start Ganache and copy + paste the private key to the repository. Once you start Ganache, the following will be shown, you can click the quickstart button:

Screenshot 2025-10-29 072010

Then you will be shown the following screen: Screenshot 2025-10-29 072254

You can click on any of the keys to capture a private key for that address, the private key will then be shown as such: Screenshot 2025-10-29 072402

Copy this key, and paste it into your hardhat.config file in the repository, as shown below: Screenshot 2025-10-29 072458

Before the first run, please remember to clear the last-log.json file as shown: Screenshot 2025-10-29 072635

Remember to then save the files before running the following commands.

First, compile the implementation with the following code:
npx hardhat compile
Screenshot 2025-10-29 072812

Then run the following to deploy the code:
npx hardhat run scripts/deploy.js --network ganache
Screenshot 2025-10-29 072929

Then, ensure the scheduled task from earlier is enabled and running, you can run it for the first time from the task scheduler and then it should run automatically every 2 minutes from that point forward. This is done by selecting the task and clicking run on the right hand side:

Screenshot 2025-10-29 073327

You should then be able to see that logs have been added to the blockchain: Screenshot 2025-10-29 073451

To view these logs on the server, you will need to run the following command to start the server:
npx hardhat run scripts/sever.js --network ganache Screenshot 2025-10-29 073633

The server can then be opened on the browser: Screenshot 2025-10-29 073737

On each refresh of the page, any new logs (if generated and captured in that time) will then be displayed as well.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages