<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>ASP.Net | Woody Hayday | Blog</title>
	<atom:link href="https://blog.woodylabs.com/category/code/aspnet/feed/" rel="self" type="application/rss+xml" />
	<link>https://blog.woodylabs.com</link>
	<description>An exploration of life, technology and writing</description>
	<lastBuildDate>Tue, 13 Jan 2015 15:22:13 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://blog.woodylabs.com/wp-content/uploads/2015/01/cropped-woody-hayday-yosemite-glacier-point-32x32.jpg</url>
	<title>ASP.Net | Woody Hayday | Blog</title>
	<link>https://blog.woodylabs.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Hackers wrecking your shared host account? Check your Website Portfolio Integrity</title>
		<link>https://blog.woodylabs.com/2011/05/hackers-wrecking-your-shared-host-account-check-your-website-portfolio-integrity/</link>
					<comments>https://blog.woodylabs.com/2011/05/hackers-wrecking-your-shared-host-account-check-your-website-portfolio-integrity/#comments</comments>
		
		<dc:creator><![CDATA[Woody]]></dc:creator>
		<pubDate>Mon, 23 May 2011 11:41:32 +0000</pubDate>
				<category><![CDATA[ASP.Net]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Ideas]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[Search Engine Optimisation]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Web Technology]]></category>
		<category><![CDATA[Wordpress]]></category>
		<guid isPermaLink="false">http://blog.woodylabs.com/?p=616</guid>

					<description><![CDATA[<p>10 days of perpetual issues with hackers. 10 DAYS. 100+ sites bombed randomly between every 5 minutes and 5 hours and that&#8217;s only after proper detection, who knows how far it had gone before. But from the relentless irritation some positives developed, if you are in the (precarious) position of hosting LOTS of websites on [&#8230;]</p>
<p>The post <a href="https://blog.woodylabs.com/2011/05/hackers-wrecking-your-shared-host-account-check-your-website-portfolio-integrity/">Hackers wrecking your shared host account? Check your Website Portfolio Integrity</a> first appeared on <a href="https://blog.woodylabs.com">Woody Hayday | Blog</a>.</p><hr /><a href="https://blog.woodylabs.com">Visit Woody Haydays Blog</a><hr />]]></description>
										<content:encoded><![CDATA[<p>10 days of perpetual issues with hackers. 10 DAYS. 100+ sites bombed randomly between every 5 minutes and 5 hours and that&#8217;s only after proper detection, who knows how far it had gone before. But from the relentless irritation some positives developed, if you are in the (precarious) position of hosting LOTS of websites on a shared hosting account or you run a shared hosting service then read on, the value of maintaining limit pushing amounts of sites on a single account really should be considered &#8211; if the loss of earnings for all the hacker downtime doesn&#8217;t wipe out the savings then the cost of repair, security hole identification and eradication probably will, not to mention the loss of face to the search engines.</p>
<div style="border: 1px solid #09C; background-color: #b5d1ea; padding: 4px; margin: 10px; text-align:center">The following is a half vent, half information dump spawned from the irritation of being hacked, again. I have written a piece of monitoring/reconciliation software (Windows based works with your ftp account) to deal with detection/fixing. If you’re in the same boat and all you want is the alpha release, skip to the bottom and <a href="https://blog.woodylabs.com/2011/05/hackers-wrecking-your-shared-host-account-check-your-website-portfolio-integrity/#respond">drop me a comment</a>.</div>
<div align="center"><img fetchpriority="high" decoding="async" src="https://blog.woodylabs.com/wp-content/uploads/2011/05/is-wordpress-a-website-security-hole.jpg" alt="" title="is-wordpress-a-website-security-hole" width="600" height="338" class="aligncenter size-full wp-image-621" srcset="https://blog.woodylabs.com/wp-content/uploads/2011/05/is-wordpress-a-website-security-hole.jpg 600w, https://blog.woodylabs.com/wp-content/uploads/2011/05/is-wordpress-a-website-security-hole-450x253.jpg 450w" sizes="(max-width: 600px) 100vw, 600px" /></div>
<h3>Website hacker entrance vectors (have any security holes?)</h3>
<p><strong>Common CMS, E-Commerce systems and forums</strong> (out of date or zero day, they all have or have had vulnerabilities) &#8211; WordPress, Drupal, OSCommerce, Gallery, PHPBB, VBulletin etc. etc. Particularly relevant here are the open source systems, but they are all susceptible &#8211; how many of these do you have installed where? For me these could of been answered with &#8220;a lot&#8221; and &#8220;some places&#8221;, clarity has now been restored but more on that later.</p>
<p><strong>CMS Plugins (^^)</strong> – Often overlooked (especially by me), installed plugins can in themselves be entry vectors, often CMS’s push their communities to develop additional functionality for their system, which is a good thing, however if the system itself doesn’t deal particularly well with the security of folder structures or indeed how plugins are accessed they can offer ways in. Be careful with plugins which deal with file management and code execution (e.g. file attachers/uploaders etc.) Try to use late version highly rated plugins from reputable sources, with things like WordPress, plugins are low risk though as it has an excellent security model.</p>
<p><strong>Bespoke server-side code and CMS&#8217;s</strong> &#8211; in my experience these is often LESS likely to get hacked, firstly &#8220;hackers&#8221; in this case are more likely to be script kiddies sitting in web cafes in some of the poorer world nations, they often use known exploits on common systems rather than trawl the web, searching for one off programmer mistakes. If you are behind the bespoke stuff leave out as many foot prints as possible and triple check everything. For bespoke stuff the most likely point of entry is simple SQL Injection, use SQL parameters.</p>
<p><strong>FTP/WebDav</strong> &#8211; This really comes down to passwords as next indicated.</p>
<p><strong>Passwords</strong> – Acquired by trojans or traffic sniffers, it becomes irrelevant what security you have in place across the whole setup if you don’t look after them properly. Avoid connecting to anything unencrypted (or at all if possible) on any network you don’t 100% trust, WIFI and wired, even if it’s a friends they could have a network sniffing Trojan on an idle machine. Install good anti-virus and protection software. Use Avast (free for private use) and Spybot Search and Destroy (these two are plenty.) Be careful with providing access to other users, whether it FTP, CMS, SSH, whatever – you may trust them but do you trust their computers?</p>
<p><span id="more-616"></span></p>
<h3>Detection and Fixing – Realising you’ve been hit and fixing it</h3>
<p>So after they gain entry, what would a hacker really do? Often with web hacking the motivation is kudos, money or sabotage – all are achieved through defacing, deleting or modifying web pages/logic and/or altering/downloading databases. A nightmare from the point of view of shared hosting users.</p>
<p>Depending on how they gain entry a hacker (or their automated executing code) may search through all of the files they can access, through ftp or server-side scripts, built to identify possible files to manipulate. They may download copies of things (e.g. databases!) but will likely set about cycling through all available webpage files and doing things such as:</p>
<ul>
<li>Inserting code within the page (iframes to bad websites, links to their websites – designed to improve their search engine rankings, redirect code which just shuttles people on to their sites)</li>
<li>Replacing the file with a predesigned page (kudos fronts ‘this website was hacked by&#8230;’)</li>
<li>Replacing common server-side functions and variables (e.g. replacing all the send values on email scripts to forward emails to an account other than the owners)</li>
</ul>
<p>If you have a single site, or 10 or something the chances are you personally check them all every now and again, getting a little facetime at least once a week say. In this case your opportunity for hosting a hacked site is 7 days, not awful, not great – Google and browsers will start blocking your site if the hacker has inserted any code going to malware or similar, and otherwise may start to drop you down the rankings if your site now displays a ‘hacked by..’ page instead of your wholesome site.</p>
<p>In the case of a lot more sites on the host this can mean no detection for a longer time, if no system is in place, often first recognised through a drop in statistics/earnings (more likely earnings as in the case of iframed malware a change in the number of hits can be not hugely obvious.)</p>
<p>To add confusion to the mix it’s not unknown for hackers to mask their changes to you, it’s very easy with .htaccess files and php/asp headers (for example) to show content relative to its viewer. E.g. the hacker could shuttle people coming in from Google to a hacked page but people that access the site directly (typing it in) get shown the normal site. Furthermore they may not hit every site you have, perhaps a handful of random choices, some folders not others, a smokescreen like attack which could change each time.</p>
<p>Chances are once you get all your pages fixed and get around to looking at where the security hole is that when you recheck your sites they would have been hit again. This tells you two things, 1. The hacker is relentless (or more likely has a relentless automated program, exploiting 24/7) and 2. You have not plugged the security hole. Or if you are really unlucky you are being hacker tag teamed.</p>
<p>So anyway, detection. How do you go about knowing the integrity of your web portfolio? What if it spans 10 shared hosting accounts or 4 servers? Well likely if you own your own server you have spent the time/cash in locking everything down, what I suggest here would be useful to you guys but you may already have a better solution in place.</p>
<p>Currently there are a bunch of services which will do this for you, of which I have tried zero. “Monitoring” services are available worldwide ranging in prices drastically, for me though even the high end services didn’t offer a full set of features and were mostly hugely overpriced but for the top 50% of the portfolio, not effective for me.</p>
<p>The good things about using external monitoring services are obvious but none seemed to be able to offer realistic change monitoring (e.g. WordPress blogs may change content between &lt;div id=”whatever”&gt; and &lt;/div&gt; every hour but the rest of the page should stay almost the same.) It is important they see the addition of malicious code to good pages and not throw constant false alarms. For ‘this website was hacked by..’ pages though they probably do a good job (as well as malware detection.) Uptime monitoring is also common as part of the packages, useful without doubt.</p>
<p>I suggest another way though of monitoring an established portfolio, that is the way I have resolved my recent hacker attacks, a realistic option for shared host/anywhere-in-the-world-with-a-laptop client based use. Ultimately an extension of a few older applications I wrote to manage a growing portfolio, weathered by several hacks across accounts within the past 6 months – Hard checks of every important file.</p>
<div align="center"><img decoding="async" src="https://blog.woodylabs.com/wp-content/uploads/2011/05/website-integrity.jpg" alt="" title="website-integrity" width="600" height="450" class="aligncenter size-full wp-image-619" srcset="https://blog.woodylabs.com/wp-content/uploads/2011/05/website-integrity.jpg 600w, https://blog.woodylabs.com/wp-content/uploads/2011/05/website-integrity-450x337.jpg 450w" sizes="(max-width: 600px) 100vw, 600px" /></div>
<div align="center" style="font-size:16px;font-weight:700;margin:30px">“The best way to check the integrity of your shared hosting account is to physically check the integrity of your shared hosting account.”</div>
<p>At first I wrote my system to simply allow me to take stock of the sites and CMS’s I have in place, to work out possible security holes from behind the scenes – but it turns out it works surprisingly well in identifying breaches. By checking your actual live file structure (.htaccess, index.php, default.aspx, index.html etc.) against a known correct file structure snapshot, you take the whole http part of the checking out of the loop, effectively making it a higher level integrity check than external services can ever offer.</p>
<p>By making Checksums of every critical file (often hackers just hit index.php, index.html, default.aspx etc.) within a given ftp/file structure and then automatically rechecking at scheduled points it becomes easy to minimise your window for financial fallout from hackers. This may seem like a time/bandwidth/processor consuming task but in actuality 100 websites with WordPress installed could be checked in a few Mb of download – in terms of modern data use that’s a few browses of a facebook photo gallery. What’s more it can run in the background, only prompting you on changes to files, as frequently as you want.</p>
<p>The side benefit of producing complete hosting account checksum snapshots is you are also able to accurately backup a working copy of your hosting account. Built into the checking process this means that you can then correct hackers’ malicious changes with a click of a button.</p>
<p>This of course does not take into account more hard-file based websites, database changes or regularly altered sites. I recommend automated screenshots to cover these or the combination of external monitoring services and integrity checking.</p>
<p>I have written an alpha release of this system (named Website Integrity Checker for now) and will gladly distribute/discuss it if you drop me a comment below. A beta copy might make its way out sometime.</p><p>The post <a href="https://blog.woodylabs.com/2011/05/hackers-wrecking-your-shared-host-account-check-your-website-portfolio-integrity/">Hackers wrecking your shared host account? Check your Website Portfolio Integrity</a> first appeared on <a href="https://blog.woodylabs.com">Woody Hayday | Blog</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://blog.woodylabs.com/2011/05/hackers-wrecking-your-shared-host-account-check-your-website-portfolio-integrity/feed/</wfw:commentRss>
			<slash:comments>5</slash:comments>
		
		
			</item>
		<item>
		<title>ASP/PHP Network Share browsing between Servers on IIS</title>
		<link>https://blog.woodylabs.com/2009/10/aspphp-network-share-browsing-between-servers-on-iis/</link>
					<comments>https://blog.woodylabs.com/2009/10/aspphp-network-share-browsing-between-servers-on-iis/#comments</comments>
		
		<dc:creator><![CDATA[Woody]]></dc:creator>
		<pubDate>Sat, 24 Oct 2009 09:52:53 +0000</pubDate>
				<category><![CDATA[ASP.Net]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Web Development]]></category>
		<guid isPermaLink="false">http://blog.woodylabs.com/?p=111</guid>

					<description><![CDATA[<p>Its always the simple things that take longer than expected, if you are trying to access a network share, say \\server1\netshare$ from some code on your webserver (say \\server2) &#8211; you would think this would be simple? If your on IIS you would be wrong, kind of. I think if you are on Apache this [&#8230;]</p>
<p>The post <a href="https://blog.woodylabs.com/2009/10/aspphp-network-share-browsing-between-servers-on-iis/">ASP/PHP Network Share browsing between Servers on IIS</a> first appeared on <a href="https://blog.woodylabs.com">Woody Hayday | Blog</a>.</p><hr /><a href="https://blog.woodylabs.com">Visit Woody Haydays Blog</a><hr />]]></description>
										<content:encoded><![CDATA[<p>Its always the simple things that take longer than expected, if you are trying to access a network share, say \\server1\netshare$ from some code on your webserver (say \\server2) &#8211; you would think this would be simple? If your on IIS you would be wrong, kind of. I think if you are on Apache this wouldn&#8217;t be such a big deal, its more to do with the stupid setup of IIS6 (may also be fixed in IIS7 &#8211; havent tried) and how it deals with user based access, networking and permissions. It was probably set up to give flexibility but its less than transparent. You cannot add permissions to a folder on another server for a local user (again we are talking Windows Server 2003, IIS6), so at first it would seem that you need to either need to make a shared domain account and add the permissions for that, switching out the IUSR account on the webserver, but in fact this doesn&#8217;t even work. You could of course use impersonation if you are talking about aspx but that was overkill in this situation.</p>
<p>After a ton of messing about and a load of messy permissions trials I happened across the solution:</p>
<p>In short the easiest way to access \\server1\netshare$ from a piece of code on \\server2 (without giving administrator rights, creating specific domain users, etc.) is to find the IUSR account details on \\server2 (your webserver) and then create a user on \\server1 with these exact credentials. Having both boxes with these local permissions then allows you to assign this local user on the netshare server the permissions you want on its local folder structure, and curiously lets the webserver login locally.</p>
<p>Now this doesn&#8217;t, or rather shouldn&#8217;t work if you ask me, but it does. To get the IUSR password from the webserver you need to do a bit of a fudge, but once you are all set up this works. Great if you want to access network shares from a web server without compromising your network security!</p>
<p><strong>Get your webserver&#8217;s IUSR Account username and IUSR Account password:</strong></p>
<ul>
<li>Right click my computer -&gt; manage -&gt; local users and groups -&gt; users (this does not show up on domain controllers so wont work if your web server is also your dc)</li>
<li>You will have an account in here called IUSR_*SOMETHING* (if you are running iis) &#8211; this is what I was refering to as the IUSR account and what you will need to create an account as on the other server &#8211; you do this in the same place on that box.</li>
<li>Next you need to get the IUSR account password, which you can do by first going to C:\Inetpub\AdminScripts and opening adsutil.vbs in notepad, finding the line &#8220;<span>isSecureProperty = True&#8221; &#8211; (this is within an if statement) and replacing true with false (this is temporary &#8211; you will want to change this back as soon as you have got the IUSR Password.)</span></li>
<li><span>Once you have altered your adsutil.vbs open up a command prompt (cmd) and type/copy the following and hit return:</span></li>
<li style="padding:3px;background:#CCC;border:1px solid #666;">C:\Inetpub\AdminScripts&gt;cscript adsutil.vbs get w3svc/anonymoususerpass</li>
<li>You should be presented with something like</li>
<li style="padding:3px;background:#CCC;border:1px solid #666;">anonymoususerpass : (STRING) &#8220;**PASSWORDHERE**&#8221;</li>
<li>And there you have it &#8211; this is your IUSR Password, use this and the IUSR account name you got from above and create a local user on the server and you will be singing! Don&#8217;t forget to change isSecureProperty = False back though!</li>
</ul><p>The post <a href="https://blog.woodylabs.com/2009/10/aspphp-network-share-browsing-between-servers-on-iis/">ASP/PHP Network Share browsing between Servers on IIS</a> first appeared on <a href="https://blog.woodylabs.com">Woody Hayday | Blog</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://blog.woodylabs.com/2009/10/aspphp-network-share-browsing-between-servers-on-iis/feed/</wfw:commentRss>
			<slash:comments>15</slash:comments>
		
		
			</item>
		<item>
		<title>Developers Arsenal PHP to ASP Jump</title>
		<link>https://blog.woodylabs.com/2009/04/developers-arsenal-php-to-asp-jump/</link>
					<comments>https://blog.woodylabs.com/2009/04/developers-arsenal-php-to-asp-jump/#comments</comments>
		
		<dc:creator><![CDATA[Woody]]></dc:creator>
		<pubDate>Sun, 12 Apr 2009 18:08:47 +0000</pubDate>
				<category><![CDATA[ASP.Net]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[PHP]]></category>
		<guid isPermaLink="false">http://blog.woodylabs.com/?p=52</guid>

					<description><![CDATA[<p>Server Side Scripting is a wonderful term. It’s what takes the control off of the browser and solely in the hands of the developer, because ultimately the developer is the one with the coding capacity. Since I first messed about with php for my own entertainment I have always revelled in using it, perhaps it [&#8230;]</p>
<p>The post <a href="https://blog.woodylabs.com/2009/04/developers-arsenal-php-to-asp-jump/">Developers Arsenal PHP to ASP Jump</a> first appeared on <a href="https://blog.woodylabs.com">Woody Hayday | Blog</a>.</p><hr /><a href="https://blog.woodylabs.com">Visit Woody Haydays Blog</a><hr />]]></description>
										<content:encoded><![CDATA[<p>Server Side Scripting is a wonderful term. It’s what takes the control off of the browser and solely in the hands of the developer, because ultimately the developer is the one with the coding capacity. Since I first messed about with php for my own entertainment I have always revelled in using it, perhaps it was my age or my development of programming understanding but on learning php code just started falling into place. Over the years I have written PHP that ranges from the most basic database reading and amending (Data Access Layers <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f609.png" alt="😉" class="wp-smiley" style="height: 1em; max-height: 1em;" /> ) to flexible web spiders, data crunchers, content management systems, data extractors, image processors and full on web applications. For me PHP is my main gun, the thing I find easiest to sling a quick script out in. With the ever robust XAMPP you can stick a web server up anywhere in minutes and have a machine doing what you want with data or the web or images shortly thereafter. People have jailbreaked iPhones just to run php from web cafe&#8217;s and similar.</p>
<p>PHP is the tool of the open source project. (There are of course companies that use it (my companies do) and huge online websites/behemoths of information that use it as a server side language.) but overall the corporate world, any web software with intent to move to larger markets and bridge the gap to desktop apps codes in ASP and now ASP.NET. There was nothing I couldn’t do in PHP/mySQL that I wanted to do, it for me was a very good toolset and fulfilled my needs as far as I could see them. But it would lack if you wanted to move towards desktop applications, and its lack of association to Microsoft does act as a restriction in some ways. So there it is ASP / ASP.Net needs to picked up. For me this was more a conversion than picking up a new skill, I took PHP and hammered that knowledge into ASP Syntax – this actually works nearly entirely for the most part, you get over the differences very easily if you have done even a bit of visual basic before (as ASP in its default form is essentially vb – C#  is also excellent.)</p>
<p>I just took a course in  &#8220;ASP.NET Scalable web applications using AJAX&#8221; (Learning Tree in euston &#8211; would recommend it &#8211; taught by an excellent <a href="http://www.dynamisys.co.uk">asp.net consultant</a>, Richard Howells) which affirmed a lot of programmatic choices I have previously made and enlightened me to improved structures for scalability. The thing I most took out of it though is how much work microsoft have put into their IDE (Visual studio.) VS2008 is pretty phenomenal if you come from hand coding everything yourself. I can see how developers get wooed by intellisense and ease of access, they intend to make it all easy &#8211; every functionality provided by web technologies in their control based environment. For me it still remains though that in providing a huge framework of simplicity to every user you do carry a certain amount of redundancy, that is while it may take longer to code pure PHP \ Javascript it will still do specifically what you want it too, and only that. Potentially with the microsoft IDE you can create what you want entirely and then cut the fat so to speak afterwards &#8211; there are substantial speed benefits with their project based management, this methodology however is not my first choice.</p>
<p>For any person wanting to seek employment or understanding in web development I would highly recommend jumping strait into PHP or ASP.NET (probably PHP unless you have a requirement for ASP – ASP.NET C# Pays better than PHP here in the UK.) After learning the basics of HTML, Javascript and CSS, PHP or ASP brings you clearly up another step. I am available for code/developer mentoring/support as of Summer 2009.</p><p>The post <a href="https://blog.woodylabs.com/2009/04/developers-arsenal-php-to-asp-jump/">Developers Arsenal PHP to ASP Jump</a> first appeared on <a href="https://blog.woodylabs.com">Woody Hayday | Blog</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://blog.woodylabs.com/2009/04/developers-arsenal-php-to-asp-jump/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
	</channel>
</rss>
