Tag Archives: weblogs

My MDSec Blog Posts so far in 2020!

Lately I have only published blog posts through the MDSec website. I thought it might be a good idea to link what I have published so far here as well:

Covert Web Shells in .NET with Read-Only Web Paths

Analysis of CVE-2020-0605 – Code Execution using XPS Files in .NET

Introducing YSoSerial.Net April 2020 Improvements

A Security Review of SharePoint Site Pages

CVE-2020-0618: RCE in SQL Server Reporting Services (SSRS)

Code injection in Workflows leading to SharePoint RCE (CVE-2020-0646)

COVID-19 has sadly affected many if not all of us. I hope everyone remains safe and we can all carry on the normal life we had before this crisis. Hopefully I can then publish more blog posts here as well.

Is there any way to close free websites/weblogs’ advertisements?

Actually, there is no way for your hosting to ensure that you cannot close its advertisements (advs.)!
Because of the fact that all the advs. are based on JavaScript and html, everyone can close them just by looking at their code behavior.
These are some methods:

1. (Easy level) some hosts add the advs. after your html codes which can be closed easily by adding some tags such as:
<noscript> , <embed>, <object>, <!–, <script>, and …
at the end of your html page. For instance:
I tested it in GoDaddy free web hosting by adding <noscript> tag and it works successfully: [http://www.plaincipher.com/welcome.html] (6 Jan. 2009) see its source code for more details.
However, hosting can neutralize this way easily by adding some close tags before starting its advs. such as:
</noscript>, </embed>, </object>, –>, </script>, and …

2. (Medium level) some host’s advertisements can be closed by calling their close function in their JavaScript. For instance I tested this code:


at PersianBlog.ir’s weblogs and it works successfully: see [error404.persianblog.ir] (6 Jan. 2009).

3. (Hard level) some host’s advs. are very complicated in code, but they can also be closed by some tricks in neutralizing their frames and their JavaScript functions! I will write about some tricks after finishing this part.
For instance I tested this code:

<script language=”JavaScript”>
var settelingTime = 100;
var check4closing = 4;
function testjavascript()

window.setTimeout(“testjavascript()”, settelingTime);
if(top.d.getElementById(“FR”) && check4closing!=0){
alert(‘Bye yahoo advertisement! my new homepage is: soroush.secproject.com\nI will write there after that.’);
settelingTime = 1000;

at GeoCities.com and it works successfully: see [http://geocities.com/irsdl/blog/](6 Jan. 2009).

Now these are some techniques which I use them in neutralizing the JavaScript’s codes:
1. Make a function with the same name of advertisement’s function to change its behavior and overwrite it!
2. Change value of JavaScript’s global variables if they are important for advs.
2. Using some Ajax methods to find and replace some html tags by my new parameters.
3. Using some recursive loops too neutralize the advs. function during the time.
4. Using some XSS methods to do some magic such as: true=false!

I think you can find your methods to close the advs. too ;)

BTW, do not forget my copyright rules. Thank you very much :)