<?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>Digicorp &#187; Security</title>
	<atom:link href="http://dev.digi-corp.com/category/security/feed/" rel="self" type="application/rss+xml" />
	<link>http://dev.digi-corp.com</link>
	<description>&#62;&#62; Developer Blog</description>
	<lastBuildDate>Wed, 22 Jun 2011 14:13:24 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Watch albums of strangers on Facebook!</title>
		<link>http://dev.digi-corp.com/2009/06/watch-albums-of-strangers-on-facebook/</link>
		<comments>http://dev.digi-corp.com/2009/06/watch-albums-of-strangers-on-facebook/#comments</comments>
		<pubDate>Sat, 27 Jun 2009 11:36:38 +0000</pubDate>
		<dc:creator>divyang.shah</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://dev.digi-corp.com/?p=810</guid>
		<description><![CDATA[Facebook has always been touted to have strong privacy controls.  To most extent it is true and it is much better than most of the other social networks. But as a biggest social network they do have loopholes which can be easily exploitable by atleast developers like us. Today I am going to talk about [...]]]></description>
			<content:encoded><![CDATA[<p>Facebook has always been touted to have strong privacy controls.  To most extent it is true and it is much better than most of the other social networks. But as a biggest social network they do have loopholes which can be easily exploitable by atleast developers like us.</p>
<p>Today I am going to talk about one such exploit:</p>
<p><strong>How to view albums of people who are not your friends?</strong></p>
<p>So when we search for interesting people on Facebook most of the time you will find their profile having restrictions. Mostly you will be able to see their profile photo and will be able to send message to them. So to see their full profile or albums we have to send &#8220;add friend&#8221; request and if they approve then and then only we can see their photos and profile.</p>
<p>But here is one way to bypass this:</p>
<p>First you have to add developers application in Facebook which can be added from following link:</p>
<p>Link:  <a href="http://www.facebook.com/developers/?ref=sb &gt;">http://www.facebook.com/developers/?ref=sb</a></p>
<p>Then go to this link</p>
<p><a href="http://developers.facebook.com/tools.php">http://developers.facebook.com/tools.php</a></p>
<p>It will open below page and choose you response formate and also method = photos.getalbum as shown in below image.</p>
<p style="text-align: center;"><img class="size-full wp-image-811 aligncenter" src="http://dev.digi-corp.com/wp-content/uploads/2009/06/facebook1.png" alt="facebook1" width="665" height="498" /></p>
<p>So after that enter facebook user id whose photos you want to see, in &#8220;uid text box&#8221; as shown in below image and then press &#8220;call method button&#8221;.</p>
<p>Get the facebook id from the address bar/url bar or find the &#8220;add as a friend&#8221; link in the web page and move your mouse cursor over it and you will get facebook id in the status bar as shown in image.</p>
<p><img class="aligncenter size-full wp-image-863" src="http://dev.digi-corp.com/wp-content/uploads/2009/06/facebook31.JPG" alt="facebook3" width="669" height="483" /></p>
<p>And you will get details of all the albums of that user if he or she have albums as shown in below image in right side box.</p>
<p>Just you have to copy link content from right box and paste it to another browser or tab and press enter and then you can see all photos from that album without adding the user as a friend.</p>
<p><img class="aligncenter size-full wp-image-812" src="http://dev.digi-corp.com/wp-content/uploads/2009/06/facebook2.png" alt="facebook2" width="665" height="498" /></p>
<p>Note: I have changed all the ids they are not real.</p>
<p>I hope with the help of this article and community, facebook will notice this bug and will resolve it.</p>
<p>So enjoy peeking on stranger&#8217;s albums. <img src='http://dev.digi-corp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
<strong><br />
Update: It seems that Facebook has resolved this bug now.</strong></p>
<div style="overflow: hidden; position: absolute; left: -10000px; top: 95px; width: 1px; height: 1px;"><a href="http://www.facebook.com/developers/?ref=sb">http://www.facebook.com/developers/?ref=sb</a></div>
]]></content:encoded>
			<wfw:commentRss>http://dev.digi-corp.com/2009/06/watch-albums-of-strangers-on-facebook/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>ASP.NET Security</title>
		<link>http://dev.digi-corp.com/2009/05/aspnet-security/</link>
		<comments>http://dev.digi-corp.com/2009/05/aspnet-security/#comments</comments>
		<pubDate>Sat, 30 May 2009 05:41:11 +0000</pubDate>
		<dc:creator>nikunj.padaliya</dc:creator>
				<category><![CDATA[asp.net]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[ASP.NET Security]]></category>
		<category><![CDATA[Authentication]]></category>
		<category><![CDATA[Authorization]]></category>

		<guid isPermaLink="false">http://dev.digi-corp.com/?p=335</guid>
		<description><![CDATA[Security is one of the most important concerns in application software development. Building a robust security model is one of the most important factors that drive the success of application software. As far as security in ASP.NET is concerned, three terms come into my mind, i.e., Authentication, Authorization and Impersonation. Put simply, authentication authenticates the [...]]]></description>
			<content:encoded><![CDATA[<p>Security is one of the most important concerns in application software development. Building a robust security model is one of the most important factors that drive the success of application software. As far as security in ASP.NET is concerned, three terms come into my mind, i.e., Authentication, Authorization and Impersonation. Put simply, authentication authenticates the user’s credentials and authorization relates to the resources that an authenticated user has access to. This article is the first in a series of articles on ASP.NET security and discusses these concepts and their applicability.</p>
<p>Let us start our discussion with a brief outline on the sequence of events are as far as authentication and authorization are concerned when a new request comes in. When a new request arrives at IIS, it first checks the validity of the incoming request. If the authentication mode is anonymous (default) then the request is authenticated automatically. But if the authentication mode is overridden in the web.config file settings, IIS performs the specified authentication check before the request is passed on to ASP.NET.</p>
<p><strong>Authentication</strong></p>
<p>Authentication determines whether a user is valid or not based on the user’s credentials. Note that a user can be authorized to access the resources provided the user is an authenticated user. The application’s web.config file contains all of the configuration settings for an ASP.NET application. An authentication provider is used to prove the identity of the users in a system. There are three ways to authenticate a user in ASP.NET:</p>
<p>Forms authentication<br />
Windows authentication<br />
Passport authentication<br />
 </p>
<p><strong>Forms Authentication</strong></p>
<p>This is based on cookies where the user name and the password are stored either in a text file or a database. It supports both session and persistent cookies. After a user is authenticated, the user’s credentials are stored in a cookie for use in that session. When the user has not logged in and requests for a page that is secured, he or she is redirected to the login page of the application. The following code snippet illustrates how this can be implemented in ASP.NET.</p>
<p>&lt;configuration&gt;<br />
&lt;system.web&gt;<br />
&lt;authentication mode=&#8221;Forms&#8221;/&gt;<br />
&lt;forms name=&#8221;LoginForm&#8221; loginUrl=&#8221;LoginForm.aspx&#8221; /&gt;<br />
&lt;authorization&gt;<br />
&lt;deny users=&#8221;?&#8221;/&gt;<br />
&lt;/authorization&gt;<br />
&lt;/system.web&gt;<br />
&lt;/configuration&gt;</p>
<p> </p>
<p><strong>Windows Authentication</strong></p>
<p>Windows Authentication is used to validate a user based on the user’s Windows Account; however, this is only applicable in intranet environments where the administrator has full control over the users in the network. The following code snippet illustrates how we can implement Windows Authentication in ASP.NET.</p>
<p>&lt;authentication mode=&#8221;Windows&#8221;/&gt;<br />
&lt;authorization&gt;<br />
&lt;allow users =&#8221;*&#8221; /&gt;<br />
&lt;/authorization&gt;<br />
 </p>
<p><strong>Passport Authentication</strong></p>
<p>Passport authentication is a centralized authentication service that uses Microsoft&#8217;s Passport Service to authenticate the users of an application. It allows the users to create a single sign-in name and password to access any site that has implemented the Passport single sign-in (SSI) service. The following code snippet illustrates how we can implement Passport Authentication in ASP.NET.</p>
<p>&lt;configuration&gt;<br />
&lt;system.web&gt;<br />
&lt;authenticationmode=&#8221;Passport&#8221;&gt;<br />
&lt;passportredirectUrl=&#8221;LoginForm.aspx&#8221; /&gt;<br />
&lt;/authentication&gt;<br />
&lt;authorization&gt;<br />
&lt;deny users=&#8221;?&#8221; /&gt;<br />
&lt;/authorization&gt;<br />
&lt;/system.web&gt;<br />
&lt;/configuration&gt;</p>
<p> </p>
<p><strong>Authorization</strong></p>
<p>Authorization is the process of determining the accessibility to a resource for a previously authenticated user. Note that authorization can only work on authenticated users, hence ensuring that no un-authenticated user can access the application. The syntax for specifying authorization in ASP.NET is as follows.</p>
<p>&lt;authorization&gt;<br />
&lt; [ allow | deny ] [ users ] [ roles ] [ verbs ] /&gt;<br />
&lt;/authorization&gt;<br />
In ASP.NET, there are the following types of authorizations.</p>
<p>URL Authorization<br />
File Authorization<br />
Authorization based on ACL (Access Control List)<br />
 </p>
<p><strong>Impersonation</strong></p>
<p>According to MSDN, &#8220;When using impersonation, ASP.NET applications can optionally execute with the identity of the client on whose behalf they are operating. The usual reason for doing this is to avoid dealing with authentication and authorization issues in the ASP.NET application code. Instead, you rely on Microsoft Internet Information Services (IIS) to authenticate the user and either pass an authenticated token to the ASP.NET application or, if unable to authenticate the user, pass an unauthenticated token. In either case, the ASP.NET application impersonates whichever token is received if impersonation is enabled. The ASP.NET application, now impersonating the client, then relies on the settings in the NTFS directories and files to allow it to gain access, or not. Be sure to format the server file space as NTFS, so that access permissions can be set”.</p>
<p>Note that Impersonation is disabled by default and can be specified in the web.config file as shown in the code snippet given below.</p>
<p>&lt;identity impersonate=&#8221;true&#8221;/&gt;<br />
or<br />
&lt;identity impersonate=&#8221;false&#8221;/&gt;</p>
<p>To impersonate a particular identity, specify the following in your application’s web.config file.</p>
<p>&lt;identity impersonate=&#8221;true&#8221; username=&#8221;joydip&#8221; password=&#8221;jude&#8221;/&gt;</p>
]]></content:encoded>
			<wfw:commentRss>http://dev.digi-corp.com/2009/05/aspnet-security/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

