Results 1 to 4 of 4

Thread: Cross site javascript privileges and bookmarklets

  1. #1
    Join Date
    Feb 2007
    Location
    England
    Posts
    254
    Thanks
    0
    Thanked 5 Times in 5 Posts

    Default Cross site javascript privileges and bookmarklets

    What privileges do you have when you enter javascript into the address bar?

    Does this change when it's a bookmarklet?

    What about adding a local script from a bookmarklet - does this occur as a cross-site script?

    Does greasemonkey alter this? If so how? Does it just allow cross-site scripting for greasemonkey scripts or does it inject it into the page?



    Just trying to alter a company document collaborator to add functionality.

    Thanks in advance

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    I don't know what a:

    Quote Originally Posted by Bob90 View Post
    company document collaborator
    is, unless it's someone you work with. I can tell you a bit about pasting javascript into the address bar. As long as it is syntactically correct and refers only to actual objects (in the global scope) on the page, it will work. Anything that you do there (or via a bookmarklet) will happen in the global scope. So, you will not be able to access or define variables that are defined and accessed only within the limited scope of a function already on that page. But if that function is itself in the global scope, you can replace it, this may have unexpected consequences though.

    None of this has anything to do with cross site scripting, which I don't really fully understand, but has something to do with actually injecting javascript onto a page by using a non-standard link to it. I believe a page must first have a vulnerability to this though, at least before anything of use to the person attempting to cross site script can be had for the effort.

    Cross site scripting is generally nefarious, as is javascript injection through comments in things like guestbooks. There are various methods and good practices to employ in preventing both these threats.

    Perhaps if we knew more about what you wanted to accomplish, we could be of more help.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Feb 2007
    Location
    England
    Posts
    254
    Thanks
    0
    Thanked 5 Times in 5 Posts

    Default

    I think I mean cross-domain scripting more than XSS vunerabilities. I'm going to read up some more about it.

    The basic idea is to log on to a document collaborator, like 'Aconex', 'Cadweb', or 'Business Collaborator', and to add functionality on top of what exists using javascript:
    Hide items to clear the GUI,
    Reduce frame size,
    Allow resize,
    Add search functionality,
    Add function to highlight search terms,
    Allow easy javascript RegExp search of pages.
    Add quick filters.
    maybe more.

  4. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Sounds ambitious. Bookmarklets should work for at least some of those things, and there may even be some around that will either do the job in some of those cases or be adaptable. Google bookmarklets.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •