SlideShare a Scribd company logo
1 of 22
JSON Fuzzing: New
           approach to old problems

- Tamaghna Basu            - K.V.Prashant
tamaghna.basu@gmail.com    good.best.guy@gmail.com



http://null.co.in/                      http://nullcon.net/
Who are we?
        We are still discovering ourselves
        • Kaun hu main…
        • kahan hu main….
        • Main yahan kaise aya…
        • Purpose of my life…

      Till then,
      K.V.Prashant :- CEH, CISSP Security
           consultant/researcher. An avid null
           community member.


    Tamaghna Basu :- GCIH, CEH, ECSA, RHCE,
       Diploma in Cyber Law. Once coder, now
       researcher. A net addict citizen of India.




http://null.co.in/                                  http://nullcon.net/
What are you going to
           tolerate in next 30 mins or so…
      • Lazy bums we are.
      • Wanted an easy tool to
        test apps with JSON
        support. Unable to find
        one.
      • Laziness inside us
        prompted us to use an
        existing to and add JSON
        functionality instead
        building it from scratch.



http://null.co.in/                      http://nullcon.net/
Disclaimer
      We are not responsible for any mental, financial and
       physical health issues arising after viewing this
       presentation.

      We are not responsible for any damage to conference
       venue arising due our conference speech


                             So be seated at your own risk 


http://null.co.in/                                     http://nullcon.net/
Why are we here?
                              Because of him…
                              • American computer
                                programmer and
                                entrepreneur

                              • More popular for his
                                involvement and creation of
                                JSON format

                                           (Ref: Wikipedia)
          Doglas Croockford


http://null.co.in/                                   http://nullcon.net/
JSON:- What is that ?
      JSON (an acronym for JavaScript Object Notation) is a
         lightweight text-based open standard designed for human-
         readable data interchange. It is derived from the JavaScript
         programming language for representing simple data
         structures and associative arrays, called objects. Despite its
         relationship to JavaScript, it is language-independent, with
         parsers available for most programming languages.
      The JSON format was originally specified by Douglas Crockford,
         and is described in RFC 4627. The official Internet media type
         for JSON is application/json. The JSON filename extension is
         .json
      Blah… Blah… Blah…
                            SEE Wikipedia…
http://null.co.in/                                              http://nullcon.net/
JSON:- What is that ?
      In simple language
       It's a method to exchange data in a simple structured
         format between web-client and server.
       Mostly used with AJAX request/response scenarios.
       Lightweight, lesser tags and easy to parse- less
         computational intensive than XML
       Extensively used in applications developed by
         companies like Google, Yahoo, Amazon etc.



http://null.co.in/                                     http://nullcon.net/
JSON: Client Side processing
             var abc ='{"loginId":"'+ document.test.name.value +'","pwd":"'+
                document.test.password.value +'"}';
             var req = null;
             if (window.XMLHttpRequest) {
               req = new XMLHttpRequest();
             } else if (window.ActiveXObject) {
             try {
                   req = new ActiveXObject("Msxml2.XMLHTTP");
                 } catch (e) {
                               try {
                                      req = new ActiveXObject("Microsoft.XMLHTTP");
                                    } catch (e) {}
                             }
                   }
                   req.onreadystatechange = function() {
                                if(req.readyState == 4) {
                            if(req.status == 200) {
                               var employee=eval(+req.responseText+);
                                   document.write(employee.name);
                                      document.write(employee.age);
                          }else {
                            document.getElementById("realtooltip2").innerHTML="Error: returned status code " + req.status + " " + req.statusText;
                          }
                    }
                 };
                 req.open("POST", "http://in-prashantkv.in.kworld.kpmg.com:8080/servlets/Search", true);
                 req.send(abc);




http://null.co.in/                                                                                                                        http://nullcon.net/
JSON: Message Format
      Request sent to server :
      {
        “LoginId”:”name”
        “pwd":"secret”
      }

      Response received from server after authentication and
          processing:
      {
        “name”:”Prashant”
        “age":"secret”
      }

http://null.co.in/                                             http://nullcon.net/
JSON: Server Side processing
      Using org.json libraries we can parse JSON object in below way:

      public class HelloWorld extends HttpServlet{
      public void doPost(HttpServletRequest request, HttpServletResponse response)
                          throws ServletException, IOException{
      {
      StringBuffer jb = new StringBuffer();
      String line = null;
      BufferedReader reader = request.getReader();

      while ((line = reader.readLine()) != null)
      jb.append(line);

      JSONObject jsonObject = new JSONObject(jb.toString());

      String pwd = jsonObject.getString("pwd");
      String uname = jsonObject.getString("loginId");
      …..



http://null.co.in/                                                                   http://nullcon.net/
JSON: Server Side processing
      Using org.json libraries we can create JSON object in below method:

      public class HelloJSON
      {
        public static void main(String args[]){
        JSONObject jobject=new JSONObject();

          jobject.put("name","prashant");
          jobject.put("Age",new Integer(25));

           .........
          }
      }




http://null.co.in/                                                          http://nullcon.net/
JSON Fuzzing: What's missing
       Almost everything 
       Current tools support only name/value pair
        format of data e.g.
        login=test&passwd=test123&seclogin=on
       But not JSON format like:
        {"loginId":"test@ttt.com","pwd":"12345"}
       Tiresome to edit each field each field in http
        proxies like paros


http://null.co.in/                                http://nullcon.net/
JSON Fuzzing: What's missing




    login=test&passwd=test
    123&seclogin=on&Form
    Name=existing



http://null.co.in/                         http://nullcon.net/
JSON Fuzzing: What's missing




http://null.co.in/                         http://nullcon.net/
JSON Fuzzing: What's missing




http://null.co.in/                         http://nullcon.net/
JSON Fuzzing: What's missing




http://null.co.in/                       http://nullcon.net/
JSON Fuzzing: What we did
       Took a popular Firefox addon
       Added conversion module to convert JSON to
        name/value pair
       Added fuzzing capabilities on converted name
        value/pair
       Convert back fuzzed values to JSON object and
        complete the request
        (current contribution still under review)

http://null.co.in/                               http://nullcon.net/
JSON Fuzzing: Demo



                            Demo




http://null.co.in/                        http://nullcon.net/
JSON Fuzzing: Road Ahead
      Support for various JSON format :
       Simple object - {"loginId":"test@ttt.com","pwd":"12345"}

       Nested object –
        { "name": "Jack ("Bee") Nimble",
          "format": { "type": "rect", "width": 1920}
        }

       Array –
        ["Sunday", "Monday", "Tuesday", "Wednesday",
        "Thursday", "Friday", "Saturday"]


http://null.co.in/                                                 http://nullcon.net/
JSON Fuzzing: Road Ahead
       Present code changes to Tamper data
        submitted to original writer
       Adding JSON fuzzing capabilities to other tools
        like Webscarab
       Release a JSON application with common
        vulnerabilities




http://null.co.in/                               http://nullcon.net/
JSON Fuzzing: References
       JSON reference site www.json.org
       JSON Ajax tutorials
        http://www.ibm.com/developerworks/web/li
        brary/wa-ajaxintro11.html
       Tamper data page
        https://addons.mozilla.org/en-
        us/firefox/addon/tamper-data/


http://null.co.in/                              http://nullcon.net/
JSON Fuzzing: Road Ahead
                      If you are still there/awake then

                                Dhanyawad

                     Special Thanks to null community
  Tamaghna Basu
  - tamaghna.basu@gmail.com                   K.V.Prashant
  - tamahawk-                                 -good.best.guy@gmail.com
  techguru.blogspot.com
  - twitter.comtitanlambda


http://null.co.in/                                           http://nullcon.net/

More Related Content

What's hot

<img src="../i/r_14.png" />
<img src="../i/r_14.png" /><img src="../i/r_14.png" />
<img src="../i/r_14.png" />tutorialsruby
 
Source Code Analysis with SAST
Source Code Analysis with SASTSource Code Analysis with SAST
Source Code Analysis with SASTBlueinfy Solutions
 
Getting started with MongoDB and Scala - Open Source Bridge 2012
Getting started with MongoDB and Scala - Open Source Bridge 2012Getting started with MongoDB and Scala - Open Source Bridge 2012
Getting started with MongoDB and Scala - Open Source Bridge 2012sullis
 
Advanced Topics On Sql Injection Protection
Advanced Topics On Sql Injection ProtectionAdvanced Topics On Sql Injection Protection
Advanced Topics On Sql Injection Protectionamiable_indian
 
XPATH, LDAP and Path Traversal Injection
XPATH, LDAP and Path Traversal InjectionXPATH, LDAP and Path Traversal Injection
XPATH, LDAP and Path Traversal InjectionBlueinfy Solutions
 
Pentesting RESTful webservices
Pentesting RESTful webservicesPentesting RESTful webservices
Pentesting RESTful webservicesMohammed A. Imran
 
Dom XSS - Encounters of the 3rd Kind (Bishan Singh Kochher)
Dom XSS - Encounters of the 3rd Kind (Bishan Singh Kochher)Dom XSS - Encounters of the 3rd Kind (Bishan Singh Kochher)
Dom XSS - Encounters of the 3rd Kind (Bishan Singh Kochher)ClubHack
 
PHP And Web Services: Perfect Partners
PHP And Web Services: Perfect PartnersPHP And Web Services: Perfect Partners
PHP And Web Services: Perfect PartnersLorna Mitchell
 
Json-based Service Oriented Architecture for the web
Json-based Service Oriented Architecture for the webJson-based Service Oriented Architecture for the web
Json-based Service Oriented Architecture for the webkriszyp
 
The never-ending REST API design debate
The never-ending REST API design debateThe never-ending REST API design debate
The never-ending REST API design debateRestlet
 
External Data Access with jQuery
External Data Access with jQueryExternal Data Access with jQuery
External Data Access with jQueryDoncho Minkov
 
Lie to Me: Bypassing Modern Web Application Firewalls
Lie to Me: Bypassing Modern Web Application FirewallsLie to Me: Bypassing Modern Web Application Firewalls
Lie to Me: Bypassing Modern Web Application FirewallsIvan Novikov
 
Entity provider selection confusion attacks in JAX-RS applications
Entity provider selection confusion attacks in JAX-RS applicationsEntity provider selection confusion attacks in JAX-RS applications
Entity provider selection confusion attacks in JAX-RS applicationsMikhail Egorov
 
Laravel Security Standards
Laravel Security Standards Laravel Security Standards
Laravel Security Standards Singsys Pte Ltd
 
Play Your API with MuleSoft API Notebook
Play Your API with MuleSoft API NotebookPlay Your API with MuleSoft API Notebook
Play Your API with MuleSoft API NotebookRakesh Kumar Jha
 
Building Secure User Interfaces With JWTs (JSON Web Tokens)
Building Secure User Interfaces With JWTs (JSON Web Tokens)Building Secure User Interfaces With JWTs (JSON Web Tokens)
Building Secure User Interfaces With JWTs (JSON Web Tokens)Stormpath
 

What's hot (20)

<img src="../i/r_14.png" />
<img src="../i/r_14.png" /><img src="../i/r_14.png" />
<img src="../i/r_14.png" />
 
Source Code Analysis with SAST
Source Code Analysis with SASTSource Code Analysis with SAST
Source Code Analysis with SAST
 
Getting started with MongoDB and Scala - Open Source Bridge 2012
Getting started with MongoDB and Scala - Open Source Bridge 2012Getting started with MongoDB and Scala - Open Source Bridge 2012
Getting started with MongoDB and Scala - Open Source Bridge 2012
 
Advanced Topics On Sql Injection Protection
Advanced Topics On Sql Injection ProtectionAdvanced Topics On Sql Injection Protection
Advanced Topics On Sql Injection Protection
 
DEfcon15 XXE XXS
DEfcon15 XXE XXSDEfcon15 XXE XXS
DEfcon15 XXE XXS
 
XPATH, LDAP and Path Traversal Injection
XPATH, LDAP and Path Traversal InjectionXPATH, LDAP and Path Traversal Injection
XPATH, LDAP and Path Traversal Injection
 
Wt unit 6 ppts web services
Wt unit 6 ppts web servicesWt unit 6 ppts web services
Wt unit 6 ppts web services
 
Pentesting RESTful webservices
Pentesting RESTful webservicesPentesting RESTful webservices
Pentesting RESTful webservices
 
Dom XSS - Encounters of the 3rd Kind (Bishan Singh Kochher)
Dom XSS - Encounters of the 3rd Kind (Bishan Singh Kochher)Dom XSS - Encounters of the 3rd Kind (Bishan Singh Kochher)
Dom XSS - Encounters of the 3rd Kind (Bishan Singh Kochher)
 
Attacking REST API
Attacking REST APIAttacking REST API
Attacking REST API
 
PHP And Web Services: Perfect Partners
PHP And Web Services: Perfect PartnersPHP And Web Services: Perfect Partners
PHP And Web Services: Perfect Partners
 
Json-based Service Oriented Architecture for the web
Json-based Service Oriented Architecture for the webJson-based Service Oriented Architecture for the web
Json-based Service Oriented Architecture for the web
 
The never-ending REST API design debate
The never-ending REST API design debateThe never-ending REST API design debate
The never-ending REST API design debate
 
External Data Access with jQuery
External Data Access with jQueryExternal Data Access with jQuery
External Data Access with jQuery
 
Lie to Me: Bypassing Modern Web Application Firewalls
Lie to Me: Bypassing Modern Web Application FirewallsLie to Me: Bypassing Modern Web Application Firewalls
Lie to Me: Bypassing Modern Web Application Firewalls
 
Wt unit 2 ppts client side technology
Wt unit 2 ppts client side technologyWt unit 2 ppts client side technology
Wt unit 2 ppts client side technology
 
Entity provider selection confusion attacks in JAX-RS applications
Entity provider selection confusion attacks in JAX-RS applicationsEntity provider selection confusion attacks in JAX-RS applications
Entity provider selection confusion attacks in JAX-RS applications
 
Laravel Security Standards
Laravel Security Standards Laravel Security Standards
Laravel Security Standards
 
Play Your API with MuleSoft API Notebook
Play Your API with MuleSoft API NotebookPlay Your API with MuleSoft API Notebook
Play Your API with MuleSoft API Notebook
 
Building Secure User Interfaces With JWTs (JSON Web Tokens)
Building Secure User Interfaces With JWTs (JSON Web Tokens)Building Secure User Interfaces With JWTs (JSON Web Tokens)
Building Secure User Interfaces With JWTs (JSON Web Tokens)
 

Similar to JSON Fuzzing: New approach to old problems

WebSocket JSON Hackday
WebSocket JSON HackdayWebSocket JSON Hackday
WebSocket JSON HackdaySomay Nakhal
 
JSON & AJAX.pptx
JSON & AJAX.pptxJSON & AJAX.pptx
JSON & AJAX.pptxdyumna2
 
Introduction to JSON & AJAX
Introduction to JSON & AJAXIntroduction to JSON & AJAX
Introduction to JSON & AJAXRaveendra R
 
Basics of JSON (JavaScript Object Notation) with examples
Basics of JSON (JavaScript Object Notation) with examplesBasics of JSON (JavaScript Object Notation) with examples
Basics of JSON (JavaScript Object Notation) with examplesSanjeev Kumar Jaiswal
 
CouchDB on Android
CouchDB on AndroidCouchDB on Android
CouchDB on AndroidSven Haiges
 
Why Nodejs Guilin Shanghai
Why Nodejs Guilin ShanghaiWhy Nodejs Guilin Shanghai
Why Nodejs Guilin ShanghaiJackson Tian
 
Why Node.js
Why Node.jsWhy Node.js
Why Node.jsguileen
 
Node.js Patterns for Discerning Developers
Node.js Patterns for Discerning DevelopersNode.js Patterns for Discerning Developers
Node.js Patterns for Discerning Developerscacois
 
Http4s, Doobie and Circe: The Functional Web Stack
Http4s, Doobie and Circe: The Functional Web StackHttp4s, Doobie and Circe: The Functional Web Stack
Http4s, Doobie and Circe: The Functional Web StackGaryCoady
 
Node.js introduction
Node.js introductionNode.js introduction
Node.js introductionParth Joshi
 
Node.js - async for the rest of us.
Node.js - async for the rest of us.Node.js - async for the rest of us.
Node.js - async for the rest of us.Mike Brevoort
 
Jackson beyond JSON: XML, CSV
Jackson beyond JSON: XML, CSVJackson beyond JSON: XML, CSV
Jackson beyond JSON: XML, CSVTatu Saloranta
 

Similar to JSON Fuzzing: New approach to old problems (20)

Advanced I/O in browser
Advanced I/O in browserAdvanced I/O in browser
Advanced I/O in browser
 
JavaScript Lessons 2023 V2
JavaScript Lessons 2023 V2JavaScript Lessons 2023 V2
JavaScript Lessons 2023 V2
 
Json
JsonJson
Json
 
WebSocket JSON Hackday
WebSocket JSON HackdayWebSocket JSON Hackday
WebSocket JSON Hackday
 
JSON & AJAX.pptx
JSON & AJAX.pptxJSON & AJAX.pptx
JSON & AJAX.pptx
 
Introduction to JSON & AJAX
Introduction to JSON & AJAXIntroduction to JSON & AJAX
Introduction to JSON & AJAX
 
Basics of JSON (JavaScript Object Notation) with examples
Basics of JSON (JavaScript Object Notation) with examplesBasics of JSON (JavaScript Object Notation) with examples
Basics of JSON (JavaScript Object Notation) with examples
 
huhu
huhuhuhu
huhu
 
Json
JsonJson
Json
 
CouchDB on Android
CouchDB on AndroidCouchDB on Android
CouchDB on Android
 
Why Nodejs Guilin Shanghai
Why Nodejs Guilin ShanghaiWhy Nodejs Guilin Shanghai
Why Nodejs Guilin Shanghai
 
Why Node.js
Why Node.jsWhy Node.js
Why Node.js
 
Node.js Patterns for Discerning Developers
Node.js Patterns for Discerning DevelopersNode.js Patterns for Discerning Developers
Node.js Patterns for Discerning Developers
 
Json at work overview and ecosystem-v2.0
Json at work   overview and ecosystem-v2.0Json at work   overview and ecosystem-v2.0
Json at work overview and ecosystem-v2.0
 
Http4s, Doobie and Circe: The Functional Web Stack
Http4s, Doobie and Circe: The Functional Web StackHttp4s, Doobie and Circe: The Functional Web Stack
Http4s, Doobie and Circe: The Functional Web Stack
 
Node.js introduction
Node.js introductionNode.js introduction
Node.js introduction
 
NodeJS
NodeJSNodeJS
NodeJS
 
JSON
JSONJSON
JSON
 
Node.js - async for the rest of us.
Node.js - async for the rest of us.Node.js - async for the rest of us.
Node.js - async for the rest of us.
 
Jackson beyond JSON: XML, CSV
Jackson beyond JSON: XML, CSVJackson beyond JSON: XML, CSV
Jackson beyond JSON: XML, CSV
 

Recently uploaded

Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...AliaaTarek5
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditSkynet Technologies
 

Recently uploaded (20)

Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance Audit
 

JSON Fuzzing: New approach to old problems

  • 1. JSON Fuzzing: New approach to old problems - Tamaghna Basu - K.V.Prashant tamaghna.basu@gmail.com good.best.guy@gmail.com http://null.co.in/ http://nullcon.net/
  • 2. Who are we? We are still discovering ourselves • Kaun hu main… • kahan hu main…. • Main yahan kaise aya… • Purpose of my life… Till then, K.V.Prashant :- CEH, CISSP Security consultant/researcher. An avid null community member. Tamaghna Basu :- GCIH, CEH, ECSA, RHCE, Diploma in Cyber Law. Once coder, now researcher. A net addict citizen of India. http://null.co.in/ http://nullcon.net/
  • 3. What are you going to tolerate in next 30 mins or so… • Lazy bums we are. • Wanted an easy tool to test apps with JSON support. Unable to find one. • Laziness inside us prompted us to use an existing to and add JSON functionality instead building it from scratch. http://null.co.in/ http://nullcon.net/
  • 4. Disclaimer We are not responsible for any mental, financial and physical health issues arising after viewing this presentation. We are not responsible for any damage to conference venue arising due our conference speech So be seated at your own risk  http://null.co.in/ http://nullcon.net/
  • 5. Why are we here? Because of him… • American computer programmer and entrepreneur • More popular for his involvement and creation of JSON format (Ref: Wikipedia) Doglas Croockford http://null.co.in/ http://nullcon.net/
  • 6. JSON:- What is that ? JSON (an acronym for JavaScript Object Notation) is a lightweight text-based open standard designed for human- readable data interchange. It is derived from the JavaScript programming language for representing simple data structures and associative arrays, called objects. Despite its relationship to JavaScript, it is language-independent, with parsers available for most programming languages. The JSON format was originally specified by Douglas Crockford, and is described in RFC 4627. The official Internet media type for JSON is application/json. The JSON filename extension is .json Blah… Blah… Blah… SEE Wikipedia… http://null.co.in/ http://nullcon.net/
  • 7. JSON:- What is that ? In simple language  It's a method to exchange data in a simple structured format between web-client and server.  Mostly used with AJAX request/response scenarios.  Lightweight, lesser tags and easy to parse- less computational intensive than XML  Extensively used in applications developed by companies like Google, Yahoo, Amazon etc. http://null.co.in/ http://nullcon.net/
  • 8. JSON: Client Side processing var abc ='{"loginId":"'+ document.test.name.value +'","pwd":"'+ document.test.password.value +'"}'; var req = null; if (window.XMLHttpRequest) { req = new XMLHttpRequest(); } else if (window.ActiveXObject) { try { req = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { req = new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) {} } } req.onreadystatechange = function() { if(req.readyState == 4) { if(req.status == 200) { var employee=eval(+req.responseText+); document.write(employee.name); document.write(employee.age); }else { document.getElementById("realtooltip2").innerHTML="Error: returned status code " + req.status + " " + req.statusText; } } }; req.open("POST", "http://in-prashantkv.in.kworld.kpmg.com:8080/servlets/Search", true); req.send(abc); http://null.co.in/ http://nullcon.net/
  • 9. JSON: Message Format Request sent to server : { “LoginId”:”name” “pwd":"secret” } Response received from server after authentication and processing: { “name”:”Prashant” “age":"secret” } http://null.co.in/ http://nullcon.net/
  • 10. JSON: Server Side processing Using org.json libraries we can parse JSON object in below way: public class HelloWorld extends HttpServlet{ public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException{ { StringBuffer jb = new StringBuffer(); String line = null; BufferedReader reader = request.getReader(); while ((line = reader.readLine()) != null) jb.append(line); JSONObject jsonObject = new JSONObject(jb.toString()); String pwd = jsonObject.getString("pwd"); String uname = jsonObject.getString("loginId"); ….. http://null.co.in/ http://nullcon.net/
  • 11. JSON: Server Side processing Using org.json libraries we can create JSON object in below method: public class HelloJSON { public static void main(String args[]){ JSONObject jobject=new JSONObject(); jobject.put("name","prashant"); jobject.put("Age",new Integer(25)); ......... } } http://null.co.in/ http://nullcon.net/
  • 12. JSON Fuzzing: What's missing  Almost everything   Current tools support only name/value pair format of data e.g. login=test&passwd=test123&seclogin=on  But not JSON format like: {"loginId":"test@ttt.com","pwd":"12345"}  Tiresome to edit each field each field in http proxies like paros http://null.co.in/ http://nullcon.net/
  • 13. JSON Fuzzing: What's missing login=test&passwd=test 123&seclogin=on&Form Name=existing http://null.co.in/ http://nullcon.net/
  • 14. JSON Fuzzing: What's missing http://null.co.in/ http://nullcon.net/
  • 15. JSON Fuzzing: What's missing http://null.co.in/ http://nullcon.net/
  • 16. JSON Fuzzing: What's missing http://null.co.in/ http://nullcon.net/
  • 17. JSON Fuzzing: What we did  Took a popular Firefox addon  Added conversion module to convert JSON to name/value pair  Added fuzzing capabilities on converted name value/pair  Convert back fuzzed values to JSON object and complete the request (current contribution still under review) http://null.co.in/ http://nullcon.net/
  • 18. JSON Fuzzing: Demo Demo http://null.co.in/ http://nullcon.net/
  • 19. JSON Fuzzing: Road Ahead Support for various JSON format :  Simple object - {"loginId":"test@ttt.com","pwd":"12345"}  Nested object – { "name": "Jack ("Bee") Nimble", "format": { "type": "rect", "width": 1920} }  Array – ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"] http://null.co.in/ http://nullcon.net/
  • 20. JSON Fuzzing: Road Ahead  Present code changes to Tamper data submitted to original writer  Adding JSON fuzzing capabilities to other tools like Webscarab  Release a JSON application with common vulnerabilities http://null.co.in/ http://nullcon.net/
  • 21. JSON Fuzzing: References  JSON reference site www.json.org  JSON Ajax tutorials http://www.ibm.com/developerworks/web/li brary/wa-ajaxintro11.html  Tamper data page https://addons.mozilla.org/en- us/firefox/addon/tamper-data/ http://null.co.in/ http://nullcon.net/
  • 22. JSON Fuzzing: Road Ahead If you are still there/awake then Dhanyawad Special Thanks to null community Tamaghna Basu - tamaghna.basu@gmail.com K.V.Prashant - tamahawk- -good.best.guy@gmail.com techguru.blogspot.com - twitter.comtitanlambda http://null.co.in/ http://nullcon.net/