Skip to main content

Bypassing free online article limits

I was looking around for information on Brotli compression, and came across an article behind protection (login or membership required). Information behind these paywalls is more and more common, as companies are using these in order to maintain their revenue in an digital era. Myself, like other people, do not want to login or create an account to view this content (it is also likely found on another site) - so I poked around to see if the information was accessible without logging in.

Keeping this investigation confidential, I will not be mentioning the website in question or post any screenshots what I found. The flaw has also been reported to the company to ensure they can fix their security hole.

How I bypassed the paywall

In articles that implement a paywall, there is typically the beginning of the online article that is visible, only for a short while. At the end of the readable article, the text fades out to white, abruptly ends, or is ended by a Sign In/Register to view the whole article button. 

Now, having experience with web development, I know a thing or two about websites - mainly that what you see might not entirely be the whole story. Poorly or rushed websites might look polished, but are very brittle when you start pulling the covers.

Brittle website representation (credits to http://www.mkaugaming.com)
What your brittle website's architecture can look like

The screenshot is from a game called Forts, and is available on Steam. I recommend it if you like physics-based RTS games.

So what I did first on this webpage was Inspect by right-clicking the text right above the Sign In/Register to view the whole article to see if the entire website's contents were really on the page but hidden by css.

Example of a paywall implementation
Where we inspect the text

I didn't find the whole article under the covers, and so I didn't think I'd uncover anything else - until I saw a <script> tag below the previewed content and some code that looked like this:
if(typeof(readCookie('nsdr')) == 'undefined'){
    // code
}
I didn't give this much thought and guessed that perhaps they are showing information on the page based on a cookie named nsdr. So I ran the following code in my console and refreshed the webpage:


Lo-and-behold I was seeing the entire article! Quite easy don't you think?


What was wrong

This company is validating client-side if a user is able to view content, instead of what they should be doing, which is validating a user is authenticated (and showing the user their content) on the server. Learn your lesson and never trust the user.

Comments

  1. I was diagnosed as HEPATITIS B carrier in 2013 with fibrosis of the
    liver already present. I started on antiviral medications which
    reduced the viral load initially. After a couple of years the virus
    became resistant. I started on HEPATITIS B Herbal treatment from
    ULTIMATE LIFE CLINIC (www.ultimatelifeclinic.com) in March, 2020. Their
    treatment totally reversed the virus. I did another blood test after
    the 6 months long treatment and tested negative to the virus. Amazing
    treatment! This treatment is a breakthrough for all HBV carriers.

    ReplyDelete

Post a Comment

Popular posts from this blog

UI redesigns are mostly a waste of time

To preface the article, I primarily work on, and prefer, back-end code. I've been involved in both web and software development for over 4 years now and worked with many front-end and back-end frameworks. New Twitter UI Before all of the UI designers that read this go out and riot and champion against me for saying UI redesigns are a waste of time, let me say that I do value design . I think at the bare minimum, a product or website needs to be usable , and if you possess a good eye and steady hand , you should feel compelled to create something that looks pleasing. David Just stop redesigning the UI all the time . UI redesigns, in my opinion, are a waste of time 95% of the time. Let me explain further. No one cares Come see our fresh new look ! What about our new  material design , come see! I'm sorry, but besides fixing the UI where it impacts the usability of your application, no one is raving about how a redesign makes the application any better.

[Fix] - ASUS PCE-AC68 adapter (no internet)

There seem to be a lot of problems with this adapter, even with such strong performance . Why so many issues? I'm not quite sure, but I needed to find a fix because I kept on losing wifi. The ASUS PCE-AC68 The fix Keeping it short - this is how I fixed the issue: Downloaded the driver for my OS from ASUS's support page -  https://www.asus.com/us/Networking/PCEAC68/HelpDesk_Download/ (in my case it was Windows 10 64-bit). Open Device Manager by holding the Windows key and pressing R, then typing "devmgmt.msc" and hitting Enter. (Don't worry, this isn't a scam . We are simply opening Window's Device Manager through the Microsoft Management Console snap-in .) Navigate to the yellow warning sign sitting under Network adapters and right click it. Select Update driver . Select Browse my computer for driver software  and choose the following path of the OS that you have installed on your computer. (The path for the driver on my computer was C

Logging into a website with Powershell

Powershell is great, and it's lately been my go-to shell while I'm working on Windows. Sorry command prompt I really don't do a lot of work in the shell, but I do like to play with low-level interfaces from time to time. The article is about Linux shells, but goes into good explanation about what a shell is if you don't know. Log into a website Today, I wanted to do something that I have never really tried before and that is logging into a website using Powershell . The concepts behind this are quite simple really, as Powershell has support to send HTTP requests  and that's usually all we need, unless the server has CSRF protections in place (which it should). We are going to attempt  to log in to my favorite website for buying socks, Absolute Socks : Is that a turkey?! In order to do that, we need to have a login. So if you don't already have an account on www.absolutesocks.com , go make one now. Viewing the login request On websites,