Agenda Introduction Payment gateways Weaknesses Attacks Conclusion.

Slides:



Advertisements
Similar presentations
TWO STEP EQUATIONS 1. SOLVE FOR X 2. DO THE ADDITION STEP FIRST
Advertisements

Credit Card Processing 101
Chapter 8 Payment Systems: Getting the Money
Chapter 10 Encryption: A Matter of Trust. Awad –Electronic Commerce 1/e © 2002 Prentice Hall 2 OBJECTIVES What is Encryption? Basic Cryptographic Algorithm.
Slide 1 Insert your own content. Slide 2 Insert your own content.
Cultural Heritage in REGional NETworks REGNET E-SHOP.
CONFIDENTIAL 1 Preparing for & Maintaining PCI Compliance.
Business Transaction Management Software for Application Coordination 1 Business Processes and Coordination.
0 - 0.
DIVIDING INTEGERS 1. IF THE SIGNS ARE THE SAME THE ANSWER IS POSITIVE 2. IF THE SIGNS ARE DIFFERENT THE ANSWER IS NEGATIVE.
SUBTRACTING INTEGERS 1. CHANGE THE SUBTRACTION SIGN TO ADDITION
MULT. INTEGERS 1. IF THE SIGNS ARE THE SAME THE ANSWER IS POSITIVE 2. IF THE SIGNS ARE DIFFERENT THE ANSWER IS NEGATIVE.
Addition Facts
Banking Services AVAILABLE FOR A SMALL BUSINESS. BANKING SERVICES 2 Welcome 1. Agenda 2. Ground Rules 3. Introductions.
Chapter 12 The Revenue Cycle: Sales to Cash Collections Copyright © 2012 Pearson Education, Inc. publishing as Prentice Hall 12-1.
1 STATISTICAL DATA ON THE BANKS PAYMENT SYSTEMS IN FINLAND May 2013.
State of Florida Credit Card/Electronic Payment Project Status.
The ABCs of Credit Card Finance Essential Facts for Students 2012 Carol A. Carolan, Ph.D.
Lecture 3 Title: Online Payment: Credit Card and PayPal
Evolving Challenges of PCI Compliance Charlie Wood, PCI QSA, CRISC, CISA Principal, The Bonadio Group January 10, 2014.
SAP - Online Transaction Processing (OLTP)
The Enterprise Business Center. #2 CyberSource Enterprise Business Center your payment processing dashboard ******** Log out security feature All tools.
The Revenue Cycle: Sales to Cash Collections
O X Click on Number next to person for a question.
Past Tense Probe. Past Tense Probe Past Tense Probe – Practice 1.
Limits (Algebraic) Calculus Fall, What can we do with limits?
1.7.6.G1 © Family Economics & Financial Education –March 2008 – Financial Institutions – Online Banking – Slide 1 Funded by a grant from Take Charge America,
Addition 1’s to 20.
25 seconds left…...
Test B, 100 Subtraction Facts
1 What is Your Security IQ?. 2 Introduction: Exercise.
11 = This is the fact family. You say: 8+3=11 and 3+8=11
Week 1.
Infosec 2012 | 25/4/12 Application Performance Monitoring Ofer MAOR CTO Infosec 2012.
1 Unit 1 Kinematics Chapter 1 Day
O X Click on Number next to person for a question.
1 PART 1 ILLUSTRATION OF DOCUMENTS  Brief introduction to the documents contained in the envelope  Detailed clarification of the documents content.
The Expenditure Cycle: Purchasing to Cash Disbursements
Online Shopping Self-Defense
Navigating the New SAQs (Helping the 99% validate PCI compliance)
AcqENGIN Functional Review © 2010 M2. All rights reserved.
Payment Gateway Onno W. Purbo Issu Utama Payment Method Security Certificate Authority Cyberlaw.
Presented by : Vivian Eberhardt, Supervisor Cash and Credit Operations
GPUG ® Summit 2011 November 8-11 Caesars Palace – Las Vegas, NV Payment Processing Online and Within Dynamics GP PCI Compliance and Secure Payment Processing.
1 Applications of Computers Lecture-3 2 E-Commerce 4 Almost all major companies have their homes on the web, mainly for advertising 4 Companies were.
Information Networking Security and Assurance Lab National Chung Cheng University 1 Top Vulnerabilities in Web Applications (I) Unvalidated Input:  Information.
PayPal E-Business Technologies Prof.Dr. Eduard Heindl BCM SS Edit Molnar.
“Electronic Payment System”
Web Payments via Christopher Woods Aaron Buma. Agenda  Introduction  About it  Why to use it  Services they Provide  Seller Protection  Ebay Aspect.
© 2008 Authorize.Net 1 Welcome to Authorize.Net New Reseller Overview 2008.
May 28, 2002Mårten Trolin1 Protocols for e-commerce Traditional credit cards SET SPA/UCAF 3D-Secure Temporary card numbers Direct Payments.
Ecommerce Applications 2007/8 Session 61 E-commerce Applications Process views.
Electronic Payment Systems. How do we make an electronic payment? Credit and debit cards Smart cards Electronic cash (digital cash) Electronic wallets.
1 1 Slide HOW CREDIT CARDS WORK. 2 2 Slide How Credit Cards Work n What the numbers on the card mean? n How the transactions work? n Main entities involved.
Copyright 2007 © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. The OWASP.
Customer Interface for wuw.com 1.Context. Customer Interface for wuw.com 2. Content Our web-site can be classified as an service-dominant website. 3.
Payment Systems Unit 34: E-commerce M2 - Compare two different payment systems used in e-commerce systems.
What you need to know about PCI-DSS Jane Drews Chief Information Security Officer Information Security & Policy Office
OBJECTIVES  To understand the concept of Electronic Payment System and its security services.  To bring out solution in the form of applications to.
Networking E-commerce. E-commerce ► A general term used to describe the buying and selling of products or services over the Internet. ► This covers a.
27th June e-Sales Project Web Liaison Group Meeting 27th June 2005 Chris Sendall and Nick Mattin
Credit Card Data Security
PAYMENT GATEWAYS – ESSENTIAL FOR E- COMMERCE STORE!!! While adding ecommerce functionality to your websites, the prime need arise is to having a secure.
Trusted source for all your payment processing needs.
PCI 3.1 Boot Camp Payment Card Industry Data Security Standards 3.1.
PCI DSS Improve the Security of Your Ecommerce Environment
Setting and Upload Products
PAYMENT GATEWAY Presented by SHUJA ASHRAF SHAH ENROLL: 4471
Onno W. Purbo Payment Gateway Onno W. Purbo
Presentation transcript:

Agenda Introduction Payment gateways Weaknesses Attacks Conclusion

Introduction

Introduction A payment gateway is an e-commerce application service provider service that authorizes payments online. It is the equivalent of a physical point of sale terminal. Payment gateways protect credit card details by encrypting sensitive information, such as credit card numbers, to ensure that information is passed securely between the customer and the merchant and also between merchant and the payment processor.

@Wireghoul Penetration tester Father Husband Geek Blogger

“Bad guys” have an end game: Fraudulent transactions Not paying for goods/services Paying very little for goods/services Steal credit cards Always popular Easy to convert into cash

Payment gateways are: Easy to use! Supports developers! Secure! Iframe shopping carts Transaction details in url Supports developers! Documentation Source code Secure! PCI compliant Request Validation aka “Tamper proof” Use SSL

Testing payment gateways Out of penetration testing scope Test data Use test credit card numbers VISA 4111 1111 1111 1111 Mastercard 5555 5555 5555 4444 American Express 378282246310005

Transaction diagram Browser   Merchant Website   Payment Gateway

From the trenches What have we seen in “the wild”: Cross site scripting Information disclosure Directory traversal Negative numbers Exposure of credit card numbers Configuration issues Insecure file uploads More

Basic attacks Tamper to change payment amount Tamper to change currency Tamper to change return url Spoof transaction complete

Transaction diagram Browser   Merchant Website   Payment Gateway

Basic attacks Tamper to change payment amount Tamper to change currency Tamper to change return url Spoof transaction complete Solved with request validation

Vendor resources

Using Vendor resources Identify vulnerabilities based on vendor resources Documentation Example source code API Libraries Shopping cart code

Vendor resources – Example code <?php /** Constants */ $customer_data_dir = "/var/tmp"; $customer_ref = $_POST["customer_ref"]; $subscription_ref = $_POST["subscription_ref"]; if($customer_ref == null) { header("HTTP/1.0 404 Not Found"); } else { $customer_data = fopen("$customer_data_dir/$customer_ref.txt", "w") or die("Can't open file."); fwrite($customer_data, $subscription_ref); fclose($customer_data); } ?>

Vendor resources – Example code <?php /** Constants */ $customer_data_dir = "/var/tmp"; $customer_ref = $_POST["customer_ref"]; if($customer_ref == null) { header("HTTP/1.0 404 Not Found"); } else { unlink("$customer_data_dir/$customer_ref.txt") } ?>

Vendor resources – Shopping carts OSVDB graph of vulnerabilities

Vendor resources – Shopping carts Transaction complete with incomplete payment – (SA-CONTRIB-2010-064) Price manipulation (OSVDB-32192, 38368, 11429, 11430, 11431 + many others) Remote command/code execution Authentication bypass Customer database exposure Abritrary file upload Format string

Vendor resources – Shopping carts Use SSL … right?

Request validation

Request validation To validate the request of the payment page result, signed request is often used - which is the result of the hash function in which the parameters of an application confirmed by a «secret word», known only to the merchant and payment gateway. -- Wikipedia http://en.wikipedia.org/wiki/Payment_gateway

Defeating request validation Bypass request validation Attacking the hashing algorithm Attack the request validation itself There are a few ways around the request validation, You can bypass the validation process You can attack the cryptographical algorithms used You can also attack the request validation, which I will cover in detail

Bypassing request validation HTTP Parameter Pollution https://url/pay?amount=100.00&amount=0.01 Abusing unprotected parameters https://url/pay?expiry_date=31/12/2099 Abusing application logic https://url/pay?pre_auth=1

Attacking request validation Hashing algorithm attacks MD5 hash length attack Hash mismatch behavior Redirects to attacker supplied url

Breaking request validation Brute force attacks Known plaintext Weak entropy due to text transform of secret Can be done offline Without completing a transaction

Brute force request validation - Example SHA1 of "EPS_MERCHANTID|Password|EPS_TXNTYPE|EPS_ REFERENCEID|EPS_AMOUNT|EPS_TIMESTAMP" sha1('ABC0010|password123|0|Test Reference|100.00|20120916221931') 6bec095d6df852d236bc1985f2d5d73009af68a5

Brute force request validation - Example <input hidden EPS_MERCHANT = “ABC0010"> <input hidden EPS_TXNTYPE = "0"> <input hidden EPS_REFERENCEID ="Test Reference"> <input hidden EPS_AMOUNT ="100.00"> <input hidden EPS_TIMESTAMP ="20120916221931"> <input hidden EPS_FINGERPRINT =" 6bec095d6df852d236bc1985f2d5d73009af68a5"> <input hidden EPS_RESULTURL = “https://www.merchantsite.com/”>

Brute force request validation - Example Fingerprint EPS_MERCHANTID Password EPS_TXNTYPE EPS_REFERENCEID EPS_AMOUNT EPS_TIMESTAMP

Brute force request validation - Example Fingerprint Web form EPS_MERCHANTID EPS_MERCHANT Password EPS_TXNTYPE EPS_REFERENCEID EPS_AMOUNT EPS_TIMESTAMP EPS_FINGERPRINT

Brute force request validation - Example Fingerprint Web form EPS_MERCHANTID EPS_MERCHANT Password EPS_TXNTYPE EPS_REFERENCEID EPS_AMOUNT EPS_TIMESTAMP EPS_FINGERPRINT

Brute force request validation - Example Password is usually: Vendor supplied User specified No change requirements Sometimes converted to upper/lower-case [a-zA-Z0-9]{8} [a-z0-9]{8} .{8} [0-9a-f]^32

Breaking request validation Once we have broken request validation we can Perform SQLi attack Alter cost Alter currency Spoof payment received signatures

Breaking response validation A string used to validate the transaction output. SHA1 hash of: EPS_MERCHANTID|Password|EPS_REFERENCEID|E PS_AMOUNT|EPS_TIMESTAMP|EPS_SUMMARYCO DE sha1('ABC0010|password123|Test Reference|100.00|20120916221931|1') 633c32a13e87e5f538f5521501013ffe44dc66b3

DEMO

Conclusion Don’t rely on the browser to drive traffic between the merchant website and the payment gateway Always validate the transaction amount and payment status in a secondary request using API before considering a transaction complete Wait for payment to clear before shipping goods Use more than one unknown variable in request validation Weak request validation does not equal a vulnerability

Questions ???