The common name for the language used primarily for scripting in web browsers. It is not related to the Java language. Standardized as ECMAScript, its dialects/implementations include JavaScript and JScript.

learn more… | top users | synonyms

1
vote
1answer
36 views

Can location.pathname lead to XSS?

<div id="cat"></div> <script> $("#cat").html(location.pathname); </script> I think that example would work, but anyway, if location.pathname has to be a valid page, can this ...
-2
votes
0answers
49 views

how to tell if a user has a certain product [on hold]

I'm trying to figure out how to code a function, in which, if a user has a certain online product they can gain access to an area inside my android app. All help is appreciated, Jordan
11
votes
2answers
2k views

Where do I find JavaScript malware?

I am looking for JavaScript malware. I need it just for local tests on my computer for a project I am working on. Are there any Internet resources where I could find this?
9
votes
1answer
456 views

XSS Technique - & JavaScript Include

I was looking through the OWASP XSS Filter Evasion Cheat Sheet, and there was one technique that was completely new to me: & JavaScript includes <BR SIZE="&{alert('XSS')}"> I ...
1
vote
1answer
57 views

Could I XSS a page that filters &,",< and > characters and has Content-Type set to UTF-8?

I am trying to pentest a dummy website that has a form with a TEXTAREA input on one page. When the form is submitted, the contents of the form are displayed on a second page. However, the second page ...
0
votes
1answer
56 views

Apache Server Maintains HTTPS Connection To Mysterious Server (Hijacking?)

I've been on a shared webhosting plan for 10 years and I recently moved all of my sites (various WordPress sites and associated plugins, all in PHP, a MediaWiki site, and a lot of static stuff) to my ...
-3
votes
1answer
67 views

Is it fine to run custom javascript on a site? [closed]

I have been running alot of javascript code on nike.com through the console in order to create a shoe bot. The code i paste into the console has one intense loop with many iterations which makes me ...
0
votes
4answers
102 views

Using a Public-Key-Encryption browser side to avoid PCI compliance

We're developing a web application in which certain not logged users (clients) need to send their credit card details to other users (merchants) - which, we'll assume, are PCI compliant. We are ...
1
vote
2answers
76 views

How can one find keyloggers in javascript?

Assuming no XSS and a client-side only page, how can a keylogger be identified in javascript code? Should I simply look for the id of the targeted fields and possibly some sort of DOM traversal to ...
0
votes
4answers
303 views

What are JS malware attack techniques?

Malicious JavaScript (generated by malicious hosted PHP code for example) can lead to attacks. What are the types of attack that malicious javascript could perform? Are the drive-by download attacks ...
1
vote
3answers
651 views

Is JavaScript malware as dangerous as native viruses? [closed]

Can JavaScript malware be as dangerous and damaging as more traditional viruses that are programmed mostly in native APIs?
4
votes
2answers
1k views

Could a malicious JS file pointed on URL/URI attack the browser/computer?

I found some website blacklisted on Google. I mean when you try to visit them, you get something like shown on this picture: After a small search, I found that some of them have a malicious ...
4
votes
2answers
198 views

Safety of using web based proxy?

Lets say for example I have to use a public online proxy like https://www.zend2.com to load a PHP webpage controlled by me containing sensitive data over HTTPS. How would I make sure that the proxy ...
1
vote
2answers
196 views

Online Shopping password keylogger risk

Suppose I do an online shopping they are asking me to enter my card details like four digit number(whatever related to that) and they are asking me to enter the PIN number too. If I enter all this ...
0
votes
2answers
81 views

Want to build a password manager using OpenPGP.js

I'm kind of tired of the password managers that are available around... I need one that's open source, that works on OSX, that lets me store .pem files and that I can trust. As I haven't found one, I ...
108
votes
3answers
14k views

This JavaScript code is injected on my hotel Wi-Fi: should I be worried?

While connected to my hotel Wi-Fi, visiting the URL http://www.google-analytics.com/ga.js results in the following content being served: var ga_exists; if(!ga_exists) { ga_exists = 1; var ...
1
vote
1answer
50 views

Is it safe to call an untrusted service with jquery.ajax and dataType 'jsonp'

From what I understand, the JSON-P technique generates a script tag into the DOM of an HTML page to get across the single-origin restrictions imposed on the XMLHttpRequest JavaScript API for AJAX ...
2
votes
2answers
89 views

Securing a Shuffle Algorithm

After reading about writing a secure shuffle algorithm, I realized that my module that generates a password is only as strong as my PRNG, which in this case is Math.random(). I'm confused as to how to ...
2
votes
1answer
84 views

XSS - history stealing

I am little confused about this matter. By simply writing a JavaScript code we can go through our browser history and identify visited links. It is fine. But how an attacker use this to identify a ...
2
votes
1answer
53 views

JavaScript code authenticity when loaded from 3rd party website

Background A discussion about not sourcing JavaScript files from other websites (http://www.reddit.com/r/netsec/comments/29hfhz/please_dont_use_externally_hosted_javascript/) got me thinking. ...
-1
votes
1answer
164 views

How to recognize if someone using password Reminder Script [closed]

I have been trying to know what these so called Gmail hacking scripts actually does (just studying for some knowledge purpose) and one of such scripts is this, which seems beyond my knowledge: ...
1
vote
0answers
156 views

How should I mitigate the XSS vulnerabilities in KnockoutJS described at mustache-security?

The site Mustache-Security describes XSS vulnerabilities in KnockoutJS... The vulnerabilities come from the use of eval (or some equivalent) to convert text in the data-bind attribute to executable ...
2
votes
1answer
180 views

Facebook oAuth2 for Javascript client application

When implementing Facebook login using oAuth2 (the Javascript version), I receive an access token back from the Facebook auth server. So far so good. The problem I have is that I want to implement a ...
1
vote
0answers
64 views

XSS Vectors for new Image()

What are possible XSS vectors to this JavaScript code new Image().src = encodeURI('[user url here]'); Let's assume two cases: [user url here] is some string provided by user (with no validation) ...
2
votes
3answers
184 views

Why are scripts injected through innerHTML not executed whilst onerror and other on<event> attributes on elements are? - Google XSS Challenge 2

SPOILER ALERT : Do not continue if you do not want to be spoiled I am currently doing the Google XSS Challenge Level 2 . I am injecting XSS code that is inserted into the document using ...
3
votes
4answers
330 views

How is this XSS attack working?

SPOILER ALERT: This question contains an answer to one of the problems from the Google's XSS Challenge! Please stop reading further if you're not interested in knowing the answer right now. I'm ...
2
votes
3answers
113 views

XSS prevention by black-listing

I have a reflected XSS vulnerability in my Web application. I have decided to take the black-list approach instead of the popular white-list approach. My question is can there exist a malicious ...
2
votes
2answers
158 views

XSS in HTML meta tag

There is a web application which contains a search function. When I search for aaaaaaaaxss I get this: <meta property="the:property" content="100 Results for aaaaaaaaxss (Page 1)" /> It strips ...
2
votes
1answer
117 views

Should a space in a password count as a symbol when checking for complexity?

There is no doubt in my mind that spaces should be allowed in passwords. I see some websites disallow spaces, symbols in passwords and even enforce minimum length which seems t otally nonsensical to ...
1
vote
1answer
162 views

HMAC secret key client storage

I've read numerous articles about using HMAC and the secret key for client authentication in a RESTful client (Javascript) application today. Still, I don't find a single source that is able to ...
0
votes
1answer
246 views

How do I inject JavaScript into a JPG image and execute it when uploaded?

I've recently joined a security project, and received a task to demonstrate the risk related to an end-user uploading an image containing embedded (malicious) JavaScript code. I used EXIFeditor to ...
0
votes
1answer
77 views

Access-Control-Allow-Origin possible threats on static JS file

As I am working on a research, I need allow users to read my JavaScript file using Ajax. However, I want to make sure about consequences of adding Access-Control-Allow-Origin header for just this ...
5
votes
3answers
143 views

Secure a publicly accessible REST api

We're building a public single page app in JavaScript that talks to a back-end REST service. What we want is for that REST-service to be only accessible from the single page app. Since it's a public ...
1
vote
5answers
151 views

How to ensure that files uploaded by users do not contain any Javascript

I'm trying to make a file uploader using PrimeFaces, but it is vulnerable to scripts: If someone tries to upload a file (e.g. a résumé) that includes JavaScript, this could get executed once the file ...
1
vote
1answer
77 views

Detecting code source variants of the same function [closed]

Suppose I have this JavaScript malicious function f1() : <SCRIPT type="text/javascript"> function f1(){ a=1; b=2; c=a+b; } </SCRIPT> This function is embedded within a larger ...
3
votes
1answer
131 views

Javascript client side image decryption, does this add any safety or is it flawed

I want to store passport copies safely in a database, the database itself is a normal MySQL database and on a somewhat trusted web server. The user who owns the passport copy should only be able to ...
0
votes
2answers
159 views

How dangerous javascripts really are? [closed]

I've watched this video, and what this guy says is that with javascript its easy to create a worm that steals your information also that javascript will continue to execute even tho you closed the tab ...
0
votes
1answer
175 views

Can I use crypto.getRandomValues to create a private key?

In the window.crypto spec: http://www.w3.org/TR/WebCryptoAPI/#RandomSource-interface It says explicitly: "Do not generate keys using the getRandomValues method. Use the generateKey method ...
1
vote
1answer
106 views

Securing Javascript plugin

My company offers a Javascript plugin that is meant to be embedded with websites. It works in a similar fashion to Google Analytics, in which you add a bit of Javascript and then it does some magic on ...
0
votes
1answer
159 views

JS malware detection

Is there a way to detect a malicious JavaScript code within a webpage before the script runs on my computer ? I want to develop a Python script that prevents from 8 JS malwares that I can embed on my ...
5
votes
2answers
215 views

Do Javascript malware signatures exist?

Are there signatures for malicious JavaScript codes as they exist for other viruses/worms/trojans developed in other programming languages ? If so, are these javascript malware signatures defined ...
1
vote
2answers
67 views

If I change any character in a private PEM, should the public PEM be different?

I'm generating a public PEM-format key from a private PEM-format key. I noticed that if I change a few characters near the end of the private PEM that the public PEM generated from the modified ...
1
vote
1answer
196 views

how secure is javascript based oauth2.0

Javascript based oauth exposes the client id of the application and it trusts only on the domain requesting the access token. The domain name can be forged with a dns hijack(or a virus affecting ...
-2
votes
1answer
262 views

How to decrypt javascript code extracted from PDF

I analyzed PDF, and extract javascript code. But javascript code is encrypted. I can't decrypt it. Please advise me. javascript code ...
1
vote
1answer
448 views

Is it safe to use localstorage to store session variables and user password? [closed]

I'm trying to make a web application in Java with a login/session system using com.sun.net.httpserver and as far I know, it does not have an inbuilt method to this. So, I had the following idea: 1 - ...
1
vote
2answers
101 views

Hidding ip address in a peer to peer connection

I'm curious is it possible to hide the ip address in a peer to peer connection. Mainly considering you have 2 computer connected remotly in a browser session. I would like to know if it's possible to ...
6
votes
3answers
1k views

What's wrong with my own authentication scheme?

So I want to write my own authentication scheme for a web-app server, as follows. I assume this is a Bad Idea from either security or cost-effectiveness reasons and I know the conventional wisdom is ...
2
votes
2answers
136 views

Would usage of jCryption 3.0 + SSL have mitigated the Heartbleed vulnerability?

I came across a project called jCryption 3.0, which encrypts data between the client and server, without using SSL. If a website's JavaScript had used jCryption 3.0 to encrypt login form fields before ...
2
votes
2answers
239 views

Hacked HTML page - what's in the comment following the obfuscated code?

Chrome just warned me about malicious content when visiting a site - so I visited it. The source code is like the following: <html> <head> <link href="images/DPT2.ico" title="Dynamic ...
0
votes
2answers
193 views

SQL Injection and JavaScript Regex Bypass

me for learning SQLI. But I got stuck at this one regex which seems to be unbreakable : document.loginForm.username.value = document.loginForm.username.value.replace(/[^a-zA-Z0-9]/g, ""); If someone ...