• Guest
HabraHabr
  • Main
  • Users

  • Development
    • Programming
    • Information Security
    • Website development
    • JavaScript
    • Game development
    • Open source
    • Developed for Android
    • Machine learning
    • Abnormal programming
    • Java
    • Python
    • Development of mobile applications
    • Analysis and design of systems
    • .NET
    • Mathematics
    • Algorithms
    • C#
    • System Programming
    • C++
    • C
    • Go
    • PHP
    • Reverse engineering
    • Assembler
    • Development under Linux
    • Big Data
    • Rust
    • Cryptography
    • Entertaining problems
    • Testing of IT systems
    • Testing Web Services
    • HTML
    • Programming microcontrollers
    • API
    • High performance
    • Developed for iOS
    • CSS
    • Industrial Programming
    • Development under Windows
    • Image processing
    • Compilers
    • FPGA
    • Professional literature
    • OpenStreetMap
    • Google Chrome
    • Data Mining
    • PostgreSQL
    • Development of robotics
    • Visualization of data
    • Angular
    • ReactJS
    • Search technologies
    • Debugging
    • Test mobile applications
    • Browsers
    • Designing and refactoring
    • IT Standards
    • Solidity
    • Node.JS
    • Git
    • LaTeX
    • SQL
    • Haskell
    • Unreal Engine
    • Unity3D
    • Development for the Internet of things
    • Functional Programming
    • Amazon Web Services
    • Google Cloud Platform
    • Development under AR and VR
    • Assembly systems
    • Version control systems
    • Kotlin
    • R
    • CAD/CAM
    • Customer Optimization
    • Development of communication systems
    • Microsoft Azure
    • Perfect code
    • Atlassian
    • Visual Studio
    • NoSQL
    • Yii
    • Mono и Moonlight
    • Parallel Programming
    • Asterisk
    • Yandex API
    • WordPress
    • Sports programming
    • Lua
    • Microsoft SQL Server
    • Payment systems
    • TypeScript
    • Scala
    • Google API
    • Development of data transmission systems
    • XML
    • Regular expressions
    • Development under Tizen
    • Swift
    • MySQL
    • Geoinformation services
    • Global Positioning Systems
    • Qt
    • Dart
    • Django
    • Development for Office 365
    • Erlang/OTP
    • GPGPU
    • Eclipse
    • Maps API
    • Testing games
    • Browser Extensions
    • 1C-Bitrix
    • Development under e-commerce
    • Xamarin
    • Xcode
    • Development under Windows Phone
    • Semantics
    • CMS
    • VueJS
    • GitHub
    • Open data
    • Sphinx
    • Ruby on Rails
    • Ruby
    • Symfony
    • Drupal
    • Messaging Systems
    • CTF
    • SaaS / S+S
    • SharePoint
    • jQuery
    • Puppet
    • Firefox
    • Elm
    • MODX
    • Billing systems
    • Graphical shells
    • Kodobred
    • MongoDB
    • SCADA
    • Hadoop
    • Gradle
    • Clojure
    • F#
    • CoffeeScript
    • Matlab
    • Phalcon
    • Development under Sailfish OS
    • Magento
    • Elixir/Phoenix
    • Microsoft Edge
    • Layout of letters
    • Development for OS X
    • Forth
    • Smalltalk
    • Julia
    • Laravel
    • WebGL
    • Meteor.JS
    • Firebird/Interbase
    • SQLite
    • D
    • Mesh-networks
    • I2P
    • Derby.js
    • Emacs
    • Development under Bada
    • Mercurial
    • UML Design
    • Objective C
    • Fortran
    • Cocoa
    • Cobol
    • Apache Flex
    • Action Script
    • Joomla
    • IIS
    • Twitter API
    • Vkontakte API
    • Facebook API
    • Microsoft Access
    • PDF
    • Prolog
    • GTK+
    • LabVIEW
    • Brainfuck
    • Cubrid
    • Canvas
    • Doctrine ORM
    • Google App Engine
    • Twisted
    • XSLT
    • TDD
    • Small Basic
    • Kohana
    • Development for Java ME
    • LiveStreet
    • MooTools
    • Adobe Flash
    • GreaseMonkey
    • INFOLUST
    • Groovy & Grails
    • Lisp
    • Delphi
    • Zend Framework
    • ExtJS / Sencha Library
    • Internet Explorer
    • CodeIgniter
    • Silverlight
    • Google Web Toolkit
    • CakePHP
    • Safari
    • Opera
    • Microformats
    • Ajax
    • VIM
  • Administration
    • System administration
    • IT Infrastructure
    • *nix
    • Network technologies
    • DevOps
    • Server Administration
    • Cloud computing
    • Configuring Linux
    • Wireless technologies
    • Virtualization
    • Hosting
    • Data storage
    • Decentralized networks
    • Database Administration
    • Data Warehousing
    • Communication standards
    • PowerShell
    • Backup
    • Cisco
    • Nginx
    • Antivirus protection
    • DNS
    • Server Optimization
    • Data recovery
    • Apache
    • Spam and antispam
    • Data Compression
    • SAN
    • IPv6
    • Fidonet
    • IPTV
    • Shells
    • Administering domain names
  • Design
    • Interfaces
    • Web design
    • Working with sound
    • Usability
    • Graphic design
    • Design Games
    • Mobile App Design
    • Working with 3D-graphics
    • Typography
    • Working with video
    • Work with vector graphics
    • Accessibility
    • Prototyping
    • CGI (graphics)
    • Computer Animation
    • Working with icons
  • Control
    • Careers in the IT industry
    • Project management
    • Development Management
    • Personnel Management
    • Product Management
    • Start-up development
    • Managing the community
    • Service Desk
    • GTD
    • IT Terminology
    • Agile
    • Business Models
    • Legislation and IT-business
    • Sales management
    • CRM-systems
    • Product localization
    • ECM / EDS
    • Freelance
    • Venture investments
    • ERP-systems
    • Help Desk Software
    • Media management
    • Patenting
    • E-commerce management
    • Creative Commons
  • Marketing
    • Conferences
    • Promotion of games
    • Internet Marketing
    • Search Engine Optimization
    • Web Analytics
    • Monetize Web services
    • Content marketing
    • Monetization of IT systems
    • Monetize mobile apps
    • Mobile App Analytics
    • Growth Hacking
    • Branding
    • Monetize Games
    • Display ads
    • Contextual advertising
    • Increase Conversion Rate
  • Sundry
    • Reading room
    • Educational process in IT
    • Research and forecasts in IT
    • Finance in IT
    • Hakatonas
    • IT emigration
    • Education abroad
    • Lumber room
    • I'm on my way

Puzzle "Test My Patience" by Check Point Security Academy

I mentioned the program on Habré several times. Check Point Security Academy : its essence is that the company Check Point in the summer, announced a competition in the Capture the Flag format, where the participant’s past experience is not important, but only his ability to unravel cyber puzzles is important. According to the results of this competition, the company recruited twenty participants for a three-month professional course on cyber security, and all participants from the very beginning of the course receive a full salary of a specialist in KB, under the obligation to work in the company two years after the end of the course.
 
 
Puzzle "Test My Patience" by Check Point Security Academy  
In a CTF competition, the flag may even be a picture, for example.
 
 
The selection of participants was completed in August, but the competition site will continue to operate until next summer, and I invite those who wish to register and try their hand for the sake of sports interest. The competition consists of 12 puzzles of varying difficulty, rated from 10 to 150 points.
 
Here I want to make out the “Test My Patience” puzzle from the “Surprise” category. She is of medium difficulty (50 points), and here is her full text:
 
Hi there,
 
We found This executable on the local watchmaker's computer.
 
It is a rumored person.
 
What is your watchmaker?
 
Note: This file is not malicious in any way 3r3338. The link is a 32-bit binary for Windows, which is some antiviruses swear. , but if you still run it, it looks like this:
 
 
 
 
Inside the binary is encrypted; it refuses to run under the debugger; if you try to connect a debugger to it that is running, it ends instantly. Probably, experts from Check Point wrapped their puzzle in a crypto-packer, borrowed from some Malvari.
 
How can we guess the number, thought of by a watchmaker?
 
 
There are two ways. The first one can conditionally be called “the power is, the mind is not necessary”: if the program cannot be debugged live, then we will debug the dead!
 
Start the 32-bit Task Manager (WindowsSysWOW64taskmgr.exe), right-click on the mysterious process, and select Create dump file. (The 64-bit Task Manager for 32-bit processes creates a wow64cpu emulator dump, which is more difficult to work with.) 3r-3225.  
We look at the dump and see that at least the lines in it are already decoded:
 
 
3r366.
 
 
But the lines with neither the number nor the flag is not visible yet.
 
We turn to the main caliber gun: WinDbg (X86) -> Open Crash Dump
 
 
 
 
Where in memory is the line that we want to see printed - “Good job my friend!”?
 
Team 3r3r6206. lm 3r3207. allows you to determine that the binary is loaded from 3r3206. 01140000 up to 3r3206. 015b2000 ; then s-a ???b2000 "Good job my friend!" finds the required string at 0115a0d0 :
 
 
3r3398.
 
 
Let's now find out where this line is printed: maybe some command contains bytes d0 a??? corresponding to the address of the search string? ( S-b ???b2000 d0 a??? )
 
Luck! - such a team was found:
 
 
3r3113.
 
 
What is the code around this command? ( Ub 011412f7; u 011412f7 ) 3r33225.  
 
3r3124.
 
 
We see that, depending on the result of the function 3r3206. 01141180 either the message you are looking for is printed, or “Wrong one ” 3r33232.  
Function code 3r3206. 01141180 occupies three screens; it's pretty easy to understand that this is an implementation of 3r3r6206. strcmp () In which call 3r3206 is added. Sleep (700) 3r3207. . It is not yet clear why there is 3r3206. Sleep () ; but it still does not affect the result of the function, so it’s better to figure out what the lines are compared:
 
 
3r3145.
 
 
Two pointers are passed, equal to ebp-14h and 3r3r6206. ebp-24h ; the second of them was passed to the function in the function before that. 011410b0 .
 
Is this the function that requests the hidden number? Check by call stack (3r3206. K ):
 
 
3r3164.
 
 
Yes, it is she!
 
The overall scheme of the puzzle is now clear: the user's guess is saved at ebp-24h , the hidden number - at 3r3r6206. ebp-14h , then they are compared and printed with either “Good job my friend!” or “Wrong one ”
 
All that remains is to pull the hidden number out of the stack frame. Its ebp we are already known from the call stack:
 
 
3r3183.
 
 
Well, well
 
 
3r3192.
 
 
Success! You can uncork something tasty.
 
 
But three mysterious things remained without explanation:

  1.  
  2. Why inside the local 3r3r6206. strcmp () call 3r3206. Sleep (700) 3r3207. ?
     
    Why, when we entered the hidden number, did the program hang up for a dozen seconds before typing “Good job my friend!”?
     
    What does the watchmaker have to do with this whole puzzle?
     
     
    So, it turns out that there is a second - more intellectual - way to guess the conceived number. If you just try randomly the numbers 0-? then it is easy to notice that on the nine, the program slightly freezes. If you try the numbers 90-9? then you can see that at the number 98 the program “freezes” twice as long. (By picking up her offal, we already understand what's the matter: a successful comparison of each pair of characters causes a delay of 0.7s.) To solve the puzzle, even without launching the debugger, it was enough to select each next digit so that the delay before the response increased - either manually with an exact stopwatch, or an uncomplicated script. So the compilers hinted at
    A long-time attack on cryptographic algorithms 3r3220. when the time until the error message is measured and analyzed.
     
     
    But learning how to unzip programs wrapped in unknown crypto-packers is, in my opinion, both more interesting and more valuable :-)
     
    Notice that we didn’t have to figure out how the binary is encrypted, nor how a line appears with a hidden number in the stack (we saw in the dump that it’s not among the string constants) - we managed to get both about a dozen WinDbg commands were enough.
    ! function (e) {function t (t, n) {if (! (n in e)) {for (var r, a = e.document, i = a.scripts, o = i.length; o-- ;) if (-1! == i[o].src.indexOf (t)) {r = i[o]; break} if (! r) {r = a.createElement ("script"), r.type = "text /jаvascript", r.async =! ? r.defer =! ? r.src = t, r.charset = "UTF-8"; var d = function () {var e = a.getElementsByTagName ("script")[0]; e.parentNode.insertBefore (r, e)}; "[object Opera]" == e.opera? a.addEventListener? a.addEventListener ("DOMContentLoaded", d,! 1): e.attachEvent ("onload", d ): d ()}}} t ("//mediator.mail.ru/script/2820404/"""_mediator") () (); 3r33232.

It may be interesting

  • Comments
  • About article
  • Similar news
This publication has no comments.

weber

Author

19-11-2018, 01:30

Publication Date

Information Security / Debugging

Category
  • Comments: 0
  • Views: 305
How to pass a cyber test on "Checkpoint"
Competition on programming: Trade
Competition on programming: Trade
Poll from Veeam Academy. Do you want to
Summer School Intel 0x7E2 - there is
MEPhI invites to the Olympiad on
Write a comment
Name:*
E-Mail:


Comments
The GW1NRF Bluetooth FPGA is the first uSoC FPGA to offer a built in Bluetooth transceiver to wirelessly communicate data with 32-Bit Microprocessor. Check Out: Gowin Semiconductor


Miro Paris vous propose une large gamme d'accessoire de beauté, maquillage, skincare, kbeauty, crèmes en provenance de Corée du sud, Japon, et Hong Kong. Check Out: Cosmétiques Asiatiques
Yesterday, 21:22

noorseo

LIMITED EDITION Experience Virtual Reality Now! Version 2.0 Discount40% OFF See More15% OFFFASHION & ACCESSORIESApparel Fashion Price starting from$5.99 See More20% OFFLIVEBYCARE Combo 5x Pillows Color Discount20% OFF Shop Now Bluetooth Latest Speakers Price starting from$22.99 XBOX CONTROLLER WHITE COLOR Discount 10% SMART APPLE PRODUCTS 15% OFF12% LISTEN TO REAL MUSIC WITH BEATSHealth & Fitness

Yesterday, 17:42

raymond weber

PERFECT size dumpster rentals for your residential needs, they are the ideal fit for your driveway. EASY simple pricing so you have everything upfront. FAST dumpster delivery. Check out: Austin Dumpster Rental
Yesterday, 17:03

saifwordpress

This article was written by a real thinking writer. I agree many of the with the solid points made by the writer. I'll be back. official 123movies websites
Yesterday, 17:00

Legend SEO

LIMITED EDITION Experience Virtual Reality Now! Version 2.0 Discount40% OFF See More15% OFFFASHION & ACCESSORIESApparel Fashion Price starting from $ 5.99 See More20% OFFLIVEBYCARE Combo 5x Pillows Color Discount20% OFF Shop Now Bluetooth Latest Speakers Price starting from $ 22.99 XBOX CONTROLLER WHITE COLOR Discount 10% SMART APPLE PRODUCTS 15% OFF12% LISTEN TO REAL MUSIC WITH BEATS [url = https: //topofferscart.online/] Health & Fitness [/ url]

Yesterday, 15:57

nushra45

Adv
Website for web developers. New scripts, best ideas, programming tips. How to write a script for you here, we have a lot of information about various programming languages. You are a webmaster or a beginner programmer, it does not matter, useful articles will help to make your favorite business faster.

Login

Registration Forgot password