Teen boy punched to the ground and kicked at Pitsea Railway Station
A stock market crash may be just around the corner - this is how I'm protecting myself, says RACHEL RICKARD STRAUS
Essex actor could return to popular The Inbetweeners in potential new series
Record number of millennials become landlords - despite struggling to get on the housing ladder themselves
Techies tossed appliance that had no power cord, but turned out to power their company
Who, Me? Welcome to another week of nimble newsifying from The Register, which as always kicks off the working week with a fresh instalment of Who, Me? It's the reader-contributed column in which you admit to mistakes that almost trashed your career.…
CodeSOD: The File Transfer
SQL Server Information Services is Microsoft's ETL tool. It provides a drag-and-drop interface for describing data flows from sources to sinks, complete with transformations and all sorts of other operations, and is useful for migrating data between databases, linking legacy mainframes into modern databases, or doing what most people seem to need: migrating data into Excel spreadsheets.
It's essentially a full-fledged scripting environment, with a focus on data-oriented operations. The various nodes you can drag-and-drop in are database connections, queries, transformations, file system operations, calls to stored procedures, and so on. It even lets you run .NET code inside of SSIS.
Which is why Lisa was so surprised that her predecessor had a "call stored procedure" node called "move file". And more than that, she was surprised that the stored procedure looked like this:
if (@doDelete = 1) begin set @cmdText = 'mv -f ' + @pathName + @FileName + @FileExt + ' ' + @pathName + 'archive\' + @FileName + @FileExt + '.archive' end else begin set @cmdText = 'cp -f ' + @pathName + @FileName + @FileExt + ' ' + @pathName + 'archive\' + @FileName + @FileExt + '.archive' end insert into #cmdOutput exec @cmdResult = master.dbo.xp_cmdshell @cmdTextThis stored procedure was called from SSIS, which again, I want to stress, has the functionality to do this without calling a stored procedure. But this approach offers us a few unique "advantages".
First, it requires xp_cmdshell be enabled. This particular stored procedure is disabled by default, since it allows a user inside of SQL Server to invoke shell commands. Microsoft disables this by default, because it's a gaping security hole. Any security scanning tool you may run against your server will call it out as a big red flag. You're one SQL Injection attack away from an old rm -rf /.
Which, speaking of rm, you'll note the command strings they build to execute. mv and cp. Now, SQL Server can run on Linux, but this instance wasn't. No, the person responsible for this stored procedure also installed GNU Core Utils on Windows, just so they could have mv and cp to invoke from this stored procedure. Even better, they didn't document this dependency, so the first time someone tried to migrate the database to new hardware, this functionality broke and no one knew why.
At least the migration gave them a chance to update their SSIS packages to use the "File Transfer Task" instead of this stored procedure. But don't worry, there were plenty of other stored procedures using xp_cmdshell.
How Margaret Thatcher 'held the late Queen in awe' but the Palace 'slightly looked down on her', royal author claims
Police drop bombshell after ending the search for little Gus after he vanished without a trace
'What's the weather like up there?' Britain's tallest Tory opens up about bullying, getting discounts on custom-made clothes and the jokes he hears daily
The desirable Essex area where more homes keep being built
'Broken' mother of Nova music festival victim kills herself in second suicide linked to massacre in just two days
California Will Stop Using Coal as a Power Source Next Month
Read more of this story at Slashdot.
Rogue surgeon who harmed patients in botched operations pockets pension payments worth around £1 million since fleeing the country
The proposed government changes to alcohol licensing rules that could make them less public
Sick truth behind Gus update as little boy remains missing after vanishing without a trace in the outback
The unexpected baby names you should avoid in 2025 - so is your favourite on the list?
Why GPS Fails In Cities. And What Researchers Think Could Fix It
Read more of this story at Slashdot.
Horror as father and daughter watch stranger STAB their two dogs at an off-leash park - before one is euthanised and put out of its misery
Airport worker's attempt to refuel aircraft goes horribly wrong in jaw-dropping footage
Russia Accused of Severing Ukrainian Nuclear Power Plant's Link, as Energy Remains a 'Key Battleground'
Read more of this story at Slashdot.