The Turkey Curse
fukamis terror chatroom

Exploiten für Doofe: dsidentity in MacOS 10.4.x bis 10.4.2

Boomtime, 27th Chaos, 3172.
Code fukami 85196 No Comments | Trackback URI

Im vorangegangen Posting über MacOS X war von dsidentity die Rede. Auf Astros Anregung hin will ich mal kurz erläutern, warum dieser Exploit allerorten so viel Heiterkeit ausgelöst hat. Aus der Manpage:

dsidentity is a setuid tool that allows addition or removal of identity user accounts in Directory Services. The dsidentity tool creates a partial but valid system identity in the local Directory System. This identity is created with the intent to support remote sharing capabilities. Version 1.00 supports local shadowhash passwords as regular local user records.

Der exploitbare Teil des Codes dazu sieht so aus:

char *envStr = nil; 
envStr = getenv("USER"); 
//check for member of admin group 
if ( (envStr != nil) && UserIsMemberOfGroup( inDSRef, inDSNodeRef, envStr, "admin" ) ) 
{ 
     return true; 
}

Gucken wir doch mal, was die Umgebungsvariable USER zurückgibt — so mancher wird sich jetzt schon den Bauch halten:

neutron:~ % export USER=rootoderhansoderso
neutron:~ % env|grep USER
USER=rootoderhansoderso

Interessantes Konzept jedenfalls …

Ach ja, es gibt noch eine andere lesenswerte Beschreibung dazu.

---

No Comments »

No comments yet.

RSS feed for comments on this post. | TrackBack URI

Leave a comment



A Discordian is Prohibited of Believing what he reads.

The Turkey Curse is powered by WordPress, template idea by Priss

Entries (RSS) and Comments (RSS).
Generated in 0.154 seconds.