Pages

Thursday, April 26, 2018

Changelog.txt. Playing with their heads.

Today I was checking my server logs for the root IP address.  This is people who are scouring the internet by IP address looking for whatever they can find.

One file I noted a lot of 404's for was CHANGELOG.TXT.  Apparently this is a DRUPAL file that might contain the current versions of some of your server's software.

Because I like to mess with these net scanners, I created this batch file.  It creates a sparse 1 gig file full of zeroes.

What is a sparse file?  It's a compressed file that seems to be big, but only takes around 4096 bytes on the drive.

@echo off REM MakeChangeLog.bat
REM You Should place this batch file in the folder you want to create the file in.
REM You must run this batch as an administrator!
REM Note that you must have the disk space to initially create the file before it gets compressed.

fsutil file createnew changelog.txt 1000000000
fsutil sparse setflag changelog.txt
compact /c changelog.txt

pause
This resulted in a 4096 byte file on my Windows Server 2012, and a 0 byte file on my Win 10 machine.  This file STILL downloads as a 1 gig file.  You can check the file size by right-clicking CHANGELOG.TXT and selecting Properties.

One caution: Do not do this with real files like robots.txt.  This file is legitimately used by search engines to figure out what you want scanned.  You're going to burn in a very special level of Hell.  A level they reserve for child molesters, and people who talk in the theater.

Enjoy!


Bryan Valencia is a contributing editor and founder of Visual Studio Journey.  He owns and operates Software Services, a web design and hosting company in Manteca, California.

Share This!

Contact Us

Name

Email *

Message *