rules 6. enforce rules 7. Block Set of Invariants 5. data pipeline ratifies rules 4. log evaluation results Hive actor uri equivalent fields 1234 /photo/save photo.owner_id === actor 2432 /user/update user.id == actor
rules Set of Invariants 4. log evaluation results Hive actor uri equivalent fields 1234 /photo/save photo.owner_id === actor 2432 /user/update user.id == actor
rules Set of Invariants 5. data pipeline ratifies rules 4. log evaluation results Hive actor uri equivalent fields 1234 /photo/save photo.owner_id === actor 2432 /user/update user.id == actor
rules Set of Invariants 5. data pipeline ratifies rules 4. log evaluation results Hive actor uri equivalent fields 1234 /photo/save photo.owner_id === actor 2432 /user/update user.id == actor 6. enforce rules
rules 6. enforce rules 7. Block Set of Invariants 5. data pipeline ratifies rules 4. log evaluation results Hive actor uri equivalent fields 1234 /photo/save photo.owner_id === actor 2432 /user/update user.id == actor
et al. "TAO: Facebook's Distributed Data Store for the Social Graph." USENIX Annual Technical Conference. 2013. User Privacy Settings Photo User like (asymmetric) liked by (asymmetric) privacy (unique) friends (symmetric)
request PHOTO USER USER_TO_COVER_PHOTO { "22222222222222":[["id1","id"],["id2","owner_id"]], "19283912830192":[["id1","time_updated"],["id2","time_updated"]], } id owner_id size type ... id name dob username ... id1 id2
PHOTO USER USER_TO_COVER_PHOTO { "11111111111111":[["actors","[]"], ["id2","owner_id"]], "22222222222222":[["id1","id"],["id2","owner_id"]], "19283912830192":[["id1","time_updated"],["id2","time_updated"]], } id owner_id size type ... id name dob username ... id1 id2 logged in user (actors) actor's friends pages the actor admins groups the actor has membership groups the actor admins
Logs Logs Logs DATE DATE-1 DATE-N ... Data Pipeline HiveQL Set of invariants PHOTO -> COVER_PHOTO_TO_USER -> USER 1. logged in user always needs to be equal to the owner_id of the photo 2. field owner_id always needs to be equal to id of user FBOBj.
rules Set of invariants PHOTO -> COVER_PHOTO_TO_USER -> USER 1. logged in user always needs to be equal to the owner_id of the photo 2. field owner_id always needs to be equal to id of user FBOBj. /update/cover_photo
PHOTO -> COVER_PHOTO_TO_USER -> USER 1. logged in user always needs to be equal to the owner_id of the photo 2. field owner_id always needs to be equal to id of user FBOBj.
Configerator PHOTO -> COVER_PHOTO_TO_USER -> USER 1. logged in user always needs to be equal to the owner_id of the photo 2. field owner_id always needs to be equal to id of user FBOBj.
always needs to be equal to the owner_id of the photo Whitelist (in Configerator) PHOTO -> COVER_PHOTO_TO_USER -> USER logged in user always needs to be equal to the owner_id of the photo
was trying to upload pending photos to any album in an specific endpoint in mobile • Whitehat trying to exploit scheduling of draft posts in pages in our graphql api • Requests that were allowing personal photos of a page admin to be used on the page. Leaked the identity of the admin • Endpoint to update location preferences of page was not checking that the person logged in was admin of the page Cool stuff it found
code analysis on our live production traffic to automatically infer invariants to find and block malicious actors from manipulating people's data. Invariant Detector Questions? Come find me afterwards or email me at [email protected] A Facebook London project with Chad Parry, Ioannis Papagiannis, Marjori Pomarole and SecInfra team.