
•rungameid
•runsafe
•rungame
As with most of the software, the games available on Steam accept command
line arguments. Steam allows you to pass such arguments to games but there is
no official documentation about any strategy to do that, except for the -applaunch
command that can’t be used in a universal and silent way, because of different URL
encoding strategies used by web browsers.
Most of the four commands that can be used to run games via Steam URLs are
undocumented, anyway the following are their formats:
•steam://run/id/language/url_encoded_parameters
•steam://rungameid/id/language_bug/url_encoded_parameters
•steam://runsafe/id
•steam://rungame/id/lobby_id/parameters
The only commands suitable for remote environments are run and rungameid
where url_encoded_parameters is an URL encoded string passed to the Q_URLDecode
function that stores the decoded result in a buffer of 128 bytes. The Q_URLDecode
function allows you to use any character and also demonstrates that there are some
commands designed to be used remotely via browser. The limitation of 128 chars
for the parameters doesn’t affect exploitation of any of the following bugs, because
if we need more room we can just use some JavaScript to join chunks of commands.
3.2.1 GAME EXPLOITATION 1: SOURCE ENGINE
As first example of game exploitation via Steam we have chosen the game engine
with the biggest user base: Source6.
The following are the most known games based on such engine: Half-Life 2,
Counter-Strike: Source, Half-Life: Source, Day of Defeat: Source, Team Fortress 2,
Portal 2, Left 4 Dead 2, Dota 2, Alien Swarm, SiN Episodes, Dark Messiah of Might
and Magic, The Ship, Zombie Panic! Source, Age of Chivalry, Synergy, D.I.P.R.I.P.,
Eternal Silence, Pirates Vikings & Knights II, Dystopia, Insurgency, Nuclear Dawn
and Smashball.
Most of them include the basis commands7available in the Source engine,
which we are going to use for writing files with custom content in arbitrary lo-
cations. For exploiting this engine we have opted for the following command-line
options:
•+con_logfile, allows you to specify a file that will receive the content of the
console (it can’t be a Windows remote share)
6http://source.valvesoftware.com
7https://developer.valvesoftware.com/wiki/Command_Line_Options
ReVuln - http://revuln.com page 6 of 10