Keys Defender -- Development update: v2.2.5 released

in #hive5 years ago

Incoming transactions guard for compromised accounts

Something else that I learned during the last leak is that, even if you warn the account owner of their leak and put their funds into their savings, that does not fully protects them yet. For instance, his account kept getting funds transferred into his wallet (I believe through automated trades) so these funds were at risk of being stolen since his private key was clearly displayed in the memo of a previous transaction of his.
I therefore had to log in again into his account and manually transfer his new liquid funds (1,600 HIVE) into his savings.

So, in order to avoid having to manually monitor compromised accounts, I decided to automate checks of funds coming into them.
The liquid funds of a compromised account will now be monitored every second, on BOTH platforms. This goes on until it detects that the owner changed their keys on both platforms (the transfer to savings transactions fails due to invalid key) or I manually interrupt the guard (eg. the owner notified me of the recovery of their account or other reasons).

ITG (Incoming Transactions Guards) for Compromised Accounts -> CHANGELOG:

  1. Refactoring, additional logging, minor bug fix

  2. Added the ability to run ITG as standalone process so that it can be executed independently from @keys-defender, when needed (eg. today I had to perform some maintenance on my server so I had to add a way to launch the ITG guard again).

  3. Added a daily reminder transfer memo to notify the user that their account is still compromised and on which chain(s).

image.png


Time spent on these improvements : 4 hs (coding, testing, post)


Logs

> node ./POCs/steem-keys-defender/ITG/saveFunds.js --user=j3dy --key=5KMzA*************************

Starting funds guard for: j3dy 5KMzA*************************
5/2/2020_4:33:41AM - Checking whether compromised account j3dy has new funds in his wallet(s)..
Getting balance of hive wallet..
No new funds on hive. { steemSafu: false, hiveSafe: false }
Getting balance of steem wallet..
Found funds on steem - Starting both transfers to savings..
steem - At least one of the transfers to savings for j3dy failed:  { RPCError: missing required active aut
hority:Missing Active Authority j3dy
    at new RPCError (\POCs\steem-keys-defender\node_modules\steem\l
ib\api\transports\http.js:43:106)
    at \POCs\steem-keys-defender\node_modules\steem\lib\api\transpo
rts\http.js:93:13
    ...
j3dy successfully changed their private active key on steem. Steem wallet checks stopped.
5/2/2020_4:33:44AM - Checking whether compromised account j3dy has new funds in his wallet(s)..
Getting balance of hive wallet..
No new funds on hive. { steemSafu: true, hiveSafe: false }
5/2/2020_4:33:45AM - Checking whether compromised account j3dy has new funds in his wallet(s)..
Getting balance of hive wallet..
No new funds on hive. { steemSafu: true, hiveSafe: false }
...
Sort:  

Weekly reward and test transfer going into compromised account correctly protected by ITG guard:

👇 ✅

https://wallet.hive.blog/@j3dy/transfers