Abandoned Domain Takeover as a Web Security Risk

Hanno's Blog

Tuesday, September 5. 2017

Abandoned Domain Takeover as a Web Security Risk


Trackbacks

Introducing Snallygaster - a tool to scan for secrets on web servers
A few days ago I figured out that several blogs operated by T-Mobile Austria had a Git repository exposed which included their wordpress configuration file. Due to the fact that a phpMyAdmin installation was also accessible this would have allowed me to c
Weblog: Hanno's blog
Tracked: Apr 11, 13:42

Comments
Display comments as (Linear | Threaded)

Yeah, this is a huge security issue. Thanks for doing your part to get the word out!

There is a solution you didn't mention that allows you to keep using 3rd party hosts safely.

It's known as Subresource Integrity (SRI). It's simple: just add a hash attribute to every script and stylesheet element so that they will only load the file if the hash matches a known safe hash. This doesn't work well for dynamically generated or frequently updated scripts, but it's just fine for loading a specific version of Jquery from an external CDN.
https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity

Additionally, a strict Content Security Policy (CSP) could potentially limit some of the more dangerous effects of a compromised script. Unfortunately it won't stop a page from becoming unusable or getting its background turned pink. Strong CSPs are difficult to implement on existing websites, but not too bad if you're starting from scratch.
https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP
#1 Sam on 2017-09-06 07:29 (Reply)
I'm aware of SRI. However if you include a static resource from a thirdparty domain you can also just store it locally. (Yeah, I know, CDN caching etc., but I doubt that makes much of a difference in most cases.)

I don't see how CSP helps in this particular attack scenario. I generally advocate the use of CSP, but if you whitelist a domain in CSP then it doesn't help you against that domain going rogue.
#1.1 Hanno (Homepage) on 2017-09-06 11:09 (Reply)
I had guessed someone like you would be familiar with it. And yeah, those are the only good reasons not to keep a local copy.

The CSP part made more sense to me when I wrote it. I must have been thinking of blocking stuff like unsafe-eval... but honestly what good is that when your whole page is already compromised?
#1.1.1 Sam on 2017-09-13 07:33 (Reply)

Add Comment

E-Mail addresses will not be displayed and will only be used for E-Mail notifications.

To prevent automated Bots from commentspamming, please enter the string you see in the image below in the appropriate input box. Your comment will only be submitted if the strings match. Please ensure that your browser supports and accepts cookies, or your comment cannot be verified correctly.
CAPTCHA

 
 

About

This blog is written by Hanno Böck. Unless noted otherwise, its content is licensed as CC0.

You can find my web page with links to my work as a journalist here.

I am also publishing a newsletter about climate change and decarbonization technologies.

The blog uses the free software Serendipity and is hosted at schokokeks.org.

Hanno on Mastodon | Contact / Imprint | Privacy / Datenschutz