CTF-Crypto must-have automatic decryption artifact python-Ciphey (detailed installation introduction)

Table of contents

I. INTRODUCTION

2. Introduction

3. Characteristics

4. Examples

Fifth, the comparison

Six, ciphey installation

1. Install pip3 (you don't need to install it if you have it)

2. Linux command installation

Install command on Linux:

Install command on Windows:

Import Ciphey

Seven, parameter list

Eight, run Ciphey

1. File input:

2. Non-standard methods:

3. Normal way

demo

Summarize

Cheers everyone ( •̀ ω •́ )y I look forward to seeing you again


foreword

       Do you usually hit ctf, once you encounter that kind of password question, you will have a headache { { {(>_<)}}}, and the most important thing is that you don't know, how many times he has set it. Second, how to set it up, in the case of no prompt, the operation is as fierce as a tiger, and the result is only a bunch of garbled characters.

       Today she came to CTF-Crypto must-have automatic decryption artifact-Ciphey

Introduction

Fully automatic decryption/decoding/cracking tool utilizing python environment using natural language processing and artificial intelligence and some common sense

Since the open source of the Ciphey algorithm, it has won 6.3k+ stars and was once on the Github hot list. Now in 2022, some password storage has already used irreversible encryption technology, such as Bcrypt encryption and so on.

But whenever you encounter some text that you don't know the encryption method and encoding format, you might as well try Ciphey first, maybe you can easily solve your troubles and break these traceable encryption and encoding algorithms.

Ciphey supports breaking 6 basic encryptions: 16 encodings:

There are other encryptions

characteristic

  • Supports 50 encryption methods  such as encoding (binary, base64) and conventional encryption (eg Caesar cipher, repeated key XOR, etc.)
  • Customized artificial intelligence (AuSearch) with enhanced search function decrypts in less than 3 seconds and can tell you exactly which encryption method is used
  • Ciphey , a custom natural language processing system  , can determine if something is plain text. Whether that plain text is JSON, CTF flags or English Ciphey, get it in milliseconds
  • Multi-language support  Currently, only German and English (with AU, UK, CAN, USA variants)
  • Although support for encryption and hashing
  • There is C++ at the core and other alternatives like CyberChef Magic do not. And this will make the whole process very fast mostly around 3 seconds usually no more than 5 seconds

Example

Compared

Name Cipey Cyberchef
dynamic picture
time 2 seconds 6 seconds

run the program

  • Just run ciphey on the encoded file
  • Set the regex parameter to "{"
  • You need to know how many times to recurse
  • You have to know it's always base64 encoded
  • You need to load CyberChef which is an online coding tool ((it's a bloated JS app))
  • Know enough about CyberChef to create a channel for each encoding
  • reverse match

 ciphey installation

Two absolute conditions must be met to install ciphey

  • The python version must be above 3.8
  • pip must be above    python3                                                                    


Install pip3 (if you have it, you don't need to install it)

wget https://bootstrap.pypa.io/pip/get-pip.py
python3 get-pip.py

 Linux command installation

Install command on Linux:

python3 -m pip install -U ciphey

Install command on Windows:

Just install it with pip

pip install ciphey  -i https://pypi.mirrors.ustc.edu.cn/simple/

Windows encoding error modification (modify the code according to the error, mainly when an error occurs when reading the file, change "r" to "rb", you can.)

UnicodeDecodeError: 'gbk' codec can't decode byte 0xbf

Import Ciphey

You can import Ciphey's main and use it in your own programs and code.

from Ciphey.__main__ import main

parameter list

(For a complete list of parameters, please run ciphey --help.) 

ciphey --help
用法: ciphey [选项] [TEXT_STDIN]

  Ciphey - 自动解密工具

  文档地址: https://github.com/Ciphey/Ciphey/wiki

  Discord (这里支持,我们大部分时间都在线):
  https://discord.ciphey.online/

  GitHub: https://github.com/ciphey/ciphey

 cipher是一种使用智能人工智能的自动解密工具
和自然语言处理。输入加密文本,获取解密文本


例如:
	基本用法: ciphey -t "aGVsbG8gbXkgbmFtZSBpcyBiZWU="

选项:
  -t, --text TEXT            您想要解密的密文。
  -q, --quiet                减少冗长的显示,直接给结果
  -g, --greppable            只输出答案(对于grep很有用)
  -v, --verbose
  -C, --checker TEXT         使用给定的检查器
  -c, --config TEXT          使用给定的配置文件。默认为
                             appdirs.user_config_dir('ciphey',
                             'ciphey')/'config.yml'

  -w, --wordlist TEXT        使用给定的密码字典
  -p, --param TEXT           将参数传递给语言检查器
  -l, --list-params BOOLEAN  列出所选模块的参数
  --searcher TEXT            选择要使用的搜索算法
  -b, --bytes                强制密码使用二进制模式作为输入
  --default-dist TEXT        设置默认的字符/字节分布
  -m, --module PATH          从给定路径添加模块
  -A, --appdirs              输出密码到想要的文件位置

  -f, --file FILENAME
  --help                     显示此帮助消息并退出。

Run Ciphey

There are three methods.

1. File input:

ciphey -f encrypted.txt  &
python -m ciphey -f encrypted.txt

2. Non-standard methods:

ciphey -- "Encrypted input"  &
python -m ciphey -- "Encrypted input"

3. Normal way

ciphey -t "Encrypted input"  &
python -m ciphey -t "Encrypted input"

demo

 Use Quiet Mode if you want to remove progress bars, probability tables and all noise.

quiet mode command

ciphey -t "encrypted text here" -q

Summarize

  • ciphey's function is very powerful, what I show is just the tip of his iceberg, he can even import the coding program you set by yourself, and the running speed is also extremely fast, so let's study slowly.
  • And if any master has better suggestions and ideas, you can also share with me

Cheers everyone ( •̀ ω •́ )y I look forward to seeing you again

Guess you like

Origin blog.csdn.net/m0_68012373/article/details/125516592