Guest User

Untitled

a guest
Apr 23rd, 2018
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.78 KB | None | 0 0
  1. Ist eine Antwort auf den (später behandelten) Schutz gegen Buffer-Overflows durch nicht-ausführbare Adressbereiche. Die überschriebene return Adresse zeigt hierbei auf existierende Code am System, sodass meist z.B. in eine Standard-Bibliothek gesprungen wird. Zuerst wird derBuffer gefüllt, Saved Frame Pointer mit eine geeigneten Adresse beschrieben und die Return Adresse mit der Adresse der gewünschten Funktion, dann wird ein Platzhalter-Wert von dem die Bibliotheks-Funktion glaubt er sei die return-Adresse geschrieben und dann werden die Werte von einem oder mehreren Parametern für diese Funktion geschrieben. (JA ES STEHT IMMER NUR _WRITES_ ICH HAB KA WOHIN GESCHRIEBEN WIRD -.-) Wenn die angegriffene Funktion retourniert, stellt es den modifzierten Frame Pointer wieder her, popt dann (den Stack vermutlich?) und transferiert die Kontrolle zu der Return Adresse, welche den Code in der Bibliotheks Funktion dazu bringt ausgeführt zu werden. Weil die Funktion glaubt, dass sie aufgerufen wurde, behandelt sie den Wert der derzeit an der Spitze des Stack liegt (den Platzhalter-Wert) als Return-Adresse, mit den Werten darüber als diesen Parameter. Darauf wird es eine neun Stack-Frame unter dieser Lokation erstellen und ausführen. Abhängig davon ob der Type der Parameter und deren Interpretation bei der Bibliotheks-Funktion, muss der Angreifer möglicherweise genau deren Adresse kennen. Eine andere Variante verkettet zwei Bibliotheks-Aufrufe, einen nach dem anderen.
  2.  
  3. Given the introduction of non-executable stacks as a defense against buffer overflows, attackers have turned to a variant attack in which the return address is changed to jump to existing code on the system, most commonly the address of a standard library function, such as the system() function. The attacker specifies an overflow that fills the buffer, replaces the saved frame pointer with a suitable address, replaces the return address with the address of the desired library function, writes a placeholder value that the library function will believe is a return address, and then writes the values of one (or more) parameters to this library function. When the attacked function returns, it restores the (modified) frame pointer, then pops and transfers control to the return address, which causes the code in the library function to start executing. Because the function believes it has been called, it treats the value currently on the top of the stack (the placeholder) as a return address, with its parameters above that. In turn it will construct a new frame below this location and run. Depending on the type of parameters and their interpretation by the library function, the attacker may need to know precisely their address (typically within the overwritten buffer). Another variant chains two library calls one after the other.
Add Comment
Please, Sign In to add comment