Skip to main content

My use cases for CyberChef

Formatting MAC addresses

Cisco seems to require a different format for every solution they have. I use this almost daily, so change the format of one or multiple MAC addresses.

Input: aa-aa-aa-bb-bb-bb

Output:

aaaaaabbbbbb
AAAAAABBBBBB
aa-aa-aa-bb-bb-bb
AA-AA-AA-BB-BB-BB
aa:aa:aa:bb:bb:bb
AA:AA:AA:BB:BB:BB
aaaa.aabb.bbbb
AAAA.AABB.BBBB

Try it yourself

Tipp: the easiest way to change the format of multiple formats, is to choose the desired format, input 1 MAC address per line, and remove the empty lines with a Find/ Replace operation with the following regex search ^(?:[\t ]*(?:\r?\n|\r))+. For more information, visit this post.

Looking up Linux permissions

Simple way to switch between various representations and shows the permissions.

Input: -rw-r--r--

Output:

Textual representation: -rw-r--r--
Octal representation:   0644
File type: Regular file

 +---------+-------+-------+-------+
 |         | User  | Group | Other |
 +---------+-------+-------+-------+
 |    Read |   X   |   X   |   X   |
 +---------+-------+-------+-------+
 |   Write |   X   |       |       |
 +---------+-------+-------+-------+
 | Execute |       |       |       |
 +---------+-------+-------+-------+

Try it yourself

Working with IT subnets

This function makes my life easier. It shows me the general network information and the range of a IP addresses for a subnet.

Input:

10.121.10.8/28

Output:

Network: 10.121.10.8
CIDR: 28
Mask: 255.255.255.240
Range: 10.121.10.0 - 10.121.10.15
Total addresses in range: 16

10.121.10.0
10.121.10.1
10.121.10.2
10.121.10.3
10.121.10.4
[...]

Try it yourself

Converting blog titles to an URL-friendly format

I've created a small 'Recipe' to format my titles to URL/ text file friendly formats.

Input:

My use cases for CyberChef

Output:

my-use-cases-for-cyberchef

Try it yourself

Finding the difference in text

I only use this function for small configuration files or texts. For larger ones, I prefer vimdiff or Notepad++.

Try it yourself

Changing chars to upper/lower case

I rarely use this function, but it has its use cases. Some passwords contain many characters, that can be difficult to differentiate, like l, I, 1, O,0, and so on. I tend to use this feature if I only have 1 more try left, just to make sure.

And I know that copy+paste exists, but that isn't always an option.

Try it yourself

Adding or remove line numbers

This is self-explanatory. I do not need this feature that often, but comes in handy from time to time.

Hashing things

If you need a hash of a string or file, CyberChef offers many algorithms. SHA, MD, bcrypt, and so on.

Try it yourself

Generating QR codes

I use it monthly to generate the QR code for our guest WLAN. Add WIFI:S:MySSID;T:WPA;P:TH1S_P455W0RD;; into the input field and it generates the QR code for you. I regularly use it for URLs too.

Try it yourself

Generating dummy texts / Lorem Ipsum

Really helpful to generate dummy text for all kinds of mock-ups.

Try it yourself

Various utilities

I won't go into too much detail since it is fairly self-explanatory. Sorting lines, convert masses or distances, remove white spaces, Find/Replace, find unique strings, converting hexdumps, converting date/time formats, and so many more.

Conclusion

CyberChef has become a great tool with many use cases. It is more the quick and dirty solution, but this is often all I need.

The source code can be found here.





E-Mail hellofoo@ittafoovern.comcom
Fediverse @itt@fosstodon.org
Twitter ITTavernCom
Matrix #lounge:matrix.ittavern.com

More reading: