Yuri Slobodyanyuk Blog on Information Security 2024年09月12日
HIEW Hex editor tutorials series , part 2 – the basics.
index_new5.html
../../../zaker_core/zaker_tpl_static/wap/tpl_guoji1.html

 

本文介绍了HIEW的基本命令及一个示例程序serial1.exe。包括改变颜色方案、退出窗口、进入编辑模式等命令,还提供了示例程序的相关信息,如编译后的二进制文件、病毒检测情况、源代码等。

💻HIEW的基本命令之一是改变颜色方案,可在hiew8.init的最后一节'Colors'中,将setColorMain设为0x07以获得黑色背景。

🚪ESC键用于在不保存更改的情况下退出任何窗口或模式。F1键提供上下文相关的帮助,F3键用于进入编辑模式。

🔍F7键可打开搜索窗口,Ctrl+Enter用于继续搜索。Alt+F1用于更改位置寻址模式,F9用于保存更改。

📄示例程序serial1.exe的相关信息,如编译后的二进制文件链接、病毒检测情况、SHA256哈希值及源代码等。

Round up of the basic HIEW commands used:

CommandAction
Change the color schemeedit hiew8.ini the last section "Colors", set ColorMain = 0x07 to have the black background.
ESCTo exit any window/mode without saving the changes.
F1Context-sensitive help.
F3Enter the Edit mode.
ENTERIn the read mode, switch between Hex/Decode/Text modes.
F7Open a search window
Ctrl + Entercontinue searching.
Alt + F1Change location addressing mode.
F9Save the changes.
F6In Decode/Disassembled mode, find cross-references.
*In Read mode, select block(s) of bytes.
F8Show the file header.
F8 -> F6 ->F3In Hex/Decode modes, show then edit file header sections.
Alt + F6Show all strings in a file.
+/-See above, increase/decrease minimal string lentgh.
F5Go to offset.
Alt + F7Change the search direction.

Sample "serial1.exe" program used in the tutorial:
Compiled binary "serial1.exe": https://blog-assets-public-all.s3.amazonaws.com/serial1.exe
NOTE: Today almost all OS will flag any executable you download as "malicious/harmful" etc. (and good they do so), so be warned. The virustotal rating of the file is quite good, just 7 detections of 72 :) https://www.virustotal.com/gui/file/b38128c26bc792989b23d70684498ea2612639c11047e2cd6c3a1114a9ad1e92/detection

Its SHA256 hash (use PowerShell command Get-FileHash "serial1.exe") to verify:B38128C26BC792989B23D70684498EA2612639C11047E2CD6C3A1114A9AD1E92

The source code (compiled in Microsoft Viual Studio 2015):

#include "stdafx.h"#include <stdio.h>#include <string.h>// this example and all the following will be posted on my site https://yurisk.infoint main(){        char serial_input[6] = "";        char serial_correct[6] = "23845";        int result = 0;                printf("Please enter the serial of 5 numbers:");        fgets(serial_input, 6, stdin);        result = strncmp(serial_input, serial_correct, 5);                if (result != 0)         {                printf("Wrong serial!, quitting ..\n");                return 1;        }        else { printf("Great, you have the correct serial !\n"); }    return 0;}

See also other posts in the series:
Part 1
Part 3
Part 4
Part 5
Part 6

Follow me on https://www.linkedin.com/in/yurislobodyanyuk/ not to miss what I publish on Linkedin, Github, blog, and more.

Fish AI Reader

Fish AI Reader

AI辅助创作,多种专业模板,深度分析,高质量内容生成。从观点提取到深度思考,FishAI为您提供全方位的创作支持。新版本引入自定义参数,让您的创作更加个性化和精准。

FishAI

FishAI

鱼阅,AI 时代的下一个智能信息助手,助你摆脱信息焦虑

联系邮箱 441953276@qq.com

相关标签

HIEW命令 serial1.exe 颜色方案 搜索功能
相关文章