SRE engineer Bookmarks

I’m Linux system engineer and I develop in Python, Bash and Perl. I’m really interested by SRE position for that, I’m applying for SRE Engineer in Google and production Engineer in facebook. and here I share my daily bookmarks :

sre

A Method for Transmissing PPP Over Ethernet (PPPoE) (RFC2516)

Publication date : February 1999
RFC Author(s) : R.Wheeler, D.Simone, D. Carrel, J. Evarts, K. Lidl, L. Mamakos
Category : informational

The Point-to-point Protocol (PPP) provides a standard method for transporting multi-protocol datagrams over point-to-point links.

PPPoE has two differents stages, first one is PPP Discovery stage that contains four steps when a host discovers the MAC address of peer (Concentrator) and the PPPoE session ID.
In the fact, the Mac address and PPPoE_SESSION_ID uniquely define a ession.
The relationship between the peers is a simple client/server when a client asks server(Concentrator) for informations to establish
the session.

The Frame sent is a simple Ethernet frame where the ETHER_TYPE is set to either 0x8863 (Discovery Stage) or 0x8864 (PPP Session Stage).

Here is the Ethernet Payload for PPPoE:
[ VER:4 | TYPE:4 | CODE:8 | SESSION_ID:16 | LENGTH:16 | PAYLOAD:16 ]

Discovery Stage : Ethernet Frame have the ETHER_TYPE field set to 0x8863

1. Client to server: Initiation (PPPoE Active Discovery Initiation)
PADI:
* Host send a broadcast packet, with the code field set to 0x09
* The session id set to 0x0000

2. Server to client: Offer (PPPoE Active Disocvery Offer)
PADO:
* Access Concentrator reply to an unicast address, with code set to 0x07
* The session id set to 0x0000
* PADO packet contains AC-Name TAG, Service-Name TAG

3. Client to server: Request (PPPoE Active Discovery Request)
PADR:
* Host receive one or more PADO packet and has to choice one
* Choice is based on AC-Name or Services offred
* Host send one PADR packet to Concentrator
* Destination is the unicat Ethernet address of Cencentrator
* code field is set to 0x19 and session id is set to 0x0000

4. Server to client: Session-confirmation (PPPoE Active Discovery Session-confirmation)
PADS:
* When Access receive PADR it prepare to begin PPP session
* generate a unique session id
* reply with an unicat Ethernet address
* code field is set to 0x65
* contains exactly one TAG of TAG_TYPE Service-Name

5. Either end to other end: Termination (PADT)
* packet sent bu host or Access Concentrator
* session is established
* Destination address is unicast
* session is the SESSION_ID generated
* code field is set to 0xa7

Examples Using scapy:
1. PADI:
sendp(Ether(type=0x8863,src=”00:60:4c:72:e7:69″,dst=”ff:ff:ff:ff:ff:ff”)/PPPoED(code=0x09,sessionid=0x0000),iface=”nas0″)

PADO:
2. sendp(Ether(type=0x8863,src=”00:bf:12:fa:90:fd”, dst=”00:60:4c:72:e7:69″)/PPPoED(code=0x07,sessionid=0x0000),iface=”nas0″)

Future of hacking

Many secret of nano technology are reveled, i think that the nano science become more and more interesting.

Germans and Americans scientist worked on it 20 years old, so this technology become more and more exploited and deployed in many domains, medicine, military, mechanic, pharmacy …
Dr. Altmann  has published a book about some dangerous military uses if you want read more please check here

More than that many researcher ask for dead code, to prove their reel visibility of the world and hiding the GOD existence, i’m really sorry to know about these
thoughts of this kind of intellectuals.

Anyway, a simple use can affect political people even to write and read event from their mind.

In computer science :
i think that if we can not hack brains, no links are needed to hack into boxes, only nano metals and could be set by materials constructor into some referred data bus or in NIC’s, to deserve attacker remotely using signals in some dedicated channel, well every bit sent are mirrored on the attacker simulator.

finally it sound like telegram methods, very exciting and awesome what human can drive.

Merge the remote changes before pushing again. “not a fast forward”

When you try to push and you get this message that’s mean that someone else has changed after your last fetch.
Well in this case you have to incorporate their changes before you can add yours typically, you’ll want to rebase rather than merge and you’ll also want to test the joined version.

$ git fetch
$ git diff master…origin/master

that’ll show changes of upstream
$ git fetch origin
$ git rebase origin/master
$ git push prigin master

Merge the remote changes before pushing again. "not a fast forward"

When you try to push and you get this message that’s mean that someone else has changed after your last fetch.
Well in this case you have to incorporate their changes before you can add yours typically, you’ll want to rebase rather than merge and you’ll also want to test the joined version.

$ git fetch
$ git diff master…origin/master

that’ll show changes of upstream
$ git fetch origin
$ git rebase origin/master
$ git push prigin master

What is difference between register and memory?

Registers are storage locations internal the the processor. CPU instructions operate on these values directly. On RISC processors, all data
must be moved into a register before it can be operated. On CISC (Intel) chips, there are a few operations that can load data from RAM, process it,
and save the result back out, but the fastest operations work directly with registers.

Also, there are registers that are set aside for certain tasks, these generally include a program counter, stack, and flags.
Each register also has a size that determines the maximum amount of data that can be processed at a time. The registers on Pentium chips, for
example, are 32 bits.

Finally, there are generally only a few registers available on a processer. Intel chips, for example, have 6 general purpose registers, and several
specialized registers including a base register, stack register, flags register, program counter, and some addressing registers.

Memory, or RAM, is located external to the CPU. Generally speaking, data has to be loaded into a CPU register from memory before the CPU can process
it, RAM is much slower than registers, there is a lot more RAM than registers, and generally memory can be addressed on a byte boundaries, where registers
may not be able to access all the bytes in a register.

To summarize: in general, registers are temporary storage in the CPU that holds the data the processor is currently working on, while RAM holds the
program instructions and the data the program requires.

Code names of Debian

When a Debian distribution is in the development stage, it has no version number but a codename. The purpose of these code names is to make easier the mirroring of the Debian distributions.
The code names of Debian releases are names of characters from the film Toy Story. The unstable, development distribution is permanently nicknamed sid, after the emotionally unstable next-door neighbor boy who regularly destroyed toys.

Code names of Debian
Code names of Debian