XeusNguyen
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # Image Editing - CTFLearn (Crypto/Hard) ###### tags: `ctf` `forensic` **Description** I sent a couple of images to my friend, Leslie S. Brown, to edit. The only problem is that she only sent back 1 image! Can you help me figure out what happened to the other image? Also, for whatever reason, the image has a red tinge to it. Image: https://mega.nz/#!nGg2DIxA!zL1BLCoPpRB6KPTBrDqHWXyphBn-SRl1qs_kpcyIS4k ## Step 1: Analysis **Hello, i am back for cool WU and it cost my noron too much but it so easy :smiling_face_with_smiling_eyes_and_hand_covering_mouth: if i caution for each of step i do on that :sweat_smile:** - So what i do, read a description firstly and yeah onething i have to doubt which is refer on last of sentence on description **-red tingle-** :thinking_face: but ignore at that time we need download image and look it has relate between image and description that i what target author want :i_love_you_hand_sign: - Download and the image like this: ![](https://i.imgur.com/cknry6v.jpg) cute dog huh :elephant: - And one again the description don't relate anything with description but it on float of file so we need to go next step to check deeping on that image ## Step 2: Exploit - So i have somekind tool u need to know about solve that: - [**file**](https://www.geeksforgeeks.org/file-command-in-linux-with-examples/) : it not a tool but ever linux or windows contain that using this for check the file properties - [**zsteg**](https://github.com/zed-0xff/zsteg): tool for analysis the image base on byte, algorithm (LSB/MSB), Color(R/G/B), Postion (xy) and any kind text or file on that **using that to know more information :smiley:** - [**stegsolve**](https://github.com/zardus/ctf-tools/blob/master/stegsolve/install): tool for exploit image - [**binwalk**](https://github.com/ReFirmLabs/binwalk): tool for exploit image - [**exiftool**](https://exiftool.org/): meta data analysis - So that all arsenal we need to prepare and check image with that tool, let first with file and it just return `final.png: PNG image data, 1546 x 1213, 8-bit/color RGB, non-interlaced` and you know that have some helpful info from image like it png img and resolution blah ... - So reach binwalk, i usually check that image with that tool after file, because **it analysis image on the byte and let me know if the image contain anything kind like compressdata or textfile, another images** but after i use this it just return some kind zlib ![](https://i.imgur.com/iRoKb8H.png) - so with that infomation if it useful u can using `binwalk -e <FILE>` command to extract/uncompress data from image so binwalk can do with another file not just image so try first :smiley: - So after i extract the data from img i receive zlib file have name 29.zlib ![](https://i.imgur.com/ehl0E0i.png) and yup it just all try open that with another hexeditor on linux like hexeditor or windows u can try HxD an it not useful on that :sweat_smile:, so i try to extract zlib because if i lucky i can exploit somekind on that - [**Method to extract the zlib**](https://unix.stackexchange.com/questions/22834/how-to-uncompress-zlib-data-in-unix#comment67353_22837) so i try this command `zlib-flate -uncompress < IN_FILE > OUT_FILE` so if u want to do this command, u need download qpdf package => bum it not useful :smile: the output of file zlib is not have somekind strange to exploit - *Forensic is way to reach target but not going wrong way* :sweat_smile:, u need turn back right now and read the description again **-red tingle-**. And calmdown reach to exiftool, stegsolve and zsteg to continuing exploit - So using exiftool with image and return not useful ![](https://i.imgur.com/caaMGMY.png) - Reach zsteg try that (it have some kind refer description **-red tingle-** ) so run zsteg u need ruby module find method on internet and try that ![](https://i.imgur.com/73sDvPB.png) the first time i just ignore info is importance on zsteg is ***file png 161x29 file with method b1,r,lsb,xy*** :smirk: so i pass that so it cost my time too much but 2 minute i just focus zsteg and yup i see that basic kind like this and to knowing that we reach stegsolve :small_airplane: and go to true fact ## Step 3: Reach True Fact :face_with_finger_covering_closed_lips: - Open stegsolve it need java to run that, install that and enjoy ![](https://i.imgur.com/pHjArun.jpg) - Reach to analyse tab and choose the Data Extract ![](https://i.imgur.com/KOouN0T.png) - Choose the what option we need by basing on zsteg return on that image **b1,r,lsb,xy** (b1 for the byte, r is red color, lsb algorithm, xy position of image we can receive) and yeah just choose that option on the tab extract![](https://i.imgur.com/bOKbVzY.png) - So what should we do next save that with png because look on the text of the hex file and PNG is the firsthing we see and yup we got the image![](https://i.imgur.com/PfQyRjr.png) - But what we do next, you can see the some kind strange on upper of text on the image and that is target we need it will be flag we need to file so we can get that if we don't know how to extract that using the zsteg again :face_with_hand_over_mouth: and you will exploit that image![](https://i.imgur.com/RBiKnaI.png) ah hah we get that the text is flag: `1_kn3W_tH3_r3D_w4s_0ff ` wrapthis with CTFlearn{} and you get the flag - But if you want harder you just try the Data Extract option on stegsolve if will be cost you some time to reach that LOL ### Flag: CTFlearn{1_kn3W_tH3_r3D_w4s_0ff} ### So look that cool stuff on that challenge, i think so kind on that will be helpful for you and yeah for me :smiley:. Happy hacking and i will be back soon on the next Challenge or WU :see_no_evil:

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully