C vs Go cycles and simple math

 3r3152. 3r3-31. When I was tired of C programming, like many, I was interested in the Go language. It is strongly typed, compiled, therefore sufficiently productive. And then I wanted to find out how confused the Go creators were on optimizing the work with cycles and numbers.
 3r3152.
 3r3152. To begin with, we look at how things are with C.
 3r3152.
 3r3152. We write such a simple code:
 3r3152.
 3r3152.
#include
3r3152. #include
3r3152. 3r3152. int main ()
{
uint64_t i; 3r3152. uint64_t j = 0; 3r3152. for (i = 1?00?000; i> 0; i--)
{
j ^ = i; 3r3152.}
printf ("% lun", j); 3r3152. return 0; ...
+ 0 -

We solve the crackme from Kaspersky Lab

One day, different channels in Telegram started throwing link on crack poker from LC, 3r3-3101. Successfully completed the task will be invited for an interview! 3r3102. . After such a loud statement, I wondered how difficult the reverse would be. How I solved this task can be read under the cut (many pictures). 3r3202.  
3r3202.  
3r3202.  
When I got home, I carefully read the assignment again, downloaded the archive, and began to watch what was inside. And inside was this:
 
3r3202.  
We solve the crackme from Kaspersky Lab 3r3202.  
3r3202...
+ 0 -

Introduction to ptrace or code injection in sshd for fun

 3r3733. 3r3-31. Introduction to ptrace or code injection in sshd for fun  3r3733.
 3r3733. The goal I set was quite simple: find out the password entered into sshd using ptrace. Of course, this is a somewhat artificial task, as there are many other, more efficient ways to achieve the desired (and with a much lower probability to get auth-passwd.c
 3r3733.
/* 3r3731. * Tries to authenticate the user using password. Returns true if
* authentication succeeds. 3r3733. * /
int 3r3731. auth_password (Authctxt * authctxt, const char * password)
{
3r3733.}
3r?656.
 3r3733. It looks like a great place to try to remove the login /password transmitted by the user ...
+ 0 -

Fast Sin and Cos on built-in ASM for Delphi

 
3r3-31. Hello!
 
 
There was a need to write a quick calculation of Sin and Cos. The basis for the calculations took the decomposition of the Taylor series. I use it in 3D systems (OpenGL and a graphical library of my own development). Unfortunately, it’s not possible to reduce the series “perfectly” for Double, but this is offset by good acceleration. The code is written in the assembler built into Delphi XE6. Used by SSE2.
 
 
Not suitable for scientific computing, but quite suitable for use in games.
 
There is enough accuracy to cover the digit capacity of the Single number, which is used
 
for m...
+ 0 -

Low-level Brainfuck

Low-level Brainfuck 3r33845. 3r3-31. 3r33737. Building a Brainfuck translator in TurboAssembler. 3r33737. 3r33831.  3r33845. 3r33831.  3r33845. For example, in Pascal. 3r33831.  3r33845. 3r33831.  3r33845. Let's write a code for + 3r33831.  3r33845. 3r33831.  3r33845. Therefore, we only need the bf-commands + and . 3r3663. 3r33831.  3r33845. 3r33831.  3r33845. 3r3742. 3r33737. var
data_mem: array[110]of integer; //data array 3r33845. command_mem: string; //command array
i: integer; //index of command array
j: integer; //index of data array
begin
j: = 1; 3r33845. readln (command_mem); 3r33845. 3r33845. for ...
+ 0 -

Linux kernel boot. Part 1

+ 0 -

Backdoors in the microcode assembly instructions for x86 processors

 3r3195. 3r3-31.
We do not trust the software for a long time, and therefore we carry out its audit, we carry out reverse engineering, we run it step by step, we run it in a sandbox. What about the processor on which our software runs? “We blindly and wholeheartedly trust this little piece of silicon.” However, modern hardware has the same problems as software: secret undocumented functionality, errors, vulnerabilities, malware, trojans, rootkits, backdoors. 3r31-10. 3r3111.  3r3195.
Backdoors in the microcode assembly instructions for x86 processors ISA (Instruction Set Architecture) x86 is one of the longest continuously changing “instruction set architectures” in history...
+ 0 -

Processor Design (CPU Design) The esoteric language LMCode

 3r3886. 3r3-31. Processor Design (CPU Design) The esoteric language LMCode
 3r3886. Movement I
 3r3886. Movement II
 3r3886. Part III
 3r3886. Movement IV
 3r3886.
 3r3886. This article is devoted to the creation of an interpreter of a certain esoteric language LMCode, which is based on the architecture. Little Man Computer .
 3r3886. About Little Man Computer can be found in previous articles.
 3r3886. Let r3r3872.  3r3886. 3r3149.  3r3886.
INP command corresponds to 3r3641. , [/b]
 3r3886.
OUT command corresponds to r3r3641. . [/b]
 3r3886.
ADD team corresponds to r3r3641. + [/b]
 3r3886.
SUB command corresponds to r3r3641. - 3r3629.
 3r3886.
STA c...
+ 0 -

Low Level Brainfuck. Continuing

Low Level Brainfuck. Continuing Movement I 3r33635.  3r3644. Movement II 3r33635.  3r3644. Part III 3r33635.  3r3644. 3r33635.  3r3644. We write brainfuck on TurboAssembler'e. 3r33635.  3r3644. 3r33635.  3r3644. Add the output of the array. data_arr ("Tape" Turing machines) on the screen. 3r33635.  3r3644. We write a program that displays the elements of an arbitrary array by means of the function 09h of the interrupt 21h. 3r33635.  3r3644.
3r33510. .model tiny; ascii-decoder.asm
jumps
.data
data_arr DB ?????????????? '$'; data 3r3644. 3r3644. .code 3r3644. ORG 100h
start:
; Prepare all the necessary r3r3644...
+ 0 -

How to write in an assembler program with overlapping instructions (another bytecode obfuscation technique)

How to write in an assembler program with overlapping instructions (another bytecode obfuscation technique)We present to your attention the technique of creating assembler programs with overlapping instructions, - to protect the compiled byte-code from disassembling. This technique is able to withstand both static and dynamic analysis of bytecode. The idea is to pick up such a stream of bytes, when disassembling which starting from two different offsets, two different chains of instructions were obtained, that is, two different ways of executing the program. To do this, we take multibyte assembly instructions, and hide the protected code in the variable parts of the byte code of these instructions...
+ 0 -