Silverlight 4's warning message for applications that run "out of browser". This OOB apps have basically full access to the system, since they can access COM+:
http://justinangel.net/CuttingEdgeSilverlight4ComFeatures
Write to C: using silverlight:
Feature #1: Write files anywhere on the local machineUsing the FileSystemObject
we have virtually unlimited access to the user’s file storage.
<Button x:Name="btnWriteFile" Content="Write file to C:\test.txt"
Click="btnWriteFile_Click" />
private void btnWriteFile_Click(object sender, RoutedEventArgs e)
{
using(dynamic fsoCom =
ComAutomationFactory.CreateObject("Scripting.FileSystemObject"))
{
dynamic file = fsoCom.CreateTextFile(@"c:\test.txt", true);
file.WriteLine("Bloody Hell!");
file.WriteLine("Silverlight is writing to C:\\");
file.Close();
}
}
Fun!
And the fun doesn't stop here:
<Button x:Name="btnAddOOBAppToStartup"
Content="Add out-of-browser application to Startup"
Click="btnAddOOBAppToStartup_Click" />
private void btnAddOOBAppToStartup_Click(object sender, RoutedEventArgs e)
{
using (dynamic ShellApplication =
ComAutomationFactory.CreateObject("Shell.Application"))
{
dynamic commonPrograms = ShellApplication.NameSpace(11);
string allUsersPath = commonPrograms.Self.Path;
dynamic directory = ShellApplication.NameSpace(allUsersPath + @"\Programs");
dynamic link =
directory.ParseName(Deployment.Current.OutOfBrowserSettings.ShortName + ".lnk");
string OOBLink = link.Path;
using (dynamic WShell = ComAutomationFactory.CreateObject("WScript.Shell"))
{
WShell.RegWrite(@"HKLM\Software\Microsoft\Windows\CurrentVersion\Run\"
+
Deployment.Current.OutOfBrowserSettings.ShortName,
OOBLink);
MessageBox.Show
("Please restart your machine and this application will load on startup.");
}
}
}
What's stopping someone from writing malicious silverlight applications now? The only barrier seems to be this toothless security warning, just a single click on "install", and your system can be rooted.
Yes, it has a warning, but activeX controls had warnings too. No one reads them. People don't read, so make the security risk obvious:
Microsoft should have made the security warning dialog much bigger, in RED, with a BIG exclaimation mark, and an even bigger warning shield (like the current one, just make it ten times bigger) and a loud flashing sound. And an additional checkmark box, that you have to tick, to activate the install button. (maybe two checkboxes, one for "I agree to install this", and another "I am aware of the security risks" . Then, maybe, this would be secure.
As it stands now, it doesn't cut it.



Thread Closed
This thread is kinda stale and has been closed but if you'd like to continue the conversation, please create a new thread in our Forums,
or Contact Us and let us know.