Why deleting stuff is hard
21 August 2017
To demonstrate some functionality I added a random newsite to an account with about 50 urls. Within minutes, the ShadowTrackr had found hosts, related urls, hosts for the related urls, certificates, and more. It was all fine until I noticed the lack of a delete button. I naively implemented a delete button for the urls and hosts under settings and clicked it. The random newsite was gone. And within a few minutes appeared again. Since the related host and some subdomains were still in the system, the pay level domain was easily found again and automatically added.
Against better judgement, I manually deleted the hosts and subdomains and quickly deleted the url. Again, within minutes all reappeared. It was even worse than the situation than I started with: you can only delete the url's and hosts you add manually and the orginal url now appeared as a related asset found by the system (without a delete button). Adding delete buttons for related assets is useless, since they are related and will always be rediscovered. It turns out deleting an asset was much harder than I thought, so I tried putting the issue on my todo list and started working on other stuff. I just couldn't figure out what the proper delete implementation should be.
Off course, users will notice a problem like this and start complaining (as they should). I had to implement a way to delete assets, but I couldn't decide how it should work. Should I blindly delete all related assets? Including ones that might be shared with other urls or hosts? Should related messages be deleted from the timeline too? That would mean that you might miss historical data on an attack targeted at you just because your server changed its ip address.
Since I can't come up with an implementation that works for all users in all circumstances, there is now a delete button with two checkboxes. One is for deleting related messages from the timeline, and the other is for aggresively deleting related assets. It might be a bit too aggresive and delete the shared server that also hosts your other websites, but I figured (and tested) these will be found again from related assets. I expect the solution with the optional checkboxes will work for everyone, but please let me know if you have problems.