Tag: coding

Hacking, Python

Manipulate Network Packets

Impacket is a collection of Python classes for working with network protocols. Impacket is focused on providing low-level programmatic access to the packets and for some protocols (for instance NMB, SMB1-3 and MS-DCERPC) the protocol implementation itself. Packets can be constructed from scratch, as well as parsed from raw data, and the object oriented API …

C, Programming

RSA 2048 and Base64 using CryptoAPI and C

RSA is one of the first practical public-key cryptosystems and is widely used for secure data transmission. In such a cryptosystem, the encryption key is public and differs from the decryption key which is kept secret. In RSA, this asymmetry is based on the practical difficulty of factoring the product of two large prime numbers, …

C, Programming

AES 256 and Base64 using CryptoAPI and C

The Advanced Encryption Standard (AES), also known as Rijndael (its original name), is a specification for the encryption of electronic data established by the U.S. National Institute of Standards and Technology (NIST) in 2001. AES is based on the Rijndael cipher developed by two Belgian cryptographers, Joan Daemen and Vincent Rijmen, who submitted a proposal …

C, Programming

RC4 and Base64 using CryptoAPI and C

In cryptography, RC4 (Rivest Cipher 4 also known as ARC4 or ARCFOUR meaning Alleged RC4, see below) is a stream cipher. While remarkable for its simplicity and speed in software, multiple vulnerabilities have been discovered in RC4, rendering it insecure. It is especially vulnerable when the beginning of the output keystream is not discarded, or …

C, Programming

Calculate SHA 512 hash using C and CryptoAPI

SHA-2 (Secure Hash Algorithm 2) is a set of cryptographic hash functions designed by the National Security Agency (NSA).[3] SHA stands for Secure Hash Algorithm. Cryptographic hash functions are mathematical operations run on digital data; by comparing the computed “hash” (the output from execution of the algorithm) to a known and expected hash value, a …

C, Programming

Edit PE file properties using C

Using MS Windows API you can edit PE file properties such as: * File version * Product version * File Description * Company name * Internal name * Copyright * Original filename * Product name GetFileVersionInfoSize Determines whether the operating system can retrieve version information for a specified file. If version information is available, GetFileVersionInfoSize …

Assembly, C, Programming

Access x86 TEB/PEB with C and Assembly

The Process Environment Block (abbreviated PEB) is a data structure in the Windows NT operating system family. It is an opaque data structure that is used by the operating system internally, most of whose fields are not intended for use by anything other than the operating system. The PEB contains data structures that apply across …

Programming, Python

Install python3 packages with pip

Assuming that you have python2 also installed on the system. >> Install virtualenv sudo apt-get install virtualenvsudo apt-get install virtualenv >> Create shortcut virtualenv -p /usr/bin/python3 py3virtualenv -p /usr/bin/python3 py3 >> Activate shortcut source py3/bin/activatesource py3/bin/activate >> Install package pip install packagepip install package

Sysinternals, Tools

Retrieve information about logical processors

Coreinfo is a command-line utility that shows you the mapping between logical processors and the physical processor, NUMA node, and socket on which they reside, as well as the cache’s assigned to each logical processor. It uses the Windows’ GetLogicalProcessorInformation function to obtain this information and prints it to the screen, representing a mapping to …