[OPSXCQ]

A personal blog about my things [GITHUB] [TWITTER] [KEYBASE] [RSS]

Recent Posts

Abusing insecure docker deployments

published on
Is possible to abuse and escape from containers in several scenarios, in this post I will explore the most basic one: abusing the docker socket to escape the container and run code as root in the host machine. Table of Contents Lab setup Attack Information gathering Getting access Escalating privileges Lab setup Since we will be using containers, you have to install docker to be able to run this lab. Read More...

Bitcoin address generation in pure python

published on
Bitcoin address generation can be split in 4 steps listed bellow: Generating a secure private key. Calculate the public key from the private key. Encode the public key as a bitcoin address. Encode the private key in the WIF format. Step 1: Generate ECDSA Keypair The very first step is to select a good and secure number, for this example we won’t use one, instead we will simply get the random from the system. Read More...

Artificial Intelligence

published on
What is Artificial Intelligence ? This is a hard question to ask, because not even among the experts there is a complete agreement about what defines something as a real artificial intelligence. So it can be split between acting and “thinking”, and again between humanly and rationally. Before you state that humans are rational, please look carefully to this GIF So the combination of those aspects generate this four approaches generates: Read More...

Linear Regression

published on
Regression analysis and its relation with Machine Learning Machine learning is the field of study that explores the construction of algorithms that learn from data and can make predictions about it. It is a field of artificial intelligence that uses statistical methods to give those predictions. And it’s name comes from the ability that it gives to computer systems to learn from data, without being explicitly programmed. Machine learning by itself sometimes isn’t the best answer, but it can be combined with specialist agents to expand it’s capabilities and reduce the training time. Read More...

Mining monero using live a live usb linuxkit build

published on
Linuxkit is a good tool to create immutable Linux systems, so why don’t use it to build a Monero mining live distro ? The only thing needed to build an Linux with Linuxkit is a yml file containing the system information. It can be divided in 5 main sections: kernel init onboot - applications that will run when the Linux boot (after init) services - services that will run on this system files - any extra files that you need to copy into your iso (like keys or configs) Based on these principles, bellow is the configuration of a miner that will boot and start mining rigth away. Read More...

Running Cron tasks on docker - The correct way

published on
While is perfectly possible to use cron inside a container, I strongly advise you to don’t do it. Some of the most important points on why is a bad practice to run cron inside a container: Your tasks need to be ephemeral as your containers We live in the immutable infrastructure era, there is no need to worry about cleaning up everything before or after your tasks run. Make your scheduled tasks ephemeral as your containers, if something goes wrong, you can inspect the precise state that the container was left. Read More...

Bitcoin transaction nonce reuse vulnerability

published on
This post aims to analyse an attack against the Bitcoin, in this attack were Found 123 vulnerable transactions and 416 private keys were recovered summing up 26.85729198 btcs (2685729198 satoshis) could have been compromised, which at this exact moment worth 166,219.51 dollars. Cryptographic concept of the attack When the nonce is reused it become vulnerable and result in a trivial equation to be solved. $$ Key=((r \times (s_1 - s_2))^{p - 2} \mod{p}) \times ((m_1 \times s_2) - (m_2 \times s_1)) \mod{p} $$ Read More...

Linear Programming

published on
Linear programming is a mathematical method to achieve the best result for a given problem. This problem is expressed through a mathematical model which represents the real world problem. Also called linear optimization because of it’s essence to optimize a linear objective function. In other words, linear programming aim to find the optimal input value for the function, value which will also be the optimal solution for the problem. Usually linear optimization is a good method to solve assignment problems which are a fundamental kind of combinatorial optimization problems. Read More...

How to disable page table isolation on debian

After meltdown, spectre and other similar bugs were discoreved and patched the overall performance on Linux decreased. Here a detailed benchmark about the impact of these fixes on Redis performance. Something between 15% and 6% slower than the same machine without the fixes. Check your linux To check if the fixes are enabled run the command bellow: grep CONFIG_PAGE_TABLE_ISOLATION=y /boot/config-`uname -r` && echo "enabled" || echo "disabled" grep -q "cpu_insecure\|cpu_meltdown\|kaiser" /proc/cpuinfo && echo "enabled" || echo "disabled" sudo dmesg | grep -q "Kernel/User page tables isolation: enabled" && echo "enabled" || echo "disabled" You can also check your system using this exploit. Read More...

Tags

artificial-intelligence (2) attack (1) bitcoin (2) blockchain (1) cryptocurrency (1) cryptography (3) debian (1) devops (2) docker (2) eliptic-curves (1) linux (1) machine-learning (1) math (3) mining (1) monero (1) pentest (1) python (2) security (1)