Category Archives: learn

C Library Resources

https://www.gnu.org/software/libc/manual/
— This manual (libc, aka glibc) is available in the following formats

https://www.gnu.org/software/libc/#Overview
The GNU C Library project provides the core libraries for the GNU system and GNU/Linux systems, as well as many other systems that use Linux as the kernel. These libraries provide critical APIs including ISO C11, POSIX.1-2008, BSD, OS-specific APIs and more. These APIs include such foundational facilities as open, read, write, malloc, printf, getaddrinfo, dlopen, pthread_create, crypt, login, exit and more.

https://www.gnu.org/software/libc/manual/html_node/index.html
The C language provides no built-in facilities for performing such common operations as input/output, memory management, string manipulation, and the like. Instead, these facilities are defined in a standard library, which you compile and link with your programs. The GNU C Library, described in this document, defines all of the library functions that are specified by the ISO C standard, as well as additional features specific to POSIX and other derivatives of the Unix operating system, and extensions specific to GNU systems.

http://pubs.opengroup.org/onlinepubs/009695399/idx/index.html
The Open Group Base Specifications Issue 6, IEEE Std 1003.1, 2004 Edition

ICMP Codes

1 – Host Unreachable
2 – Protocol Unreachable
3 – Port Unreachable
9 – Communication with destination network prohibited
10 – Communication with destination host prohibited
13 – Communication administratively prohibited

Some Crypto Notes

So here are some cryptography notes for myself for various tests and things I have to study for.

Terms to know:

Stream Ciphers – This is a class of cipher that encrypts one bit of data at a time. The length of the encrypted text is the same length as the plain text content.  Types of Stream cciphers: RC4, A5/I, E0, VEST, Salsa20, etc.

Block Ciphers -Encrypts data one block at a time. When the data given is an uneven length, then it is padded at the end to create an even block length. PKCS5 or PKCS7 are typically used to pad the data for any uneven blocks. Example Block ciphers: AES, DES, 3DES, Blowfish, Twofish, etc.

Block Cipher Modes:

  • Electronic Codebook
  • Cipher Block Chaining Mode – a plaintext block of data is XOR’ed with the output of the previous cipher text block before it is encrypted. This is an effort to add randomness to each encryption operation and prevent duplicate blocks.
  • Cipher Feedback
  • Output Feedback
  • Counter – A block cipher acting as a stream cipher in a small way. The IV is concatenated with a counter value that represents the input for the algorithm,

 

Analysis:

ent – pseudo random number sequence test  “sudo apt-get install ent

tcpick – This can track, reassemble and reorder TCP streams. Only TCP though, so maybe scapy is a better way to go.