Search This Blog

Monday, August 9, 2010

JSF - Java Server Faces

JSF:  A server side user interface component framework for Java™ technology-based web applications.Java-server Faces (JSF) is an industry standard and a framework for building component-based user interfaces for web applications. JSF contains an API for representing UI components and managing their state; handling events, server-side validation, and data conversion; defining page navigation; supporting internationalization and accessibility; and providing extensibility for all these features. Java Server Faces applications are just like any other Java web application. They run in a servlet container.

ADV:  Faces has the following advantages over Struts:
     Eliminated the need for a Form Bean
     Eliminated the need for a DTO Class
     Allows the use of the same POJO on all Tiers because of the Backing Bean
# A separate rendering model that defines how to render the components in various ways. For example, a component used for selecting an item from a list can be rendered as a menu or a set of radio buttons.
# An event and listener model that defines how to handle events generated by activating a component, such as what to do when a user clicks a button.

Managed BEAN :
Java Bean objects managed by a JSF implementation are called managed beans. A managed bean describes how a bean is created and managed. It has nothing to do with the bean's functionality.



Backing Beans Managed Beans
A backing bean is any bean that is referenced by a form. A managed bean is a backing bean that has been registered with JSF (in faces-config.xml) and it automatically created (and optionally initialized) by JSF when it is needed.

The advantage of managed beans is that the JSF framework will automatically create these beans, optionally initialize them with parameters you specify in faces-config.xml,
Backing Beans should be defined only in the request scope The managed beans that are created by JSF can be stored within the request, session, or application scopes

View Object : 
A view object is a model object used specifically in the presentation tier. It contains the data that must display in the view layer and the logic to validate user input, handle events, and interact with the business-logic tier. 

Domain Object :
Domain object model is about the business object and should belong in the business-logic tier. It contains the business data and business logic associated with the specific business object.

Difference between JSP-EL and JSF-EL?
JSP-EL JSF-EL
In JSP-EL the value expressions are delimited by ${…}. In JSf-EL the value expressions are delimited by #{…}.
The ${…} delimiter denotes the immediate evaluation of the expressions, at the time that the application server processes the page. The #{…} delimiter denotes deferred evaluation. With deferred evaluation ,the application server retains the expression and evaluates it whenever a value is needed.


Declare the managed beans in the faces-config.xml file?
The bean instance is configured in the faces-config.xml file:
    
    <managed-bean>
      <managed-bean-name>login</managed-bean-name>
      <managed-bean-class>com.developersBookJsf.loginBean</managed-bean-class>
      <managed-bean-scope>request</managed-bean-scope>
      </managed-bean>
      
Page navigation (navigation rules) in faces-config.xml file ?
Navigation rules tells JSF implementation which page to send back to the browser after a form has been submitted. We can declare the page navigation as follows:
    
    <naviagation-rule>
        <from-view-id>/index.jsp</from-view-id>
        <navigation-case>
      <from-outcome>login</from-outcome>
      <to-view-id>/welcome.jsp</to-view-id>
        </navigation-case>
      </naviagation-rule>
        
      
      [If no navigation rule matches a given action, then the current page is redisplayed.]
      
    JSF LIFE CYCLE
     
    JSF Lifecycle 
     
     

Thursday, August 5, 2010

Leadership and Organizational Behavior

Leadership and Organizational Behavior

Organizational Behavior (OB) is the study and application of knowledge about how people, individuals, and groups act in organizations. It does this by taking a system approach. That is, it interprets people-organization relationships in terms of the whole person, whole group, whole organization, and whole social system. Its purpose is to build better relationships by achieving human objectives, organizational objectives, and social objectives.

http://www.nwlink.com/~donclark/leader/leadob.html

Difference between Portal, Portlet, Blog, Forum ?

A Portal is a web site that acts as hub, gateway or window to other information and services on the Web. Common Web portals are Yahoo, Netscape, etc.

A Portlet is a specialised content area that occupies a small window of a portal page. Portlets from different sources (Portlet Providers) can be integrated into the portal framework. Example portlets: weather info, news flashes, stock tickers, etc.

 A Blog is Yours, and A Forum is Not

Blog, you set up your account and site, design it to look the way you want it to look, add advertising in some cases, and write regularly. Over time, both by your own design and as a result of what you've written, your blog develops a "personality". You can elect to allow comments or not. Blogs are often devoted to a specific topic, although some are devoted to a number of topics (for example, "All the things I've thought" or "What I did today") that, essentially, are only related by virtue of the fact that the same person wrote them.
A forum belongs to someone else (a company, an online site, a non-profit organization, or anyone who who creates and runs the forum).

A Forum is a collection of posts offered by the general public, often in a question-and-answer format although some forums are nothing but comments on a post that, itself, was nothing but a comment.

 

Warren Buffett

Visit Us @ www.Fropki.com
Visit Us @ www.Fropki.com
Visit Us @ www.Fropki.com
Visit Us @ www.Fropki.com
Visit Us @ www.Fropki.com
Visit Us @ www.Fropki.com
Visit Us @ www.Fropki.com
Visit Us @ www.Fropki.com
Visit Us @ www.Fropki.com
Visit Us @ www.Fropki.com
Visit Us @ www.Fropki.com


Wednesday, August 4, 2010

Difference JSF Version's

JSF started its journey from version 1.0 and now it has come to the latest version of JSF is 1.2. The listing of versions released so far are :
  1. JSF 1.2 (11 may 2006) -     Latest release of JSF specification.
  2. JSF 1.1 (27 may 2004) -     Bug fix release. No specification changes. No HTML renderkit changes.
  3. JSF 1.0 (11 mar 2004) -     Initial release of JSF specification.
There are many releases of 1.1 and 1.2 and these are listed below showing released date also:
  1. 1.2_04 P01  (20 Mar 2007)
  2. 1.2_04         (5 Mar 2007)
  3. 1.2_02         (25 Aug 2006)
  4. 1.2_01         (14 July 2006)
  5. 1.1_02         (24 Apr 2006)   
  6. 1.1_01         (07 Sep 2004)
The JSF specification was developed under the Java Community Process (JCP) as JSR 127, which released JSF 1.0 and 1.1, and JSR 252 which released JSF 1.2. The first release of JSF is JSF 1.0 in 2004. JSF 1.0 supports servlet 2.3 and jsp 1.2. After JSF 1.0, JSF 1.1 was released. The main purpose of this release was bug-fixing. There were no specification or HTML renderkit changes. This version also works with same version of servlet 2.3 and jsp 1.2 as in the case of JSF 1.0.
JSF 1.1_01 release features bug fixes and performance improvements. Improvements include compression of views serialized to the client, failover support when storing views on the server, renderer fixes, and several other bug fixes and enhancements.It supports JDK 1.3.1 or later.  Many bugs have been fixed so if your application depends on one of these bugs, it needs to be changed.
JSF  1.2 is the latest release and it works with servlet 2.5 and jsp 2.1. If you want to run JSF 1.2 on Tomcat, you want 6.0 not 5.5. So JSF needs a web container that supports atleast servlet 2.3 and jsp 1.2 and these are part of J2EE 1.3.
New in JSF 1.2
In this section we will go through some new features and changes in JSF 1.2 specification. JSF 1.1 was designed for JSP 1.2 and so could not take advantage of newer JSP features and JSP could not be changed to fill the needs of JSF. This resulted in a number of new features and changes. For ex.
  1. Unified Expression Language(EL) :
    Unified EL has been added to JSTL to overcome problems when integrating JSP EL with the JSF EL.EL was used to access data objects in a simple way. It is used mainly as a short-hand for accessing values. Later it was included in JSP 2.0 with more functionality.When JSF was released it also needed EL.JSF and JSP each has its own EL.The JSP EL is much flexibile to the web application developer but JSF people were unsatisfied by the JSP EL.One of the reason was that it requires JSP engine to evaluate expression at the appropriate time during the lifecycle, but JSP expressions are evaluated immediately. The second reason behind it was that JSP functions could only call static methods in TLD and they cannot be used to invoke public methods dynamically on server side objects during lifecycle to validate data and handle component evevts.
    So these were the reasons for developing such an EL that would work for both JSP and JSF and make using JSP and JSF together easier. This new EL is called unified EL. So this was inspired by EL used in JSTL and JSP. There is a package "el" in javax package that represents EL.

    In addition to the features already available in the JSP EL, unified EL has the following features :
    1.  Deferred evaluation of expressions i.e.evaluation of the expression at the appropriate time during the page lifecycle from JSP engine.
    2.  Support for expressions that can set and get values
    3.  Support for expressions that can invoke methods.
    4.  A pluggable API for resolving expressions
  2. Ajax Support :
    JSF framework can make things a little easier to write AJAXian JSF components.JSF allows to map different instances of the FacesServlet with different lifecycles.For example, one mapping for standard JSF requests and another for AJAX JSF requests.
  3. New Tree Creation and Content Interweaving Model for Faces applications that use JSP :
    We can make JSF application without using any JSP page but it can also be developed using both JSP and JSF.Using JSP makes some developers easy to handle.Sometimes When integrated it did not respond as we expect. These problems have been resolved in JSF 1.2.There have been made some changes in specification of the implementation of the FacesViewHandler for JSP and JSP custom tag base class.
  4. Integration with JSTL :
    Using JSTL's tag to contain Faces input components was one of the problem, because JSP has no notion of a postback, it was not possible to apply the values correctly to the nested input components on postback. Some new concepts in EL make it possible to use this tag fully with any kind of JSF component.
  5. Back Button issues and Multi Frame or Multi Window Faces Apps :
    JSF have fixed the problem related to Multi Frame or Multi Window applications.The browser back button also created some problems. These problems were because of deficiency in the State Management API.
  6. Associating a message with a particular component in the page :
    Previously we could not include label of a component dynamically in an error message for that component. Now it's possible in new JSF 1.2.It's also possible to override the conversion or validation message that is displayed to the user on a per-instance basis.
  7. Expose an application wide ResourceBundle to the EL :
    element in faces-config allows listing many resource bundles that should be exposed to the EL using the new ELResolver chain.This optimize performance and prevent the need to create a ResourceBundle for every request.
  8. Use of multiple renderKits.
  9. Provide XML Schema for the config files, instead of using DTD.
  10. Security enhancements for client side state saving.
  11. Solve the "duplicate button press" problem.
  12. The portlet related bug-fixes.

Tuesday, August 3, 2010

Rifidi

Rifidi is a complete middleware platform for building all facets of an RFID application.   With the industry leading prototyping tools and a cutting edge RFID middleware server, Rifidi can take you from an RFID Idea to a production application. 

Rifidi makes it possible to do rapid RFID prototyping and production deployments on a high performance, open source platform.

http://www.rifidi.org/

Monday, August 2, 2010

Apache Struts 2

Apache Struts 2 is MVC (Model View Controller) design pattern based user interface development (UI) framework. Struts2 plays the role of Controller within the MVC design, where the View could be any view technology like JSPs/Tiles, JSF etc and the Model could be JavaBeans or Enterprise Java Beans(EJBs) etc. Just like other major J2/EE frameworks it is POJO (Plain Old Java Objects) based development framework, which facilitates testing and decoupling.

It is an elegant, extensible framework for creating enterprise-ready Java web applications. The framework is designed to streamline the full development cycle, from building, to deploying, to maintaining applications over time.
Apache Struts 2 was originally known as WebWork 2. After working independently for several years, the WebWork and Struts communities joined forces to create Struts2. This new version of Struts is simpler to use and closer to how Struts was always meant to be.

JBPM - Workflow

jBPM is a flexible Business Process Management (BPM) Suite. It makes the bridge between business analysts and developers. Traditional BPM engines have a focus that is limited to non-technical people only. jBPM has a dual focus: it offers process management features in a way that both business users and developers like it.
/jbpm/mainColumnParagraphs/00/image/process.subprocess.document.png

What does jBPM do?

jBPM takes process descriptions as input. A process is composed of activities that are connected with transitions. Processes represent an execution flow. The graphical diagram of a process is used as the basis for the communication between non-technical users and developers.
Each execution of a process definition is called a process instance.  jBPM manages the process instances. Some activities, like sending an email or executing a script, are automatic. Other activities involve waiting for an external ocurrence, such as a person completing a task or an application calling back with the results of a request. jBPM keeps track of the state of the process executions during those wait periods.

Friday, July 9, 2010

Man-In-The-Middle Attack

The man-in-the middle attack intercepts a communication between two systems. For example, in an http transaction the target is the TCP connection between client and server. Using different techniques, the attacker splits the original TCP connection into 2 new connections, one between the client and the attacker and the other between the attacker and the server, as shown in figure 1. Once the TCP connection is intercepted, the attacker acts as a proxy, being able to read, insert and modify the data in the intercepted communication.
Image:main_the_middle.JPG
Figure 1. Illustration of man-in-the-middle attack
The MITM attack is very effective because of the nature of the http protocol and data transfer which are all ASCII based. In this way, it’s possible to view and interview within the http protocol and also in the data transferred. So, for example, it’s possible to capture a session cookie reading the http header, but it’s also possible to change an amount of money transaction inside the application context, as shown in figure 2.
Image:request.JPG
Figure 2. Illustration of a HTTP Packet intercepted with Paros Proxy.
The MITM attack could also be done over an https connection by using the same technique; the only difference consists in the establishment of two independent SSL sessions, one over each TCP connection. The browser sets a SSL connection with the attacker, and the attacker establishes another SSL connection with the web server. In general the browser warns the user that the digital certificate used is not valid, but the user may ignore the warning because he doesn’t understand the threat. In some specific contexts it’s possible that the warning doesn’t appear, as for example, when the Server certificate is compromised by the attacker or when the attacker certificate is signed by a trusted CA and the CN is the same of the original web site.
MITM is not only an attack technique, but is also usually used during the development step of a web application or is still used for Web Vulnerability assessments.

MITM Attack tools

There are several tools to realize a MITM attack. These tools are particularly efficient in LAN network environments, because they implement extra functionalities, like the arp spoof capabilities that permit the interception of communication between hosts.
  • PacketCreator
  • Ettercap
  • Dsniff
  • Cain e Abel

MITM Proxy only tools

Proxy tools only permit interactiion with the parts of the HTTP protocol, like the header and the body of a transaction, but do not have the capability to intercept the TCP connection between client and server. To intercept the communication, it’s necessary to use other network attack tools or configure the browser.
  • OWASP WebScarab
  • Paros Proxy
  • Burp Proxy
  • ProxyFuzz
  • Odysseus Proxy
  • Fiddler (by Microsoft) 

Thanks WIKI...



Man-In-The-Middle attack is the type of attack where attackers intrude into an existing connection to intercept the exchanged data and inject false information. It involves eavesdropping on a connection, intruding into a connection, intercepting messages, and selectively modifying data.



DEFINITION

The term "Man-in-the-middle attack" (MITM attack) refers to the type of attack where the attacker intrudes into the communication between the endpoints on a network to inject false information and intercept the data transferred between them.


MEMO
  • MITM attack is also known as:
    • Bucket-brigade attack
    • Fire brigade attack
    • Monkey-in-the-middle attack
    • Session hijacking
    • TCP hijacking
    • TCP session hijacking
  • Name Origin: The name "Man-in-the-Middle" is derived from the basketball scenario where two players intend to pass a ball to each other while one player between them tries to seize it. MITM attacks are sometimes referred to as "bucket brigade attacks" or "fire brigade attacks." Those names are derived from the fire brigade operation of dousing off the fire by passing buckets from one person to another between the water source and the fire.[1]


Other Definitions



Wikipedia [2]

In cryptography, the man-in-the-middle attack or bucket-brigade attack (often abbreviated MITM), sometimes Janus attack, is a form of active eavesdropping in which the attacker makes independent connections with the victims and relays messages between them, making them believe that they are talking directly to each other over a private connection when in fact the entire conversation is controlled by the attacker.


Javvin Technologies [3]

Man-in-the-Middle Attack (MITM) is a type of attack where a user gets between the sender and receiver of information and sniffs any information being sent.


Melani [4]

Man-in-the-middle attacks (MITM) 
Attacks in which the attacker infiltrates unnoticed the communication channel between two partners and is thereby able to spy on or even modify their data exchanges.


OVERVIEW

Man-in-the-Middle attacks are often referred to as "session hijacking attacks", suggesting that the intruder aims to gain access to a legitimate user's session to tamper it. The attack usually starts with sniffing and eavesdropping on a network stream, and ends with trying to alter, forge or reroute the intercepted data.
Man-in-the-Middle attacks are usually selected by hackers against public-key cryptosystems. In a public key scenario, hackers may substitute the intercepted public key with their forged public keys. Quite often in such cases, the victim parties are made to believe that they remain safe in communicating with each other. [1]
A common MITM attack scenario may involve the attacker having insinuated into the communication between a client and a server. In such scenarios, the attacker often transmits deceitful messages between the client and the server to make them feel safe in communicating with each other. Technically, the attacker can use a program which appears like a server to the client or vice versa.
The client/server scenario can be simply illustrated below:
|<<-Request-->>|             |<<-Request-->>|       
Client |---Decrypt-->>|MITM attacker|---Recrypt-->>| Server
       |<<-Response->>|             |<<-Response->>|
In MITM attacks, the attacker tries to get between two target network endpoints, and proxies all the communication between them. Once the trial is successful, further attacks to be launched may include sniffing the passing packets, hijacking already authenticated sessions, injecting packets or commands to the server, and sending the forged responses to the victim client.
MITM attacks are chiefly intended for sensitive and valuable information. MITM attacks are frequently chosen to intercept both HTTP and HTTPS communications. However, a successful MITM attacker has to deceitfully direct the target endpoint (i.e., the victim) to the attacker's proxy server instead of the real server.
One of the objectives for MITM attacks is to gain access to the client's messages and modify them before finally transmitting them to the server end. Other objectives of MITM can be to mislead the communicators at the client or server end, to intercept pertinent information (e.g., identity, address, password, or any other confidential information for malicious purposes) and also, at times, manipulate transactions.


SCENARIOS



Public Key Exchanging

MITM attacks are a common risk to web-based financial transaction systems - e.g., e-business websites, payment gateways, and online banking, insurancing and credit card servicing platforms. MITM attacks may lead to identity thefts and financial frauds.
In such a scenario, a MITM attacker may intercept the communication of public keys exchanged by the client and the server, and modify the public keys for a malicious purpose. To successfully avoid any suspicion from either relevant party, the attacker must also intercept the relevant encrypted messages and responses, and use the correct public keys to decrypt and recrypt them for all communication segments in every instance. Such attacking jobs, though seemingly too tough to accomplish, pose a real risk to insecure networks (e.g., the Internet, and wireless networks). [5]


Command Injection

Command injection, as an older type of common injection attacks, [14] is chiefly chosen by MITM attackers to hijack an already authenticated session, inject commands to the server and emulate fake replies to the client. [6]


Malicious Code Injection

MITM attackers can insert codes into mails, SQL statements and web pages(i.e., SQL injection, HTML/script injection or cross-site scripting), and even modify the binary files being downloaded to implant victim clients with a backdoor or to change the execution process of the downloaded programs. [6]


Downgrade Attacks - SSH V2 to V1

Alberto Ornaghi and Marco Valleri observe that MITM attackers may manage to change the parameters exchanged between the target endpoints (e.g., server and client) at the start of their connection. [6] According to their presentation at Blackhat Conference Europe 2003, the MITM attacker may "force the client to initialize a SSH1 connection instead of SSH2" via a filter to substitute the parameter "1.99" for SSH V2 with the one "1.51" for SSH V1. Meanwhile, Alberto and Marco also classify such scenarios as those of "Parameters and Banners Substitution." [15]


NOTE
  • Downgrade Attacks - SSH V2 to V1: The term "Downgrade Attack" here refers to an attack that forces the victims to use the less secure features, functions or protocols which remain supported for backward-compatibility reasons. Downgrade attacks may cover SSH (Secure SHell), IPSEC (Internet Protocol SECurity), and PPTP (Point-to-Point Tunneling Protocol).
The SSH protocol is an encrypted network protocol with command-line access capabilities. SSH V1 (i.e., SSH Version 1, also known as "SSH-1" and "SSH1") has security flaws so that attackers may perceive the usually encrypted data exchanged between the client and the server. SSH V2 made some security improvements over SSH V1: e.g., the Diffie-Hellman key exchange and the integrity checking via message authentication codes. Although SSH V2 is preferred by most legal hosts, SSH V1 is still supported for the purpose of backward compatibility. In the above-mentioned downgrade attack scenario, a MITM attacker can force the client and the server to use the vulnerable SSH V1 protocol before the encryption starts. [16]


Downgrade Attacks - IPSEC Failure

MITM attackers may impede the keymaterial exchanged on UDP Port 500 to deceive the victims into thinking that an IPSEC connection cannot start on the other side. That would result in the clear text stream over the connection without being noticed if the victim host is configured in rollback mode. [15]


Downgrade Attacks - PPTP

During the protocol negotiation phase at the beginning of a PPTP session, MITM attackers may force the victims to use the less secure PAP authentication, MSCHAP V1 (i.e., downgrading from MSCHAP V2), and even no encryption at all.
Attackers can also force re-negotiation (Terminate-Ack packet in clear text), steal passwords from existing tunnels, and repeat previous attacks.
Attackers can compel "password change" to get password hashes that can be utilised directly by a modified SMB or PPTP client. MSCHAP V1 hashes can also be forceed.


NOTE
  • PPTP: PPTP (Point-to-Point Tunneling Protocol) is a protocol for VPN implementation. Microsoft MSCHAP-V2 or EAP-TLS is used to authenticate PPTP connections. The EAP-TLS (Extensible Authentication Protocol-Transport Layer Security) is certificate based, and thus is a safer security option for PPTP than MSCHAP-V2. [17]


MITM TECHNIQUES [6]

The techniques used for MITM attacks can be classified below in consideration of the following three network environment types:
  • Local Area Network
  • From Local To Remote (through a gateway)
  • Remote


Local Area Network

  • ARP spoofing
    • Briefing: ARP (Address Resolution Protocol) spoofing is also known as "ARP poisoning" or ARP Poison Routing. The attacker may use ARP spoofing to sniff data frames on LAN and to modify the packets. The attacker may corrupt the ARP caches of directly connected hosts and finally take over the IP address of the victim host.
    • Tools used:
      • ARPoison is a UNIX Command-line tool that can be used to create spoofed ARP packets.
      • Ettercap can be used for filtering, hijacking, poisoning, sniffing, including SSH v.1 sniffing (transparent attack).
      • Dsniff can be used for poisoning, sniffing, including SSH v.1 sniffing (proxy attack)
      • Parasite is a daemon used to watch a LAN for ARP requests and automatically send spoofed ARP replies.
  • DNS spoofing
    • Briefing: The attacker starts by sniffing the ID of any DNS request, and then replies to the target requests before the real DNS server.
    • Tools used:
      • ADM DNS spoofing tools can spoof DNS packets via various active and passive methods.
      • Ettercap (Plugin needed: phantom plugin)
      • Dsniff (dnsspoof)
      • Zodiac can be used for DNS name server versioning, DNS local spoofing (answering DNS queries before the remote name server), DNS jizz spoofing, and DNS ID spoofing.
  • IP address spoofing
    • Briefing: The attacker creates IP packets with a forged source IP address in order to conceal the identity of the packet sender or to impersonate another computer system. (This method of attack on a remote system can be very difficult, because it involves modifying thousands of packets at a time. This type of attack is most effective where trust relationships exist between endpoints.)
    • Tools used:
      • Hping can be used to prepare spoofed IP datagrams with only a one-line command, and the attacker can send the prepared datagrams to almost any target victim.
      • Spoofed IP
  • Port stealing
    • Briefing: The term "Port Stealing" refers to the MITM technique used to spoof the switch forwarding database (FDB) and usurp the switch port of the victim host for packet sniffing on Layer 2 switched networks. The attacker starts by flooding the switch with the forged ARP packets that contain the same source MAC address as that of the victim host and the same destination MAC address as that of the attacker host. Note that those packets are invisible to other host on the same network. Now that the victim host also sends packets to the switch at the same time, the switch will receive packets containing the same source MAC address with two different ports. Therefore, the switch will repeatedly alter the MAC address binding to either of the two ports by referencing the relevant information in the packets. If the attacker's packets are faster, the switch will send the attacker the packets intended for the victim host. Then the attacker sniffs the received packet, stops flooding and sends an ARP request for the victim’s IP address. After receiving the ARP reply from the victim host, the attacker will manage to forward the "stolen" packet to the victim host. Finally, the flooding is launched again for another attacking cycle. [18]
    • Tools used:
      • Ettercap (Plugin needed: Confusion plugin)
  • STP mangling
    • Briefing: STP (Spanning-Tree Protocol) mangling refers to the technique used for the attacker host to be elected as the new root bridge of the spanning tree. The attacker may start either by forging BPDUs (Bridge Protocol Data Units) with high priority assuming to be the new root, or by broadcasting STP Configuration/Topology Change Acknowledgement BPDUs to get his host elected as the new root bridge. By taking over the root bridge, the attacker will be able to intercept most of the traffic.
    • Tools used:
      • Ettercap (Plugin needed: Lamia plugin)
      • Yersinia


From Local To Remote (through a gateway)

  • ARP poisoning
  • DNS spoofing
  • DHCP spoofing (e.g., Spoofing the DHCP Server)* is a type of attack on DHCP server to obtain IP addresses using spoofed DHCP messages
  • Gateway spoofing (usually, spoofing the default gateway)
  • ICMP redirection
  • IRDP spoofing - route mangling


Remote

  • DNS poisoning
  • Route mangling
  • Traffic tunneling


TOOLS

The fowllowing tools are commonly used for launching, detecting or testing MITM attacks.


Ettercap [7]

  • Tool Name: Ettercap
  • Current Version: NG-0.7.3 (Release Date: May 29, 2005)
  • Developer: Alberto Ornaghi, Marco Valleri
  • Platform/OS:
    • FreeBSD 4.x 5.x;
    • Linux 2.0.x, 2.2.x, 2.4.x, 2.6.x;
    • Microsoft Windows 2000/XP/2003;
    • NetBSD 1.5;
    • OpenBSD 2.[789], 3.x;
    • OS X (darwin 6.x, 7.x);
    • Solaris 2.x.
  • Commercial or Freeware: Freeware
  • URL: ettercap.sourceforge.net
  • Briefing: Ettercap is a multipurpose hacking suite for the switched LAN environment. As a LAN-based sniffer, interceptor and logger, it is chiefly featured by live-connection sniffing and content filtering on the fly. It supports the active and passive dissection of many protocols (even the ciphered ones) and includes some functionalities for network and host analysis. Ettercap can be used to launch an MITM attack via ARP poisoning or port stealing.


Dsniff [8]

  • Tool Name: Dsniff
  • Current Version: 2.3 (Release Date: December 19, 2000)
  • Developer: Dug Song
  • Platform/OS:
    • OpenBSD (i386);
    • Redhat Linux (i386);
    • Solaris (sparc).
  • Commercial or Freeware: Freeware
  • URL: www.monkey.org/~dugsong/dsniff
  • Briefing: Dsniff is claimed as a tool suite developed for network auditing and penetration testing, but the attacker can use it for SSL MITM attacks. Its components "dsniff", "filesnarf", "mailsnarf", "msgsnarf", "urlsnarf", and "webspy" can be used to passively monitor a network for sensitive data (e-mail, files and passwords). Its other components like "arpspoof", "dnsspoof", and "macof" allow the attacker to intercept network packets normally unavailable to the attacker. Its components "SSHMITM" and "WEBMITM" may help the attacker to launch active man-in-the-middle attacks against redirected SSH and HTTPS sessions by exploiting weak bindings in ad-hoc PKI.


Yersinia [19]

  • Tool Name: Yersinia
  • Current Version: 0.7.1 (Release Date: May 8, 2007)
  • Developer: Alfredo Andrés Omella (Slay), David Barroso Berrueta (tomac)
  • Platform/OS:
    • Linux 2.4.x and 2.6.x;
    • Mac OSX 10.4 Tiger (Intel);
    • OpenBSD 3.4 (note: upgrade your pcap libraries to at least 0.7.2);
    • Solaris 5.8 64bits SPARC.
  • Commercial or Freeware: Freeware
  • URL: www.yersinia.net
  • Briefing: Yersinia takes its name from the bacteria "Yersinia pestis." It can be used to exploit the vulnerabilities of the following network protocols: STP, CDP, DTP, DHCP, HSRP, IEEE 802.1Q, IEEE 802.1X, ISL (Inter-Switch Link Protocol), and VTP (VLAN Trunking Protocol).
Yersinia supports multithreading: multiple users and multiple attacks per user. It has three main modes: command line, network client and ncurses GUI. The attacker can use it to listen to the network, sniff packets, edit protocol fields, intercept network data in pcap format, analyze captured packets and replay them with the attacker's modifications.
Yersinia can be used for 29 types of attacks. In STP cases, the MITM attacker may use it on computers with two Ethernet cards to disguise as a root role dual-homed switch. In HSRP cases, the MITM attacker may use it to become an active router.


FOLLOW-UP: RISK SHEET

RISK SHEET
AUTHENTICATION SOLUTION MITM RISKS
1
EAP-MD5
On public Ethernets or wireless LANs, station identities and password hashes can be easily sniffed. EAP-MD5 does not provide mutual authentication or EAP server authentication. Thus, MITM attackers may disguise as access points to deceive legal users into authenticating to the rouge AP. [9] [13]
2
EAP-TTLS
The systems protected by EAP-TTLS are still vulnerable to MITM attacks because user passwords can be more easily guessed, shared, or disclosed via social engineering than client-side certificates. [9]
3
LEAP
The systems protected by LEAP are still vulnerable to MITM attacks. [11]
4
PEAP
The systems protected by PEAP are still vulnerable to MITM attacks. [9]
5
Key Fobs and One Time Password (OTP) tokens
Token-based and smart-card-based OTP systems are vulnerable to MITM attacks. Attackers may hijack online sessions by deceiving legal users into providing one-time-PINs produced by tokens or smart cards. [10] [12]

Risk Level: MEDIUM [12]

6
SSL
Credentials can sometimes be stolen in a MITM attack using a proxy server.

Risk Level: LOW [12]


NOTE
  • EAP: Extensible Authentication Protocol
  • LEAP: Light Extensible Authentication Protocol
  • PEAP: Protected Extensible Authentication Protocol
  • TTLS: Tunneled Transport Layer Security

Wednesday, July 7, 2010

Hit Counter


View My Stats