Disclaimer: the contents of this article are the result of countless hours of personal investigation combined with exhaustive trial and error. I have never contacted Flutter or Dart development team members, nor have I ever used Flutter or Dart as development tools. As such, although I’ve tried my best, I cannot absolutely guarantee that all… Continue reading Reverse engineering Flutter for Android
From Iran with love
This little exercise presents us with two files: Iran_improved.py and n_enc.txt, containing, respectively, !/usr/bin/env pythonimport gmpyfrom Crypto.Util.number import *from secret import x, y, flagassert gmpy.is_prime(y) ** 2017 + gmpy.is_prime(x+1) ** 2018 + ((x**2 – 1)**2 % (4*x*y – 1) + 2) ** 2019 == 60195114596394835600098365337904453203909290339267782926802235520490734165288304711128028876190843924300219790864545888256504310575296955360263869886190226526243383749017484657001118642072476645551729273766405076304063608204237662557210948948704023790697838835485847746743961966673034818112016467608381780836571628953643780985260335330971646113053292101856920976336683443432722599633895445894931616008611613374098397266979994918402938455905105740583869839521659968843917706442661974067161049185192814971652892568440545229326928534271192994370172110180253787978742523925806590626609471822068371239222313484290p = gmpy.next_prime(x**5 + y**5)q = gmpy.next_prime(x**2*y**3 + y**2*x**3)n = p*qenc… Continue reading From Iran with love
Made by baby
This challenge is composed of two files: a babymade.py, below and a flag.enc containing the encoded flag. The code shows that the flag is originally a PNG image, and it was encrypted using the encrypt function. To understand what this function does, start by assuming key is 0, and ignore the component in line 11.… Continue reading Made by baby
John-Bull
In this challenge, we are given a file with the following contents. def make_key(k): while True: r = getRandomInteger(k) << 2 p, q = r**2+r+1, r**2+3*r+1 if gmpy.is_prime(p) * gmpy.is_prime(q): break pubkey = r**6 + 5*r**5 + 10*r**4 + 13*r**3 + 10*r**2 + 5*r + 1 return pubkey def encrypt(m, pubkey): return pow(bytes_to_long(m), pubkey, pubkey)… Continue reading John-Bull
Syscalls, r2 and a Crackme
In this series, we have seen how to write simple assembly programs, how an operating system loads a program from a hard drive to memory, and how memory is structured and how it can be accessed. It is time to see how this knowledge can be put to good use by solving crackmes. A crackme… Continue reading Syscalls, r2 and a Crackme
Memory
In previous posts, we’ve seen briefly how a CPU works. In particular, we’ve seen how it fetches instructions from some storage medium and executes them, and we wrote a very simple assembly program to confirm that, by the end of the day, the computer stores only certain predefined encodings of our program instructions. What we… Continue reading Memory
The CPU
CPU Basics The CPU (Central Processing Unit) is the component responsible for executing instructions in a computer. It works in cycles, and in every such cycle it fetches one instruction from some storage medium and executes it. Naturally, every instruction is drawn from a list of possible instructions, predefined by the CPU’s manufacturer. This list… Continue reading The CPU
Encodings
In the previous post, we took a look at why it’s all about 0’s and 1’s in computers, and we saw how to translate from 0’s and 1’s to more manageable, if not familiar, notations. It’s time to understand how exactly we build complex programs and images and sounds out of 0’s and 1’s alone. Let’s… Continue reading Encodings
Binary and Hexadecimal
Since well into prehistoric times we have had the need to use, discuss and manipulate numbers. They can and are used every day for counting, measuring and comparing, and important life decisions are frequently made based on numbers alone. They are so entrenched in our society that we rarely stop to think about them. In… Continue reading Binary and Hexadecimal
Etherant
The EVM (Ethereum Virtual Machine) is a virtual machine designed specifically for the execution of smart contracts in the Ethereum blockchain. It is the brain, muscle and soul of the Ethereum blockchain, and the main reason why Ether is a leading cryptocurrency. Its design is rather simple, yet effective, has been implemented in various programming… Continue reading Etherant