Mezgani blog

January 22, 2011

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

Filed under: informational, rfc — Tags: — Ali MEZGANI @ 1:48 am

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 0×8863 (Discovery Stage) or 0×8864 (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 0×8863

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

2. Server to client: Offer (PPPoE Active Disocvery Offer)
PADO:
* Access Concentrator reply to an unicast address, with code set to 0×07
* The session id set to 0×0000
* 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 0×19 and session id is set to 0×0000

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 0×65
* 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=0×8863,src=”00:60:4c:72:e7:69″,dst=”ff:ff:ff:ff:ff:ff”)/PPPoED(code=0×09,sessionid=0×0000),iface=”nas0″)

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

June 15, 2010

Future of hacking

Filed under: informational, security — Tags: , , , , — Ali MEZGANI @ 5:02 am

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.

April 29, 2010

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

Filed under: informational, linux, system, tools — Tags: — Ali MEZGANI @ 3:26 am

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"

Filed under: informational, linux, system, tools — Tags: — Ali MEZGANI @ 3:26 am

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

April 23, 2010

What is difference between register and memory?

Filed under: informational, system — Tags: , , — Ali MEZGANI @ 8:19 pm

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.

November 8, 2009

Code names of Debian

Filed under: debian, informational — Tags: — Ali MEZGANI @ 1:18 am

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

August 11, 2009

Facebook scale

Filed under: informational — Tags: , — Ali MEZGANI @ 5:00 pm

One of the disadvantages of having a big contact list into facebook, is that you lose many friend’s posts, you spend much time to read or watch all interesting posts, and also consecrating a lot of times to facebook, and i think that is not really good.
Anyway, i see facebook merging to a mini youtube or a social youtube when 70% of facebook traffic is sharing video.

July 2, 2009

BIND 10 starts development

Filed under: informational, linux, system — Tags: — Ali MEZGANI @ 2:31 pm

ISC has received enough support from their initial Patron Sponsors and Sponsors to enable the launch of the BIND 10 project and begin its development.

The next release of BIND the domain name server the most popular is under development and it’s based on C++, and python language for scripts and extensions.

The architecture of BIND 10 concentrates on many technical aspects : Modularity, Customizability, Clusterization, Integration,
Resilience, Runtime control.

For more information please visit https://www.isc.org/bind10/project
And find here the public Trac https://bind10.isc.org/.

April 15, 2009

How to add applications to sourceforge

Filed under: informational — Tags: — Ali MEZGANI @ 1:06 am

Here i’ve marked the steps that i followed to share cwhois and how i upload it to sourceforge.
First of all, i prepared the code source of cwhois application, i archived it and i compressed it with bzip2.
Sourceforge provides a file management service to ease the process of uploading files.
The file management service allows upload via web form, WebDAV, SFTP, SCP, and rsync over SSH.

I used a WebDAV linux client named cadaver. You can installed with aptitude
$ sudo aptitude install cadaver

After, i run cadaver like this:
$ cadaver https://frs.sourceforge.net/h/ha/handrix/uploads
Authentication required for SourceForge.net File Release System on server `frs.sourceforge.net’:
Username: handrix
Password:
dav:/h/ha/handrix/uploads/> put cwhois.tar.bz2
Uploading cwhois.tar.bz2 to `/h/ha/handrix/uploads/cwhois.tar.bz2′:
Progress: [=============================>] 100,0% of 92456 bytes succeeded.

Note that the upload url is in this form https://frs.sourceforge.net/u/us/user/uploads
where ‘u’ is the first occurence in your username, ‘us’ is the first and the second character,
and ‘user’ have also to be remplaced with your username.
So, i put the application.

Well everything seems to be ok, i went to SF.net > Projects > cwhois > Admin > File Releases
and i added a release 0.1, also i added the uploaded File cwhois.tar.bz2 To This Release.

In the next step i configured the project’s Git repository.

$ git init
$ git config –global user.name “MEZGANI ali”
$ git config –global user.email “handrix@gmail.com”
$ git add .
$ git commit -u
$ git remote add origin ssh://handrix@cwhois.git.sourceforge.net/gitroot/cwhois
$ git config branch.master.remote origin
$ git config branch.master.merge refs/heads/master
$ git push origin master

Once that is done, i was able to browse my newly-committed content via gitweb.

Lastly, for backupping we can use rsync as well as :
$ rsync -av cwhois.git.sourceforge.net::gitroot/cwhois/* cwhois

Theme: Silver is the New Black. Blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.