| This page is heavily outdated and should be used for reference information only. The latest player from Adobe is now v9. Get it here. |
So.. You want your flash plugin to be silenced for good? Great! Finally we can get rid of those good-for-nothin' ads who desperately try to draw our attention with flashing images and crazy sounds! (okay okay then.. we can't yet do anything about the flashing part)
Now, for some unknown and mysterious reason Macromedia chose to leave the sound-enabled option to the developers of a flash movie, without even considering the fact that quite a few of us would like that control in our own hands!
After numerous times being bombarded with crazy
music from a flash movie, I
finally grew tired of it and so altered it to never say another
peep again.
This new silenced version is a very simple hack done on the original flash
plugin from Macromedia.
If you just want the new plugin, fetch it here:
Note! This is
only for Internet Explorer based browsers!
Silenced plugin: silenced.v7.flash.ocx (Version 7.0.19.0)
(Fetched 353 times)
Original plugin: original.v7.flash.ocx (Version 7.0.19.0)
(Fetched 370 times)
This is quite simple:
The hack was done by analyzing the file through a disassembler called Ida. These are the steps:
Fire up IDA, and load flash.ocx.
A quick review of the
import table tells us the plugin is using the Microsoft Multimedia
system's waveOut* functions for playback.
A quick peek at the MMS API tells us that a prior call to waveOutOpen, which
must returne true, must have occured before we can use the rest of the waveOut*
functions.
If we were to change the result of waveOutOpen so that it would fail, we would have succeeded.
This is how
we do it:
Locate the entries where the plugin calls the MMSystem WaveOutOpen
function.
This should yield two results:
Through the MSDN documentation we learn that the waveOutOpen is defined as:
| MMRESULT waveOutOpen( LPHWAVEOUT phwo, UINT_PTR uDeviceID, LPWAVEFORMATEX pwfx, DWORD_PTR dwCallback, DWORD_PTR dwCallbackInstance, DWORD fdwOpen ); |
According to the documentation, a result of MMSYSERR_NOERROR (which is
zero) is returned upon success. Our mission is to change that!
Further investigation reveals that when the waveOutOpen function is parsed
an illegal Device ID, it will fail.. yeah!
Analyzing the parameters the flash plugin parses to the WaveOut function, we find that the plugin's only interest is opening a wave capable playback device. According to the MSDN documentation, this is accomplished by setting the Device ID parameter to 'WAVE_MAPPER' which is equal to -1.
At and a few steps before location .text:10073AB5 we find:
| .text:10073AB2 push
0FFFFFFFFh .text:10073AB4 push eax .text:10073AB5 call ds:waveOutOpen |
In hex that's:
| 6A FF 50 FF 15 B8-34 0B 10 |
Changing the first FF to FB results in the device ID parameter for the waveOutOpen function to be -2, which should result in failure.
So, fire up your
favorite hex-editor, open up "flash.ocx" and locate file-offset 73AB5. There you
should find the above hex string. Change the first FF to FB.
Now, go find file-offset 93E19. Again the above hex string should match. Change
the first FF to FB here as well.
Save the new file as something like "silenced.flash.ocx"
In Ida, after analyzing the new "silenced.flash.ocx" file, the result is:
| .text:10073AB2 push
0FFFFFFFBh .text:10073AB4 push eax .text:10073AB5 call ds:waveOutOpen |
And for .text:10093E19:
| .text:10093E16 push
0FFFFFFFBh .text:10093E18 push esi .text:10093E19 call ds:waveOutOpen |
We have now successfully altered the UINT_PTR uDeviceID from the WAVE_MAPPER parameter into a -2. As you might have noticed, the parameter specificly states that it is a unsigned integer. Thus the -2 becomes wave device 4,294,967,294 (4 giga). So, if you have 4 billion wave cappeable devices in your system, this hack will result in audio emerging from that device.
aaahhhh silence.. what a bliss!
Well.. Perhaps you have a version of the flash plugin which I haven't?
Hack it and send it to me (or send it raw, and I'll do it)...
You have created a little tool for automatic on/off for all known versions of the flash plugin?
Great! I want it! Please send it to me..
I'm too lazy to do it myself :(
Hope ya all enjoy it,
Philip S.