Bounty Proposal: Increase RISC OS Security
Eric Rucker (325) 232 posts |
Oh, now that is hilarious, citing !Store as a way to improve platform security. (An exercise for the reader: Buy something from !Store while monitoring the traffic with Wireshark. I’d recommend bogus credit card data, myself. Please note the complete and utter lack of asymmetric cryptography. Also, when you give them bogus credit card data, note that it may take hours to be rejected, which means that they are storing it, directly contrary to what !Store says about that.) It’s not trojan horses that you have to worry about, this is RISC OS, there are four of you to be attacked by a trojan. It’s vulnerabilities in the legitimate software you’re running, it’s insecure protocols that allow your traffic to be sniffed (!Store is a perfect example) or easily hijacked (again, !Store is a perfect example), that kind of thing. Really, !Store is a perfect example of the lack of security culture in RISC OS, and why outdated commercial RISC OS dev tools (that make it hard to be secure) suck. |
David Feugey (2125) 2709 posts |
No. It’s just not available in standard RISC OS 5 distribution. And not very efficient too. In one of my project, I make dynamic malloc at runtime. GCC under RISC OS is the only compiler that generate code that crashes my computer. Works well on a PC. On Acorn C too. Problems are not always on the DDE side. Tu put a sticker GCC or ELF is not enough. What about efficiency on ARM, interaction with modules, possibility to mix ARM26/ARM32 code, code compression (would help with disc I/O problems), code signature (would help with security), etc.? Of course, since it’s available, it could be a good solution. Needs checking and some study on benefits and problems. That’s my point. To say it’s available and well known so we MUST use it, is not my way to work. Windows DLL are too, and they are now a big failure. |
h0bby1 (2567) 480 posts |
aaaa |
Rick Murray (539) 13840 posts |
I think that some modules (etc) are helpers to get a job done and are not intended for third party use.
No, I’d say one of:
Or:
|
Rick Murray (539) 13840 posts |
? Why is it the compiler’s fault that the security of an application sucks? |
h0bby1 (2567) 480 posts |
aaaa |
Eric Rucker (325) 232 posts |
It’s the compiler’s fault if it makes it difficult to follow best security practices, when another compiler does not make it difficult. Also, it’s advertised as not storing your credit card info anywhere other than your computer, which is definitely wrong. And, if you’re handling payment card info, you’re required to follow the PCI DSS standards, and I’d be surprised if R-Comp’s encryption meets requirement 4 (especially considering that they’re hinting that even TLS 1.0 doesn’t meet it, as of the PCI DSS v3.0 docs). |
h0bby1 (2567) 480 posts |
aaaa |
Malcolm Hussain-Gambles (1596) 811 posts |
You are not required to follow the PCI DSS standards, but if you don’t you may get either hammered with huge costs or refused by your merchant bank to trade. I don’t know anything about !Store, but I’m not sure why you are saying it’s “definitely wrong”, unless you’ve got access to the server side code – which I don’t. |
Eric Rucker (325) 232 posts |
OK, they may have someone else storing the data, point there. But, that does mean the data is being stored SOMEWHERE other than your machine, making at least one statement inside !Store false. But, well, this is a raw packet from the thing: http://bhtooefr.org/files/PlingStorePacket.txt The card data in that packet is COMPLETELY bogus, so I’m not revealing anything sensitive by posting that. I’ve also got a good guess as to what the secret that that was encrypted with was, from running strings on the unsquashed binary. (Cryptography isn’t something I’m skilled with, though, so I haven’t figured out how it’s actually encrypted yet. It’s obviously in Base64 right now, but the only thing that’s human readable after decoding it is my username backwards.) That packet was sent in the clear though, and I doubt that R-Comp was using any particularly good encryption. I would be quite surprised if that passed a “strong encryption” test. |
Andrew Conroy (370) 740 posts |
What did R-Comp say when you discussed this issue with them?
I’d assumed that meant that the details were only stored for long enough to process the transaction (which could be done manually on a terminal when someone gets time to process your order/checks stock availability, not automatically), not that the details were not stored at all. If the receiving server didn’t store your details at all, even for long enough for the transaction to process, then there’s no point in sending them. |
Steve Fryatt (216) 2105 posts |
Will it? If Eric’s right in his guess that !Store is just delivering the card info to someone’s computer for them to manually put through an offline terminal, would the merchant bank even need to be aware that !Store existed? Note that’s not should they be aware, but would they necessarily find out if they weren’t told about it for whatever reason? |
Steve Fryatt (216) 2105 posts |
I’m not sure that has much to do with dynamically linked libraries?
Was your code OK? It’s quite possible to write buggy code (eg. buffer overruns, assumptions about pointer validity, etc) that just about works on some settings of some compilers and breaks on others. I’ve written duff code that works fine on GCC -O2 but fails spectacularly when -O3 is applied, for example. Something small I wrote the other day worked fine when compiled with GCC but crashed the machine when compiled in Norcroft. Unsurprisingly, when I looked closer, my code was buggy.
I believe that GCC is now regarded as generating fairly good code (whereas it once wasn’t).
GCC can do modules, AFAIK.
NetSurf’s binaries are squashed these days, for just that reason. That’s done on the Linux build machine. |
David Feugey (2125) 2709 posts |
No. That was an introduction for this: “problems are not always on the DDE side. Tu put a sticker GCC or ELF is not enough.” Anyway, this thread is not really about shared library either.
Here is an example. Pure ANSI C. char **ElementsInFile = NULL; Works in Windows with TCC & GCC. Works on Linux with GCC. Works on RISC OS with Acorn C. Works with GCC on RISC OS too. Now if I make this: char **PoolString = NULL; for (x = 0; x !=y; x++) So a malloc with size defined at runtime (one more time, it’s pure ANSI C). It works on all the above compilers, but GCC 4 on RISC OS. I check asm code, and I suspect the use of static size defined at compilation for the size of the malloc (or something closed).
Yes, it is. But ‘is now regarded’ is not enough for me :)
Hum, I was talking of the shared library system. If it doesn’t interact with other RISC OS mechanisms, or if it do not provide features that could help RISC OS becoming better (signed code, multiple versions of code [softfloat+hardfloat in same binary], compression, etc.), it’ll just be inadequate.
Cool. But is this feature managed by the elf container, or the application itself? Damned: TCC does not work under Win64. It seems to link 32bit code to 64 bit libs. It’s really time for me to go back to RISC OS :) |
Rick Murray (539) 13840 posts |
I think you’ll find quite a lot of traditional programs do not mention this sort of stuff. Case in point – SMPlayer(MPlayer) and VLC. They play videos. Lots of info on video playback methods. In order to be fast I would reckon there’s some fairly low level stuff going on somewhere in there. Both can also stream off the internet. Is that their only access? It won’t ever send system statistics like a list of installed programs and your Microsoft licence keys? How do you know? How could you tell? The best we can do is get our stuff from reputable sources and trust that the developers won’t try something slimy like that. You have a more cohesive permissions system on mobile devices (iOS and Android for example), but this is often worked around by being a trojan and tricking hapless users into giving too many rights to a bad program. Or just totally lying about what you want and what you need it for. So even with some sort of security, it is not much good if it isn’t an important thing in the user’s mind.
The answer is, obviously, not. As in, do NOT install it. But, RISC OS is not even remotely secure, so there’s no problem then. ;-)
Yes: http://www.theregister.co.uk/2015/02/26/plugin_puts_a_million_word_press_sites_at_risk_of_compromise/ But, sometimes the tools are faulty: And sometimes the service itself is faulty: And sometimes it is just really dubious stuff:
The best security is quite easy: Unplug the internet and only run software you believe you can trust.
That’s possibly the only thing that prevented malware-modified versions of Linux. http://www.theregister.co.uk/2011/08/31/linux_kernel_security_breach/ The site kernel.org was hacked (in 2011), the intruders gained root access, passwords, and so on, but it looks like the files themselves were not compromised; though I wonder if somebody somewhere isn’t trying to come up with a way to try to make it work…? But. All those keys and hashes fail to assure security. They only assure that what you downloaded is what the originator of the file put on the site. It says “yes, this is the same file” not whether or not the file is any good. Again, we’re back to the question of trusting… well… trusting trust itself, I guess. |
David Feugey (2125) 2709 posts |
The best is to use Android. Perfectly secured OS, with 98% of applications that steal your personal data. And nobody cares. |
Rick Murray (539) 13840 posts |
Quote: All information will be stored and submitted in an encrypted format, and is stored only on this computer, not on the server or anywhere else. It says quite clearly not on the server or anywhere else. Obviously this is wrong, for two reasons. Firstly it has been observed that there can be a delay in processing the data, and also – as you point out – to not provide the data somewhere would render it somewhat useless. There is a reason people like using PayPal for receiving payments. Safely handling credit card information is not such an easy task.
If there was a suspicion of fraud, the card processor and/or the bank would potentially want to examine the entire transaction chain to see where any faults may have arisen (and, of course, to shift the blame/liability somewhere else). Description of the PCI DSS → http://www.theukcardsassociation.org.uk/security/what_is_PCI%20DSS.asp 1 Which is why my bank would follow that up with an SMS saying who wants paid, how much, and a unique code to enter into a form to authorise the payment – and a window of 180 seconds in which to do it. If !Store can’t support that (ha ha, as if!) then I’m afraid my card just won’t work to buy stuff in a “customer not present” sense… |
Rick Murray (539) 13840 posts |
No such thing.
I wouldn’t know. If an app shows itself as wanting any weird permissions, it doesn’t get installed. I did come across a “turn on the LED to be a torch” app that wanted to access contacts and SMSs. Some fifty thousand bleating sheep had installed it. I wasn’t one of them.
“The Apathy is strong in this one” Yeah. Too many people don’t realise, and too many people already post their private stuff to Facebook so probably won’t care. My mother has a penfriend who works in a government place. I recently saw the names and email addresses of dozens of co workers, and also some of their private email addresses (same name, non-gov email). How? Simple, the instruction given to the machine was surely “send this generic (pointless) wow look at this email to EVERYBODY in my address book in such a way that everybody’s addresses can be seen by everybody else”. Security 101! Use To: and CC: for close friends that know each other. To spam an entire address book… just don’t. But if you really must (no, you are mistaken, you don’t need to!), either use software that will sent individual messages or send it to yourself and add the world to the BCC line. |
Malcolm Hussain-Gambles (1596) 811 posts |
The bank stores your card data, I would assume RComp didn’t mention that as it is assumed that most people would figure that one out. So what you can do is authorise a transaction, then decide whether to release the transaction for payment or to alter the payment (usually send a request to invalidate the auth so the payment doesn’t take place, or an immediate refund if you can’t invalidate the transaction) If you’re really interested there are a bunch of standards you should read And finally yes they would be aware that !Store existed, you have to declare it AFAIK. Of course if you can hack the encryption on the card details field, then you may have something. |
Ronald May (387) 407 posts |
GCC can do modules, AFAIK.I think the Linux thing is to build the software so it is tuned for your particular machine rather than distributing ready made apps (though they do sometimes)Hum, I was talking of the shared library system. If it doesn’t interact with other RISC OS mechanisms, or if it do not provide features that could help RISC OS becoming better (signed code, multiple versions of code [softfloat+hardfloat in same binary], compression, etc.), it’ll just be inadequate. The attraction for me to using a library (maybe a module?) would be to move a binary that traditionally does stdin/filein stdout/fileout there so as to avoid fork/execs to use them. Do module calls use a new process or are they like a C library? ps. Why does !Netsurf sometimes display ROOL forum double the page width? :-) |
David Feugey (2125) 2709 posts |
Yep, but elf can also contain different binaries in the same package (an almost hidden feature :) ). |
Vince M Hudd (116) 534 posts |
Because there is something on the page that is wider than normal. In the case of this discussion, it’s the raw packet of !Store data that Eric quoted; it’s a single unbroken line (no spaces) which is rather long. |
Eric Rucker (325) 232 posts |
Edited my post to make that packet a link, I had checked in the browsers immediately available to me at the time of the post (none of which were NetSurf), and while some horizontal scrolling was required to read that line, the page wasn’t broken. In any case, I didn’t see any signs whatsoever of asymmetric (public key) crypto when I was sniffing the traffic. Cryptography isn’t my forte, so I probably won’t get it broken, but I do think that R-Comp should probably consider building OpenSSL or another maintained SSL library into !Store, and connecting to their server over TLS (and, seeing as they could build against the very latest OpenSSL, and only !Store is connecting to their services and is auto-updated upon launch, they could aggressively deprecate insecure protocol/cipher combinations) at the very least. |