cellio: (sleepy-cat ((C) Debbie Ohi))
[personal profile] cellio
I just got mail from Amazon.uk telling me that the third series of 24 is being released in a couple weeks. Now I know that sometimes a "series" in the UK doesn't equal a "season" in the US, and the third season just finished here, so that made me wonder if the UK edition is breaking up seasons the way they did for West Wing early on. Near as I can tell, no. The final episode aired in May and the DVD for the season is available in August. How strange! (I'm assuming that this is a US show, not an import here, as it is a very US-centric show, but Amazon.com has nothing to say about the third season on DVD so far.) Not that I'm buying yet anyway; I just find it curious.

(Noted in passing: fourth season of West Wing in September; second season of Blake's 7 allegedly in October.)

I sometimes wonder about the security implications of the quizzes and other memes that run around LJ. Consider: your passowrd is (I think) stored in a cookie. You follow a link while reading your friends page (so you're probably logged in) to some unvouched-for site where you give your user name as part of getting some bit of content to post in your journal. I don't know a lot about cookies, but isn't it fairly straightforward for a malicious meme-writer to harvest your password that way? I try to never fill those things out while logged in, personally. (Yes, I do sometimes fill them out, out of curiosity -- the ones that are likely to have interesting content, like the mind map and the friends-list-evaluation ones, not the "what kind of eggplant are you?" ones.)

The two instances of Giant Eagle that I shop at seem to have both stopped carrying my cats' favorite food (Tender Vittles). While googling to try to find out if the product had been discontinued (no one at the store seemed to know anything), I found a place where I can mail-order it by the case for about what I normally pay for it. Ok, that works. Gee, I wonder if I can mail-order the cat litter under similar circumstances, rather than shlepping it home from the store myself? I'll have to try that.

This afternoon I attended a bridal shower for a friend. I so do not know how to be a girly girl. :-) It was a fun time, but there was a lot more estrogen in the air than I'm used to.

(no subject)

Date: 2004-07-25 07:55 pm (UTC)
siderea: (Default)
From: [personal profile] siderea
No, your password is most certainly not stored in a cookie! When you submit your password, if correct it plants a "I have been logged in" cookie. The "I have been logged in" cookie is usually for this sort of thing an encrypted string, to which the server (LJ) has the key. Each time you ask for an LJ page, you send the cookie along. It decrypts the cookie, and checks if it is valid. Usually, in such applications (don't know about LJ for sure), the encrypted message in the cookie will contain or point to information which says "this unique cookie is only valid if coming from thus and such IP number and during thus and such span of time." It's checked against those parameters, and if it's all good, serves you the page.

So if the cookie is stolen, it's not easily used, possibly not usable from any other computer.

Also, most broswers these days have a setting or simply a limitation that they will not send a cookie to any server except the one which sent it. So if JRandomServer.com says "Show me your LJ cookie", your browser will probably ignore it.

(I believe that IE allows you to set it into promiscuous mode, "sure, share my cookies with anyone who asks.")
Å

(no subject)

Date: 2004-07-25 08:08 pm (UTC)
From: [identity profile] tangerinpenguin.livejournal.com
Corollary: if the site is using JavaScript, which runs on your browser, the script can (immediately) take advantage of your authenticated cookie state to do something. This is how the "Russian Sausage" meme from a month or two ago posted itself to your journal for you, which wound up disconcerting a lot of people. That is a vulnerability, because a suitably hostile script could download your private entries or maybe change your password (does that require you to re-enter the password? I think it does, in which case the script couldn't exploit it) or somesuch else while it had your session to work with, but it's limited to what it can do right now and would be a lot more likely to be detected.

(no subject)

Date: 2004-07-25 08:51 pm (UTC)
siderea: (Default)
From: [personal profile] siderea
That is a vulnerability, because a suitably hostile script could download your private entries

Er, to the best of my knowledge, Javascript can't be used to fetch a document and send it somewhere. (VBScript and ActiveX, all bets are off). Javascript can navigate your browser window somewhere, but I don't think it can download to your machine, nor to send a copy of a retrieved webpage someplace else. So, no, I don't think you could read private entries that way.

To be clear: Javascript runs "in the document"; there's no concept in the language as instantiated on client-side (browsers) of standing outside a document to manipulate it. Client-side javascript has, to my knowledge, absolutely no HTML-capture mechanism!

or maybe change your password (does that require you to re-enter the password? I think it does, in which case the script couldn't exploit it

Yes, LJ requires you to re-enter the old password.

Hmmm. Now you have me brainstorming JS security hacks.

Howzabout: If you can get the user to load a malicious JS into their page (social engineering), which, on-load, asks for the value of an LJ authentication cookie and writes that into an input of type hidden, and on exit, POSTs that cookie to a malicious server. Server now has a cookie of your LJ authentication cookie and your IP number. Malicious server owner now spoofs their IP number (don't know how hard this is) and declares itself to be you, under the reasonable presumption that the LJ authentication token maps to IP number. You are then logged in as that user for as long as the cookie is valid.

This would be foiled by the cookie being browser-specific, which may be (*should* be) the case. This is, I suppose, easily testable (though not by me from home) by copying the entry in one's cookie file into the cookie file of another browser, and seeing if you're suddenly logged in in that browser, too.

OK, here's something that might allow some evil:

Get user to embed the malicious JS. On page load completion, it redirects to a page that is essentially a GET to the malicious server, with a single parameter, the URL of the previous page (with the embedded malicious JS.) What the server's response to the GET is (and this is easy) is to serve a frameset page with two frames, one of width=1 (hey, does "width=0" work?) containing an HTML of the server owner's choice, and the other width=* containing the previous page. Now, what the user is looking at looks identical to what they were looking at before, but it's in a frameset on someone else's server. The location bar will reflect the real server you're on (or is there a way around that?) but most people don't watch that.

Now, does that allow anything interesting in the arbitrary HTML of the framset or the width=1 frame contents? Those can contain JS, which now can learn things about whatever is going on in the other frame, maybe?
s

(no subject)

Date: 2004-07-25 10:13 pm (UTC)
From: [identity profile] cahwyguy.livejournal.com
Consider also the value of the information. If my LJ pwd was stolen, it's probably not a big deal, especially as I know it still works. So, if I saw something untoward, I could just change my password and delete the entry.

(no subject)

Date: 2004-07-26 12:02 am (UTC)
From: [identity profile] tangerinpenguin.livejournal.com
That is a vulnerability, because a suitably hostile script could download your private entries

Er, to the best of my knowledge, Javascript can't be used to fetch a document and send it somewhere. (VBScript and ActiveX, all bets are off). Javascript can navigate your browser window somewhere, but I don't think it can download to your machine, nor to send a copy of a retrieved webpage someplace else. So, no, I don't think you could read private entries that way.

Good point. On closer thought, I can't find a way to make this specific exploit work. I think you're on to some better examples with your brainstorming, although it's hard because LJ tries very, very hard to filter JS out of the user-modifiable parts of the journal for just that reason.

Try this: a server-side process reads your userinfo (which it can do based on your username) and dynamically generates a variation on the post-a-message-as-you javascript that submits the Modify Info form, with obvious data like the info block and interests populated from the old userinfo but with several of the privacy settings (obfuscate email, no spider indexing) quietly set to most open. That's comparatively minor (it would really only make sense to mess with the email settings if your email was at least partially visible already, or the server-side process would have nothing to work with) but might lead to some low-level chaos - if hundreds of people run the meme, at least a few "hits" where it actually caused problems for someone would be likely.

(no subject)

Date: 2004-07-26 05:10 am (UTC)
ironangel: (Default)
From: [personal profile] ironangel
both petsmart.com and drsfostersmith.com ship pet supplies. petsmart.com has some sort of refill program that automatically sends food on a regular basis. don't know if it works with cat litter, too.

(no subject)

Date: 2004-07-26 06:22 am (UTC)
geekosaur: orange tabby with head canted 90 degrees, giving impression of "maybe it'll make more sense if I look at it this way?" (Default)
From: [personal profile] geekosaur
Er, to the best of my knowledge, Javascript can't be used to fetch a document and send it somewhere. (VBScript and ActiveX, all bets are off).

It can fetch a document in any of several ways, including creating or hijacking a (possibly invisible, at least in some browsers) frame and loading it with the document; it can generate document content on the fly by assigning literal text to the "document" attribute of a frame or to HTML blocks within it; it can POST forms in loaded documents. Combine these, and malicious JS can retrieve a private entry, then POST it to a waiting site. This is the basis of "cross-site scripting" (XSS) exploits.

There are limits to what can be done via XSS, since browsers do in general try to limit the ability of frames associated with different sites to pass information between each other, but I believe it's not fixable in the general case (at least, not while sites expect to be able to load other sites in frames so they can provide their own navigation mechanisms). In particular, XSS subverts IE's attempt to maintain "security zones" for different sites.
The location bar will reflect the real server you're on (or is there a way around that?)

Supposedly not in Mozilla; in IE, there were (now patched) historically several ways to do it, some of which periodically get regressed (like embedding a control character in the URL, %00 and %01 having been especially troublesome in the past). Recently some malware sites actually managed to overlay an authentic-looking replacement location bar which showed whatever they wanted it to.

JavaScript essentially is not sandboxed (at least in IE) and has access to pretty much everything in the browser; while it in and of itself may not have commands to perform arbitrary actions, it can command the browser to do anything and it can invoke other mechanisms (Java, VBScript, ActiveX controls, ...) that may be available to the browser.

clarification

Date: 2004-07-26 06:52 am (UTC)
geekosaur: orange tabby with head canted 90 degrees, giving impression of "maybe it'll make more sense if I look at it this way?" (Default)
From: [personal profile] geekosaur
This is the basis of "cross-site scripting" (XSS) exploits.

This is the basic mechanism; the basic "trick" is trying to convince the browser to execute arbitrary JavaScript with greater access than it normally would have, ideally convincing it to execute the JS as if it were the browser's own code but more commonly (barring certain IE bugs) tricking it into thinking that JS from a malicious site came from a more trusted site with more access. IE's "security zone" implementation tends to make this really easy, because there are so many holes in its checking.

To be clear: Javascript runs "in the document"; there's no concept in the language as instantiated on client-side (browsers) of standing outside a document to manipulate it.

In theory. In practice, JavaScript is the "glue" that holds the browser together[*], so it does stand outside of the document. Browsers are supposed to "sandbox" JavaScript from outside sources so that it can't affect global browser state or documents from different sites, but all too often the sandboxes "leak".



* It's more complex than this, but basically true: if arbitrary JavaScript can escape the sandbox, it gains full control over the browser — and even limited escape grants it too much power (cf. the recent Application.Shell exploit which affected both IE and Mozilla).

(no subject)

Date: 2004-07-26 06:59 am (UTC)
From: [identity profile] cahwyguy.livejournal.com
I see your point. THat's what I get for posting late Sunday when I'm exhausted.

Girly girls

Date: 2004-07-26 11:40 am (UTC)
From: [identity profile] dagonell.livejournal.com
This afternoon I attended a bridal shower for a friend. I so do not know how to be a girly girl. :-) It was a fun time, but there was a lot more estrogen in the air than I'm used to.

My wife is not a girly girl either. As a matter of fact, she no longer gets invitations to any parties hosted by the Queen of Estrogen, She-Who-Has-A-Shire-to-Martha-In-Her-Bedroom. :D This is not altogether a bad thing. :)
-- Dagonell

Re: Girly girls

Date: 2004-07-27 05:07 am (UTC)
goljerp: Photo of the moon Callisto (Default)
From: [personal profile] goljerp
She-Who-Has-A-Shire-to-Martha-In-Her-Bedroom

Wow, a whole land of Hobbits, all worshiping Martha. I'm guessing that since this is in her bedroom, it's got to be on a fairly small scale... but if you go too small, it's tough to see the floral arrangements in their little burrows. :-)

Re: Girly girls

Date: 2004-07-27 07:33 am (UTC)
From: [identity profile] dagonell.livejournal.com
Sorry, that should have been 'Shrine'. :(

Expand Cut Tags

No cut tags