* Posts by Frumious Bandersnatch

1947 posts • joined 8 Nov 2007

Winning Underhand C Contest code silently tricks nuke inspectors

Frumious Bandersnatch
Silver badge

"most innocent looking snippet of code that in fact plants a virus"

Well, it's not a virus, but a fork bomb is generally very short. You could obfuscate it by writing the loop condition so that it looks like it's supposed to just run once if there's no error, but is actually designed to always loop infinitely (like the third example in the recent article here).

It's hard to disguise all bits of a virus since you need to include file I/O and that's going to look suspicious in many bits of code. Still, there are some things you could try...

1. companion viruses

It seems that these are still possible. Make a hidden .COM file corresponding to an existing .EXE or whatever. The .COM is executed when both extensions are present. Alternatively, get the user to set %PATHEXT (tell them it's needed for your program to work due to filename conflicts)

2. Unicode

If the compiler accepts Unicode characters, use the fact that some characters look the same even though they're different code points. Put an innocuous version of a routine in an obvious place at the top of a file and hide the malicious version (that's actually called) somewhere more out of the way.

3. Deliberately smash the stack

If the program looks like it should legitimately be using XOR on strings (like in a random number generator, encryption routine or similar) then introduce a bug that overwrites the call stack and executes a bit of machine code that's already embedded in the code (in obfuscated form, requiring the xor to decrypt it).

4. Other

It's a lot easier to introduce deliberate bugs that can be exploited later (by specially-crafted input) than it is to hide a complex program inside another.

0
0

Google to pump free gigabit Fiber into homes of hard-up families

Frumious Bandersnatch
Silver badge

Re: Time to Move?

**ALWAYS fair better**

That would be "fare".

(sorry... must be something to do with all the other spelling corrections above)

0
0

When customers try to be programmers: 'I want this CHANGED TO A ZERO ASAP'

Frumious Bandersnatch
Silver badge

1st story makes no sense

Did the guy requesting the change have multiple personality disorder or something? Personality #1 deduces that personality #2 will take over at some point and writes the comment to achieve some sort of victory over him? Did the guy wanting the change realise his mistake later and then travelled back in time to insert the comment when he was working for the original company?

Also, since each customer has his own version of the code, how does changing it for that customer affect the company writing the code? Surely even if they use the program themselves, they don't run a customer-customised version of it in house?

0
1
Frumious Bandersnatch
Silver badge

Re: C considered harmful

Are you complaining that someone forgot to put in 'case' or that enums start from zero?

In the first case, there are only around 30 or so reserved keywords in C. There are only two types of conditional statement (unless you count for/while). My point is that C is a pretty tiny language and if you use it for any amount of time you just know that switch and case go together. Why does it have to be 'case X:' and not just 'X:"? Because the latter is reserved as the syntax for defining a label so that you can jump ('goto') to a point later (and, yes, you can mix cases and regular labels--look up Zed's Device as a variant of Duff's Device). C is so small that you're expected to be able to make these kinds of distinction and always have them in your head.

In the second case, you can assign a constant value to one of the enumerated names and get var1=1, var2=2 and so on. But I don't really think you're complaining about that.

2
0

NOTHING trumps extra pizza on IT projects. Not even more people

Frumious Bandersnatch
Silver badge

Re: DevOps

re: gibbons

Maybe the guy who illustrated 'Watchmen'?

0
0

Little warning: Deleting the wrong files may brick your Linux PC

Frumious Bandersnatch
Silver badge

Re: Sounds Really Clever?

"Write" always implies "delete"

Actually, not quite. Being able to write to (an existing) file just depends on the file permissions. Being able to delete depends on both the file permissions (*) and the permissions in the containing directory. If I 'chmod -w' the directory but the file has regular rw permissions then I can write to the file, but I can't delete it.

(*) actually, it's only the rm command that will prevent me from deleting a file with no write permissions, but this is only a convention used by that particular tool. If I were to use unlink instead (either the system call or the command-line tool) setting the file to read-only would not stop the file from being deleted.

0
0

Random ideas sought to improve cryptography

Frumious Bandersnatch
Silver badge

Re: Way back when

use a random number generator to choose which part of PI to use

But then it fails another test of an RNG that's suitable for crypto uses: it'll be susceptible to timing attacks, assuming that you have to calculate the chosen bits on demand.

Of course, if you have enough disk space (we're talking Terabytes), you can pre-calculate the digits (and somehow make sure that seek times don't allow for a more subtle timing attack), but then it fails the practicality test.

0
0
Frumious Bandersnatch
Silver badge

re: That tells you that they are distributed rather than random though.

Yup. A "heat map" like this can only show you very pathological cases where the RNG is really skewed. Even then, the mind is great at picking up patterns that may or may not be there, so you could be looking at a map and thinking that it looks "unrandom" but really is still within the statistical bounds for what is random.

You're better off doing a chi-squared test if you just want to check that the generated numbers are well distributed. As Adam 1 said, though, this won't help if the number stream has some sort of discernible correlation between terms. Chi-squared is pretty crude, but it's a good sanity check.

2
0

Reg readers battle to claim 'my silicon's older than yours' crown

Frumious Bandersnatch
Silver badge

Agree with Model M keyboards.

I've been running my Model M system for a comparable length of time. I've changed a few components here and there (like CPU, RAM, disks and external case and screen) but otherwise it's still the same system.

(and of course, I'm using it to write this)

2
0

Facebook tells Belgian government its use of English invalidates privacy case

Frumious Bandersnatch
Silver badge

Mr. Cochran has the floor

...ladies and gentlemen of this supposed jury, I have one final thing I want you to consider. Ladies and gentlemen, this is Chewbacca. Chewbacca is a Wookiee from the planet Kashyyyk. But Chewbacca lives on the planet Endor. Now think about it; that does not make sense!

Why would a Wookiee, an 8-foot-tall Wookiee, want to live on Endor, with a bunch of 2-foot-tall Ewoks? That does not make sense! But more important, you have to ask yourself: What does this have to do with this case? Nothing. Ladies and gentlemen, it has nothing to do with this case! It does not make sense! Look at me. I'm a lawyer defending a major record Social Media company, and I'm talkin' about Chewbacca! Does that make sense? Ladies and gentlemen, I am not making any sense! None of this makes sense! And so you have to remember, when you're in that jury room deliberatin' and conjugatin' the Emancipation Proclamation, does it make sense? No! Ladies and gentlemen of this supposed jury, it does not make sense! If Chewbacca lives on Endor, you must acquit! The defense rests.

4
0

I love you. I will kill you! I want to make love to you: The evolution of AI in pop culture

Frumious Bandersnatch
Silver badge

"The author who coined the terms robotics and positronics"

Check the etymology of "robot". It was Karel Čapek's brother, not Asimov who coined it.

5
2

You've seen things people wouldn't believe – so tell us your programming horrors

Frumious Bandersnatch
Silver badge

re: Using = instead of ==

I usually reverse the order of conditional tests as a matter of defensive style. Instead of:

if (variable == const_value)

I usually write

if (const_value == variable)

If const_value is actually a constant (like 1 or "some string") then mistyping == as = should throw a compiler error ("attempt to modify something that isn't an l-value" or similar).

23
0
Frumious Bandersnatch
Silver badge

SWAP

Obviously better written something like:

int times = (loop +7) >> 3; // number of loops, rounded up

unsigned offset = loop & 7; // remainder div 8

switch(offset) {

case 0: do { SWAP;

case 7: SWAP;

case 6: SWAP;

case 5: SWAP;

case 4: SWAP;

case 3: SWAP;

case 2: SWAP;

case 1: SWAP;

} while (--times > 0);

}

Much clearer, surely :)

6
0

Back to the Future's DeLorean is coming back to the future

Frumious Bandersnatch
Silver badge

Re: New company finance

Well, the Guardian's obit for the man doesn't paint too nice a picture, calling him a "world-class conman", among other details. Once someone dies, libel or defamation laws don't generally apply, it seems (though some places might have time-limited exceptions for an obituary, and don't try saying nasty things about Ataturk), so you can say whatever you like about them. Still, on the balance of probabilities, I doubt that the Graun made up this stuff out of whole cloth.

4
1

US rapper slams Earth is Round conspiracy in Twitter marathon

Frumious Bandersnatch
Silver badge

+1 for the Thomas Dolby reference. By coincidence, I'd just queued the album up a few moments before I got to the page with your comment on it.

1
0

Virginia man charged in intriguing 'suspicious bacon' case

Frumious Bandersnatch
Silver badge

Mmmmm

Unexplained Bacon.

0
0

Bad luck, Ireland: DDoS attack disrupts isle's National Lottery

Frumious Bandersnatch
Silver badge

obvious comment is obvious

Attacks on people who are bad at maths.

2
0

Europe's satellite laser comms system set to shine

Frumious Bandersnatch
Silver badge

naming

Since they seem to have reinvented Fidonet, I propose they call it "Laikanet" in honour of, you know ...

1
0

IBM introduces fleecing-you-as-a-service for retailers

Frumious Bandersnatch
Silver badge

Re: Watch out for bugs

two sites were selling a rare book

There's a similar story (in reverse) told about two groceries that were in competition with each other.

They got into a price war with one another. Shop A started selling bread for 1 credit. Shop B responds by selling at 0.95 credits. Goes on for a few rounds, and each time shop B is sure that shop A can't beat his price any more, the price goes down again.

Eventually one of them decides they're losing too much money on the war (selling too far below cost) and calls a truce. He asks the other guy: "how did you manage it? I couldn't buy bread for below X credits. How did you manage it?" The reply: "I was buying it at your shop"

0
0

Apple's anti-malware Gatekeeper still useless: Security bloke reveals lingering holes

Frumious Bandersnatch
Silver badge

gnasher, you didn't understand the vuln. Gatekeeper only verifies one blob (the vendor-provided bit) but if that blob depends on external libs, you can bundle up a valid, signed blob along with a malicious version of the external libs. Gatekeeper only validates the blob and when the application is run it calls the malicious libs and the machine is hacked.

You say it's not a problem, but it is. All I have to do is put a blog post saying that company XYZ has released a new version of the app and provide a link to a tainted bundle. Gatekeeper will tell you that the protected blob part is valid and you'll be none the wiser that something bad happened.

I'm not 100% sure about how the "bundling" happens, but in terms of an analogy, it seems to be like providing a signed RPM or DEB package on Linux, but only signing the files to be installed while allowing arbitrary, unsigned install scripts to be included, leading to ownage.

10
2

The Bong Diaries, Pt.94: Bowie, Martha... and where's my knighthood?

Frumious Bandersnatch
Silver badge

Re: Shirley

you mean Gary Numan?

And "My Life in the Bush of Ghosts" was Eno and David Byrne.

So confusing. At least the pic of Bowie as Tesla (in The Prestige) is right.

0
1

Optimus Prime goes under the hammer

Frumious Bandersnatch
Silver badge
WTF?

Merkins say the darndest things

But how they decided (I presume) to call the thing in the first two photos a "tractor trailer" just boggles the mind. Not a tractor, not a trailer, so yeah, let's mash it up and call it a "tractor trailer".

7
2

Australia considers mass herpes release for population control

Frumious Bandersnatch
Silver badge

Re: Close your eyes and make a wish

If you ever get malaria, blame a hippy.

I offer: resistance.

Maybe kills 99.9% of nasties, but it's the ones that it doesn't kill that will breed and pass on their genetic windfall..

1
0
Frumious Bandersnatch
Silver badge

Re: Close your eyes and make a wish

If you're trying to clear a small island of large animals, you can shoot them, basically unforseen horrific consequence-free.

I'm not sure about that. I know you're talking about a very narrow case, but common sense dictates that there will be two immediate knock-ons:

* species that were in direct competition for similar foodstuffs or territory will expand to fill the vacated niche(s)

* prey species will also undergo population growth if their primary predator is removed

You can also get various symbiotic relationships where something depends, directly or indirectly, on the presence or activities of some high-level predator.

Saying that eliminating one large animal species is "consequence-free" is very short-sighted and not at all right, IMO.

2
1

Stephen Hawking reckons he's cracked the black hole paradox

Frumious Bandersnatch
Silver badge

Re: Other ways to preserve information

I'm giving you a thumbs up, AustinTX. Not because I think you're right, but because I don't believe you should be penalised for showing some imagination. It would have been nice if your downvoters explained the flaw in your reasoning (something to do with future light cones, I'd guess) but they've decided to ridicule you instead.

Personally, I don't know enough about physics to know which theories about information loss in black holes make sense and which don't, but it still doesn't stop me thinking about it. I don't think that white holes can work (we've never seen them), but what about the idea of black holes being a source of dark energy/dark matter? I think you'd need a few things:

* for the event horizon (or internal structure close to it) not to be smooth, but to encode information about things that have fallen in

* for that state to be updated over the life of the black hole

* for there to be some correlation between the Hawking radiation that's emitted and the things that fell into the hole in the first place

I don't understand how gravity works, so I don't know if information could be preserved using it alone. It probably wouldn't work because various conservation laws would be broken.

So my thinking, which is probably just as invalid as yours, is along the lines of:

* information encoded near the event horizon acts like a diffraction grating

* information spread out holographically across a large expanse of normal space/time

* spacetime around event horizon probably has to have a fractal structure

* underlying field equations have to go from using complex numbers to quaternions

* non-commutativity of quaternions never becomes an issue for normal matter in normal space, but adds a "twist" near singularity

* virtual particles travelling through "q-space" show up as dark energy/dark matter

* "twists" between normal matter/energy and dark matter/energy only happen near singularities

My idea is that as paired particles are created near the event horizon, one of them travels through normal Euclidean space, while the other goes through this "q-space". To preserve various censorship principles, anything travelling through the q-space would have to teleport to a point so far away, in space and time, that it shouldn't be possible to correlate inputs to outputs without taking infinite time. Eventually, though, all virtual particles will meet up with their twins again. It's just that they have to take different routes, through q-space and/or dark energy matter forms in the interim.

With all we don't know about the Universe, from dark matter to inflation, maybe someone more clever than me could come up with the maths to unify everything in a quaternion basis...

(downvotes expected :)

3
0

BBC risks wrath of android rights activists with Robot Wars reboot

Frumious Bandersnatch
Silver badge

apex predators

Not sure how "fresh" they could make this given that, apart from minor tweaks, the top predator slots have all been established at this stage. So despite some technological advances (or at least more people coming at this via Arduino and Pi rather than RC), the metagame is still going to be like it was before: wedge vs spinning disk vs puncturing/smashing/crushing.

Maybe one thing that could be done would be to have "power-ups" like in Wipeout. The first to roll over a lit power-up tile would get some sort of bonus weapon like:

* releasing a bowling ball

* giving partial control over a house bot

* pistons or conveyor belts

* temporarily jamming another player's controller

* raising sunken bollards

* activating ramps or platforms

* etc

Basically if evolution of the bots has slowed/stopped then maybe evolving the arena is the way to go.

Another way to go might be to vary the games so that it's not all about destroying the other bots. You could have rounds based on stuff like a slalom course, circuit racing, robot football and maybe some autonomous challenges (no RC). Take out the destructive element, though, and it's less Robot Wars and more something like Scrapheap Challenge or The Great Egg Race. Hardly likely to appeal to purists.

8
0

200 experts line up to tell governments to get stuffed over encryption

Frumious Bandersnatch
Silver badge

A Cross Tick!

When enterprise solutions hawk onanism-uncovering lifetime data.

Always less legal under standard ethics. Save that eejit gangs

and narco organisations generally reveal aught per habitual Yank

network-overlord wanking?

0
0

David Bowie: Musician, actor... tech admirer

Frumious Bandersnatch
Silver badge

Re: Moo, moo, electric moo...

But it's saddening that in this world where so much is ripped off, processed and repeated ad nauseum that another original is now lost to us.

Sounds kind of like Bowie's music, apart from the "repeated ad nauseam" part. Before the downvotes, I mean that in the sense that "good artists copy, great artists steal". Bowie was famous for "stealing" all kinds of musical influences (and non-musical, like Brian Gysin's "cut-up" technique) and making something unique and new out of it.

A case in point: it only struck me only a few months ago that Bowie had actually done a drum n' bass (-inspired) album: Earthling. In retrospect it should have been obvious, but despite many listenings I'd never pigeon-holed it into any particular style or genre---it was just pure Bowie.

Definitely a great artist, with an amazing legacy. RIP.

14
0

T-Mobile US boss John Legere calls bulls*** on video throttling claims

Frumious Bandersnatch
Silver badge
Headmaster

Re: When Unlimited != Unlimited

Before someone insults me ...

Not at all. Gets up my nose, too. Phrasal verbs need to be verb + space + preposition, not these franken-verbs. I will not "setup" your computer or tell you how to "login" (or any of numerous other abominations that "computer" folk seem to think are OK).

0
0

Did North Korea really just detonate a hydrogen bomb? Probably not

Frumious Bandersnatch
Silver badge

Time to dust off

the classic "Protect and Survive" booklet?

0
0
Frumious Bandersnatch
Silver badge

Re: unbombified?

Not a hope

Oh well, was a thought anyway. I guess I'll have to retake Bondesque Villainy 101.

3
0
Frumious Bandersnatch
Silver badge
Mushroom

unbombified?

Let's say that you don't actually want to make a self-contained bomb, but do want the right type of explosion. Wouldn't it be easier to rig up some cannons (or rail-guns, but ignore that) containing non-critical fissile material, point them all at a target (which may include a second-stage mechanism intended to achieve fusion) and then synchronise all the shells to fire at once. It should produce the same effects as an equivalent bomb (and will probably be easier to rig than precisely-shaped charges) but probably a lot easier to set up.

Of course, the easier way to fake this would be to set up your lab near a fault line, then wait for an earthquake of sufficient magnitude and claim that you caused it, after the fact.

What does that icon do again? --->

1
7

AMD to nibble the ankles of Nvidia this summer with 14nm FinFET GPUs

Frumious Bandersnatch
Silver badge

Re: H/W vapour and too damned late, probably still with poor drivers.

Getting this 1/2 size shrink

<pedant>halving the side of a square means one quarter of the area, not a half</pedant>

1
0

Periodic table enjoys elemental engorgement

Frumious Bandersnatch
Silver badge

eleventy

three-um to eight-um. Who, ah, um, needs Latin?

1
0
Frumious Bandersnatch
Silver badge

Dallascorbinium?

4
0

2016 in mobile: Visit a components mall in China... 30 min later, you're a manufacturer

Frumious Bandersnatch
Silver badge

Re: Andrew !

"... it doesn't look like the (?) of design, either."

acme?

0
0

Beyond iTunes: XML boffins target sheet music

Frumious Bandersnatch
Silver badge

Re: Another alternative to XML

Also LilyPond.

0
0

The Infamous Eight: 2015's memes, themes and big pieces

Frumious Bandersnatch
Silver badge

"146-character-driven culture"?

What's that number? SMS allows 140 bytes, which can pack in 160 7-bit ASCII values and Twitter kept the same 140-character limit, after a fashion (apparently it uses UTF-8 and counts characters rather than bytes).

0
0

Software bug sets free thousands of US prisoners too early

Frumious Bandersnatch
Silver badge

Re: Idiocracy pretty much nailed it [to a cross?].

Joe Bauers> [...]

"nicked" from The Life of Brian, I'd guess.

On another note, I wonder if there are any overflow bugs lurking there? Anyone think that an 8-bit unsigned value is enough to hold the "years_left" field?

5
0

Feds widen probe into lottery IT boss who rooted game for profit

Frumious Bandersnatch
Silver badge

and people wonder why we complain about voting machines

Sure, if you hack the lottery you might get a million here or a million there, but that's peanuts compared to the potential payoff from fixing an election.

edit: didn't notice m7s's similar post when I wrote the above...

10
0

Secret shaggers, rejoice! Now you can blame that Hyatt credit card bill on hackers

Frumious Bandersnatch
Silver badge

Quantum of Solace

Thanks, El Reg. Explaining right now to the missus how the many-worlds interpretation of quantum mechanics works. Specifically, how virtual particles (ie, receipts that purport to show a parallel me booked for a liaison in a certain hotel) can spontaneously (and with no intent on my part) be created and impinge in our classical universe.

Fingers crossed ...

5
0

Death Stars are a waste of time – here's the best way to take over the galaxy

Frumious Bandersnatch
Silver badge

reminded of ...

https://en.wikipedia.org/wiki/Kardashev_scale

(rating technological level of space-faring civilisations mainly based on available energy)

2
0

Facebook hammers another nail into Flash's coffin

Frumious Bandersnatch
Silver badge
IT Angle

Re: "being able to apply changes directly in the browser allow us to move fast"

I always cringe when I hear IT people talk about moving "fast"

Agreed. As that guy who recently won an MMA title fight said, "timing beats speed, precision beats power."

0
0

EU reforms could pave way for smells and noises to be trade-mark protected – expert

Frumious Bandersnatch
Silver badge
IT Angle

not one mention yet

of that new Thinkpad smell? Or do they not make them like that any more?

0
0
Frumious Bandersnatch
Silver badge

Re: Eki eki eki patang zoo poing zzraazrroohhhh... NI!

Ying tong yiddle I po!

0
0

How to build a real lightsabre

Frumious Bandersnatch
Silver badge

Best Star Wars parody, IMO, is from Crayon Shin Chan. Here is the Lightsabre battle clip.

("to be a man you must have honour---honour, and a peeenis")

0
0

Lettuce-nibbling veggies menace Mother Earth

Frumious Bandersnatch
Silver badge

straw man (literally)

Without seeing the actual paper, with formulas and such, it's impossible to refute the article. I think that I can make some educated guesses, though.

There's a lot of pseudo-science and wishful thinking around so-called "organic" farming, but one thing that does seem to be backed up by actual science is the idea of "Biointensive" farming. One of the major planks of that is the ratios of different crops, eg:

  • 60% carbon crops (produce a lot of biomass for composting, as well as some calorific value; eg, wheat, corn, grains)
  • 30% calorie crops (eg, potatoes)
  • 10% vitamin/mineral crops (eg, tomatoes, lettuce, Brassicas)

If this works (and let's say for the sake of argument that it does) then there are two things that immediately come to mind.

First, lettuce and such things aren't a good thing to be focusing on in a comparison. They essentially don't provide any calories, and so are a very inefficient use of land. We still need them, but they shouldn't be seen as the major part of a diet.

Second, all that livestock needs to be fed. It may be that animals are better at converting raw materials into meat. If that were the case then it might be more efficient to feed the crops to livestock and thus convert them into meat for us to eat. I'm not sure that that case can be made, though: I'm pretty sure that eating corn-fed pig is less efficient overall than eating the corn yourself. The other thing about passing crops through animals with the intention of eating them is that various livestock can eat things that are either indigestible(1) or unpalatable to us (or just unfashionable; it can be a cultural thing where we consider certain perfectly good foods as being only fit for animals, eg brown rice in Japan, maize and other "fodder" crops). If you look at the sorts of things that pigs or geese will eat, it strikes me that this (eg, geese converting slugs, among other things, into meat and eggs) is a more convincing argument for being a carnivore than any argument about how efficiently animals can convert the same raw food stuffs into meat.

Where I'm going with this, I strongly suspect that the comparison the paper makes is between an inefficient human diet based mainly on low-calorie, high-effort stuff like lettuces and a much more efficient one used for raising animals. In fact, I'm nearly willing to bet that the kind of integrated farming system that the paper has in mind for raising livestock is probably going to follow the ratios I mentioned above. So I suspect that it's really an apples/oranges comparison: basically assuming that humans and pigs have different dietary needs (which we don't, really) then using a really bad food production model for our diets and a really good one for the livestock.

So basically, if we had access to the paper and could do a proper apples-to-apples comparison, we'd probably find that it supports the ideas of a vegetarian diet (and probably biointensive farming) rather than the opposite.

PS 1: I'm deliberately glossing over livestock that eats only grasses since we're mainly talking about pigs; sometimes land is only fit for grazing, though

PS 2: I'm not a veggie or a hippy

7
0

Gamer ransomware grows up, now infecting UK, Euro businesses

Frumious Bandersnatch
Silver badge

Re: Details

Upthumbed.

Infecting all (eg, Linux, Mac, BSD) machines would be impressive. Accessing available Windows network shares, not so much.

2
0

Microsoft to OneDrive users: We're sorry, click the magic link to keep your free storage

Frumious Bandersnatch
Silver badge

Re: Cloud - Isn't it such a lovely, comfy place to put stuff...

MS handling of the situation has been bad though.

Maybe, maybe not. They wouldn't be the first to discontinue a free storage service. "Ubuntu One" went away last year.

2
0

National Crime Agency: Your kid could be a nasty interwebs hacker

Frumious Bandersnatch
Silver badge

Re: Signs for Parents

Does your child answer "yes" when asked "do you like daddy or chips?"

2
0

Forums