SlideShare ist ein Scribd-Unternehmen logo
1 von 12
!?
[App       Server            ]


               2010. 7. 17

       (   )
!
                        •          /( )                          CTO

                        •    2005~2010 : SK
                             -                                         /
                             -                       (       ,     ,       ,   )

                        •    contact : @cserock | http://rockk.egloos.com


        blueonion
•         :
•   2010. 4
•        24              (            :3 )
•   http://blueonionsoft.com

blueonion
http://www.test.com/getUserInfo.php?id=234



                         XML or JSON




blueonion
!

•   http://test.com/savePoint.php?id=2&point=450

•   http://test.com/updateUserInfo.php?id=2&password=teertfdsa

•   http://test.com/getUserInfo.php?id=2




    blueonion
;
•   endpoint          : savePoint.php, updateUserInfo.php
    !

•   data         : id, point, password
    !

•               Abusing
    ! savePoint.php       id=3&point=500000                 ?


    blueonion
,‘           ’                   .

•                    - App       “           ”

•                                                        .

•                                        -

•                                    -               .



    blueonion
http://www.test.com?st=xndje3e2j3%dws3olnf



                         XML or JSON




blueonion
•   AES-128

                •   CryptoHelper         (         )
                •   CommonCrypto / Security framework
                •   st(security token)


                •   libmcrypt
                •   php          mcrypt function
                •           st
    blueonion
:
// make parameter
NSString *param = [[NSString stringWithFormat:@"id=2&point=450&nonce=%d",
rand()] stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];

// make st (key is ‘123456789abcdef’)
NSString *st = [[CryptoHelper sharedInstance] encryptString:param];

 
 
// now lets create the body of the post
NSMutableData *body = [NSMutableData data];

 
 
[body appendData:[[NSString stringWithFormat:@"rn--%@rn",boundary]
dataUsingEncoding:NSUTF8StringEncoding]];
[body appendData:[[NSString stringWithFormat:@"Content-Disposition: form-data;
name="st"rnrn%@", st] dataUsingEncoding:NSUTF8StringEncoding]];
[body appendData:[[NSString stringWithFormat:@"rn--%@--rn",boundary]
dataUsingEncoding:NSUTF8StringEncoding]];
[request setHTTPBody:body];

  blueonion
:
<?php

// base64 decode st
$tmp_st = base64_decode($_POST[‘st’]);

// decrypt st (key is ‘123456789abcdef’)
$st = urldecode(trim(mcrypt_decrypt(MCRYPT_RIJNDAEL_128, ‘123456789abcdef’,
$tmp_st, MCRYPT_MODE_ECB,
mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128,
MCRYPT_MODE_ECB), MCRYPT_RAND))));


// st is ‘id=2&point=450&nonce=12342234’
?>


   blueonion
•   HTTP_USER_AGENT
    => App

•                           framework
    =>
    => endpoint

•   st(security token)   timestamp

•


    blueonion
Thanks for attention

Weitere ähnliche Inhalte

Was ist angesagt?

Strain Letter for Kyle
Strain Letter for KyleStrain Letter for Kyle
Strain Letter for KyleKyle Erwin
 
PRESENTACIÓ CURS 2010-2011
PRESENTACIÓ CURS 2010-2011PRESENTACIÓ CURS 2010-2011
PRESENTACIÓ CURS 2010-2011guest7ee1090
 
自動テストデザインパターン@XP祭り2006
自動テストデザインパターン@XP祭り2006自動テストデザインパターン@XP祭り2006
自動テストデザインパターン@XP祭り2006Kuniaki Igarashi
 
มุมมองชิ้นงาน
มุมมองชิ้นงานมุมมองชิ้นงาน
มุมมองชิ้นงานPomPam Comsci
 
Understanding Cause & Effect in Customer Behaviour
Understanding Cause & Effect in Customer BehaviourUnderstanding Cause & Effect in Customer Behaviour
Understanding Cause & Effect in Customer BehaviourData Science London
 
ใบความรู้ที่ 2.15 ฟอร์ม-2
ใบความรู้ที่ 2.15 ฟอร์ม-2ใบความรู้ที่ 2.15 ฟอร์ม-2
ใบความรู้ที่ 2.15 ฟอร์ม-2Samorn Tara
 
Latihan chapter 3 modul-pratikum pbo fix-pages
Latihan chapter 3   modul-pratikum pbo fix-pagesLatihan chapter 3   modul-pratikum pbo fix-pages
Latihan chapter 3 modul-pratikum pbo fix-pagesYUSRA FERNANDO
 

Was ist angesagt? (10)

Strain Letter for Kyle
Strain Letter for KyleStrain Letter for Kyle
Strain Letter for Kyle
 
Somkait
SomkaitSomkait
Somkait
 
PRESENTACIÓ CURS 2010-2011
PRESENTACIÓ CURS 2010-2011PRESENTACIÓ CURS 2010-2011
PRESENTACIÓ CURS 2010-2011
 
Criacao Aula14
Criacao Aula14Criacao Aula14
Criacao Aula14
 
Portfolio
PortfolioPortfolio
Portfolio
 
自動テストデザインパターン@XP祭り2006
自動テストデザインパターン@XP祭り2006自動テストデザインパターン@XP祭り2006
自動テストデザインパターン@XP祭り2006
 
มุมมองชิ้นงาน
มุมมองชิ้นงานมุมมองชิ้นงาน
มุมมองชิ้นงาน
 
Understanding Cause & Effect in Customer Behaviour
Understanding Cause & Effect in Customer BehaviourUnderstanding Cause & Effect in Customer Behaviour
Understanding Cause & Effect in Customer Behaviour
 
ใบความรู้ที่ 2.15 ฟอร์ม-2
ใบความรู้ที่ 2.15 ฟอร์ม-2ใบความรู้ที่ 2.15 ฟอร์ม-2
ใบความรู้ที่ 2.15 ฟอร์ม-2
 
Latihan chapter 3 modul-pratikum pbo fix-pages
Latihan chapter 3   modul-pratikum pbo fix-pagesLatihan chapter 3   modul-pratikum pbo fix-pages
Latihan chapter 3 modul-pratikum pbo fix-pages
 

Ähnlich wie App과 Server의 은밀한 대화

Programming Contest Hacks
Programming Contest HacksProgramming Contest Hacks
Programming Contest HacksKosei Moriyama
 
2018 jPrime Deconstructing and Evolving REST Security
2018 jPrime Deconstructing and Evolving REST Security2018 jPrime Deconstructing and Evolving REST Security
2018 jPrime Deconstructing and Evolving REST SecurityDavid Blevins
 
Go Web Development
Go Web DevelopmentGo Web Development
Go Web DevelopmentCheng-Yi Yu
 
スマートフォンサイトの作成術 - 大川洋一
スマートフォンサイトの作成術 - 大川洋一スマートフォンサイトの作成術 - 大川洋一
スマートフォンサイトの作成術 - 大川洋一okyawa
 
초기 스타트업의 AWS - 김지훈(투어라이브) :: AWS Community Day Online 2020
초기 스타트업의 AWS - 김지훈(투어라이브) :: AWS Community Day Online 2020초기 스타트업의 AWS - 김지훈(투어라이브) :: AWS Community Day Online 2020
초기 스타트업의 AWS - 김지훈(투어라이브) :: AWS Community Day Online 2020AWSKRUG - AWS한국사용자모임
 
2018 Denver JUG Deconstructing and Evolving REST Security
2018 Denver JUG Deconstructing and Evolving REST Security2018 Denver JUG Deconstructing and Evolving REST Security
2018 Denver JUG Deconstructing and Evolving REST SecurityDavid Blevins
 
OSGI workshop - Become A Certified Bundle Manager
OSGI workshop - Become A Certified Bundle ManagerOSGI workshop - Become A Certified Bundle Manager
OSGI workshop - Become A Certified Bundle ManagerSkills Matter
 
2018 Boulder JUG Deconstructing and Evolving REST Security
2018 Boulder JUG Deconstructing and Evolving REST Security2018 Boulder JUG Deconstructing and Evolving REST Security
2018 Boulder JUG Deconstructing and Evolving REST SecurityDavid Blevins
 
[CB16] Esoteric Web Application Vulnerabilities by Andrés Riancho
[CB16] Esoteric Web Application Vulnerabilities by Andrés Riancho[CB16] Esoteric Web Application Vulnerabilities by Andrés Riancho
[CB16] Esoteric Web Application Vulnerabilities by Andrés RianchoCODE BLUE
 
ニコニコ動画を検索可能にしてみよう
ニコニコ動画を検索可能にしてみようニコニコ動画を検索可能にしてみよう
ニコニコ動画を検索可能にしてみようgenta kaneyama
 
FI MUNI 2012 - iOS Basics
FI MUNI 2012 - iOS BasicsFI MUNI 2012 - iOS Basics
FI MUNI 2012 - iOS BasicsPetr Dvorak
 
There and Back Again, A Developer's Tale
There and Back Again, A Developer's TaleThere and Back Again, A Developer's Tale
There and Back Again, A Developer's TaleNeo4j
 
Medium TechTalk — iOS
Medium TechTalk — iOSMedium TechTalk — iOS
Medium TechTalk — iOSjimmyatmedium
 
PHP記帳網頁教材(第一頁是空白的)
PHP記帳網頁教材(第一頁是空白的)PHP記帳網頁教材(第一頁是空白的)
PHP記帳網頁教材(第一頁是空白的)TaiShunHuang
 
Why you should be using structured logs
Why you should be using structured logsWhy you should be using structured logs
Why you should be using structured logsStefan Krawczyk
 
MFF UK - Introduction to iOS
MFF UK - Introduction to iOSMFF UK - Introduction to iOS
MFF UK - Introduction to iOSPetr Dvorak
 
Inspec one tool to rule them all
Inspec one tool to rule them allInspec one tool to rule them all
Inspec one tool to rule them allKimball Johnson
 

Ähnlich wie App과 Server의 은밀한 대화 (20)

Tabledown
TabledownTabledown
Tabledown
 
Programming Contest Hacks
Programming Contest HacksProgramming Contest Hacks
Programming Contest Hacks
 
2018 jPrime Deconstructing and Evolving REST Security
2018 jPrime Deconstructing and Evolving REST Security2018 jPrime Deconstructing and Evolving REST Security
2018 jPrime Deconstructing and Evolving REST Security
 
Go Web Development
Go Web DevelopmentGo Web Development
Go Web Development
 
スマートフォンサイトの作成術 - 大川洋一
スマートフォンサイトの作成術 - 大川洋一スマートフォンサイトの作成術 - 大川洋一
スマートフォンサイトの作成術 - 大川洋一
 
Scim overview
Scim overviewScim overview
Scim overview
 
초기 스타트업의 AWS - 김지훈(투어라이브) :: AWS Community Day Online 2020
초기 스타트업의 AWS - 김지훈(투어라이브) :: AWS Community Day Online 2020초기 스타트업의 AWS - 김지훈(투어라이브) :: AWS Community Day Online 2020
초기 스타트업의 AWS - 김지훈(투어라이브) :: AWS Community Day Online 2020
 
2018 Denver JUG Deconstructing and Evolving REST Security
2018 Denver JUG Deconstructing and Evolving REST Security2018 Denver JUG Deconstructing and Evolving REST Security
2018 Denver JUG Deconstructing and Evolving REST Security
 
OSGI workshop - Become A Certified Bundle Manager
OSGI workshop - Become A Certified Bundle ManagerOSGI workshop - Become A Certified Bundle Manager
OSGI workshop - Become A Certified Bundle Manager
 
2018 Boulder JUG Deconstructing and Evolving REST Security
2018 Boulder JUG Deconstructing and Evolving REST Security2018 Boulder JUG Deconstructing and Evolving REST Security
2018 Boulder JUG Deconstructing and Evolving REST Security
 
[CB16] Esoteric Web Application Vulnerabilities by Andrés Riancho
[CB16] Esoteric Web Application Vulnerabilities by Andrés Riancho[CB16] Esoteric Web Application Vulnerabilities by Andrés Riancho
[CB16] Esoteric Web Application Vulnerabilities by Andrés Riancho
 
ニコニコ動画を検索可能にしてみよう
ニコニコ動画を検索可能にしてみようニコニコ動画を検索可能にしてみよう
ニコニコ動画を検索可能にしてみよう
 
FI MUNI 2012 - iOS Basics
FI MUNI 2012 - iOS BasicsFI MUNI 2012 - iOS Basics
FI MUNI 2012 - iOS Basics
 
There and Back Again, A Developer's Tale
There and Back Again, A Developer's TaleThere and Back Again, A Developer's Tale
There and Back Again, A Developer's Tale
 
Medium TechTalk — iOS
Medium TechTalk — iOSMedium TechTalk — iOS
Medium TechTalk — iOS
 
PHP記帳網頁教材(第一頁是空白的)
PHP記帳網頁教材(第一頁是空白的)PHP記帳網頁教材(第一頁是空白的)
PHP記帳網頁教材(第一頁是空白的)
 
Why you should be using structured logs
Why you should be using structured logsWhy you should be using structured logs
Why you should be using structured logs
 
Selenium再入門
Selenium再入門Selenium再入門
Selenium再入門
 
MFF UK - Introduction to iOS
MFF UK - Introduction to iOSMFF UK - Introduction to iOS
MFF UK - Introduction to iOS
 
Inspec one tool to rule them all
Inspec one tool to rule them allInspec one tool to rule them all
Inspec one tool to rule them all
 

App과 Server의 은밀한 대화

  • 1. !? [App Server ] 2010. 7. 17 ( )
  • 2. ! • /( ) CTO • 2005~2010 : SK - / - ( , , , ) • contact : @cserock | http://rockk.egloos.com blueonion • : • 2010. 4 • 24 ( :3 ) • http://blueonionsoft.com blueonion
  • 4. ! • http://test.com/savePoint.php?id=2&point=450 • http://test.com/updateUserInfo.php?id=2&password=teertfdsa • http://test.com/getUserInfo.php?id=2 blueonion
  • 5. ; • endpoint : savePoint.php, updateUserInfo.php ! • data : id, point, password ! • Abusing ! savePoint.php id=3&point=500000 ? blueonion
  • 6. ,‘ ’ . • - App “ ” • . • - • - . blueonion
  • 8. AES-128 • CryptoHelper ( ) • CommonCrypto / Security framework • st(security token) • libmcrypt • php mcrypt function • st blueonion
  • 9. : // make parameter NSString *param = [[NSString stringWithFormat:@"id=2&point=450&nonce=%d", rand()] stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; // make st (key is ‘123456789abcdef’) NSString *st = [[CryptoHelper sharedInstance] encryptString:param]; // now lets create the body of the post NSMutableData *body = [NSMutableData data]; [body appendData:[[NSString stringWithFormat:@"rn--%@rn",boundary] dataUsingEncoding:NSUTF8StringEncoding]]; [body appendData:[[NSString stringWithFormat:@"Content-Disposition: form-data; name="st"rnrn%@", st] dataUsingEncoding:NSUTF8StringEncoding]]; [body appendData:[[NSString stringWithFormat:@"rn--%@--rn",boundary] dataUsingEncoding:NSUTF8StringEncoding]]; [request setHTTPBody:body]; blueonion
  • 10. : <?php // base64 decode st $tmp_st = base64_decode($_POST[‘st’]); // decrypt st (key is ‘123456789abcdef’) $st = urldecode(trim(mcrypt_decrypt(MCRYPT_RIJNDAEL_128, ‘123456789abcdef’, $tmp_st, MCRYPT_MODE_ECB, mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_ECB), MCRYPT_RAND)))); // st is ‘id=2&point=450&nonce=12342234’ ?> blueonion
  • 11. HTTP_USER_AGENT => App • framework => => endpoint • st(security token) timestamp • blueonion

Hinweis der Redaktion