Wednesday, November 13, 2013

Pakistan Hijacked Youtube - Prefix Hijack

Even a single fixed-route attack can destabilize a Network....!

Everyone remembers the time in 2008 when Pakistan Gov. put down orders to officially block YouTube broadcast in Pakistan. In response to this, Pakistan telecom blocked the YouTube telecast by the very old Prefix hijack, which resulted in YouTube being blocked.

How did this happen?

Pakistan Telecom provider tried to block YouTube in their homeland by advertising an unauthorized prefix route, to its providers. This newly defined prefix route ( 208.65.153.0/24) happens to be the more perfect destination route of the Youtube server ( 208.65.152.0/22). The upstream providers of the country relayed it to the Internet World, rerouting all of YouTube's traffic to Pakistan Telecom, thus blocking YouTube for all of its users worldwide.
Within 2 minutes from the first relay of the bad route, almost all the world providers carried the route.
Youtube alerted that the /24 prefix has been hijacked.
All the providers start dropping the erroneous route and carried out the /25 prefix thus getting Youtube back to its users.

Its times like this , the term BGP takes revival and fame. BGP - Border Gateway Protocol used in exchanging routing information within and between Autonomous systems (Google,Bank of America,Samsung,etc). 
This attack states a phenomenon  "Even when a router announces seriously bogus information,it will continue to announce the same bogus information for the duration of its attack".


Wednesday, November 6, 2013

ASSEMBLER - X86


Assembler  --- Assembly instructions into Machine Code Instructions.

When the assembly instructions is sent into the ASM , the named 'variables' are hard-coded as memory address and ;label' variables as code address. Some parts of the prog source are always lost when assembler is used,which is inevitable.


MASM   -  Microsoft Assembler. (Macro Assembler)

  •  Used by Microsoft systems for the low-part definition of the Operating systems.
  •  Used for Intel core.
  •  This is not portable and hence is the disadvantage with other platforms.
TASM   - Turbo assembler
  •  Developed by Borland and used in integration with Borland's software development tools.
  •  This assembler is not free .
NASM   -  Netwide Assembler
  • Free, portable and retargetable. 
  • Can be used both in Linux and Windows systems.
  • Not mature as TASM and MASM,but definitely user-friendly.
FASM  -   Flat Assembler
  • Fast Self-assembling Open-source (X86) assembler .
AT & T Syntax
  • AT&T syntax is different from Intel Syntax, but is used in GAS (GNU Assembler) ,mainly distributed in Unix and Unix-based Systems.
  • GAS is specifically designed to be used as the back-end of GCC (GNU Compiler Collection) package.
  • GCC always feeds it syntactically correct code,GAS often has minimal error checking.
  • GAS syntax can be switched to Intel syntax with the directive  ":intel_syntax noprefix"
  • GAs is automatically installed with GCC or GNU binutils distribution package.
                              

HLA   -   High Level Assemblers
  • An assembler with high-level syntax. 
  • HLA acts as a front-end to other assemblers as FASM, MASM , NASM and GAS. So, the programmer must have another assembler installed to assemble programs with HLA.
  • HLA comes with a comprehensive standard library.
  • HLA syntax is very easy and closely resembles to C.                                                                      
      Example of a HLA code : 
            
            mov (src, dest) ;
            pop(eax) ;
            push(ebp) ;
            for (mov (0, ecx) ; ecx < 10; inc (exc)) do
                    mul (ecx) ;
            endfor ;