Code Monkey home page Code Monkey logo

gamingserviceeop's Introduction

GamingServiceEoP

Exploit for arbitrary folder move in GamingService component of Xbox. GamingService is not default service. If service is installed on system it allows low privilege users to escalate to system.

During the process of changing directory the Gaming Services service will try to open C:\XboxGames\GameSave\Content\MicrosoftGame.Config file, if the file exists the gaming service will try to move whole C:\XboxGames\GameSave folder. It does that by calling MoveFileW API call while impersonating calling user.

If gaming service fails to move folder due to access denied error it will revert impersonation and perform the move operation as system. As the C:\XboxGames folder gives modify permissions to authenticated users group (even if it does not the user can change it to directory that is fully controlled by that user) user can delete c:\xboxgames folder, create new one, drop arbitrary dll inside C:\XboxGames\GameSave folder and add deny delete ACL for itself so that move operation fails while impersonating user.

As result of my previous report MSRC included few checks/mitigations before moving folder.

  1. Before moving folder service checks if destionation folder is reparse point
  2. Lockdown both source and destination directory by creating temporary file (.tmp_ + digit) with FILE_FLAG_DELETE_ON_CLOSE flag and share set to none so that user cant delete file

The implementation of these measures is flawed as the check for junction is done before locking the directory. This can be abused to trick service that new installation directory is safe but then turning it into a junction point just before service move folder and redirect it to c:\windows\system32\spool\drivers\x64 directory. The time window is small but can be incresed by creating multiple .tmp_ +digit files as service specify CREATE_ALWAYS and will fail to create file if exist and will continue to increase digit untill file is successfuly created.

The exploit abuse spooler service to load arbitrary DLL as system

PoC

poc2.mp4

MSRC stating no security boundry is crossed

image

gamingserviceeop's People

Contributors

wh04m1001 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.