Archive

Archive for the ‘Java security’ Category

How To Solve JavaScript Problems

February 28th, 2010

How to Solve JavaScript Problems – Code This

Many internet users face this problem when they try clicking a link and see this error code on the status bar of the browser which doesn’t allow the link to work. It is actually an error message that occasionally appears in a web browser when you face a problem loading a JavaScript from a webpage. Though this error message pops up on various occasions but the actual reasons could be different for different users, and resolving these problems is necessary by knowing the most possible reasons for this error message.

1- The major cause of this error message is the Popup blocker blocking the JavaScript while stopping the windows which open up as the advertisements on various sites. Resolving this problem involves making changes in the preferences of the popup blocker based on your requirements and thus disabling the popup blocker. One can even download another anti popup software instead or can read the product reviews of popup blockers to assess if they really cause these error messages.

2- The malfunctioning of the web proxy servers (which are used for accessing the various banned websites) can also block the various scripts in the process. This problem can be avoided by not using the proxy server itself or using a proxy server that functions better and do not interfere in the downloading of various scripts. Also check for the compatibility of the proxy server with various web pages and scripts.
An improperly written JavaScript could also lead to this error message. The solution lies in notifying this error to the webmaster who in turn must rewrite the JavaScript.

3- The JavaScript might be disabled in your browsers, and this needs to be enabled. To enable this in IE, go to scripting tab of the security option in the Tools menu under the internet options; and to enable this in Firefox, go to Tools menu and enable the JavaScript option in Web features.

4- Web browser implementation of JavaScript might also be broken in some cases, and this requires the switching or simply the up gradation of your web browser.

There is this simple way where you can really avoid “javascript:void(0)” error message at the first instance because we know that this “javascript:void(0)” can cause certain browsers to really present your web pages in unusual ways, and since the “javascript:void(0)” statement is often occurred when a link has no URL attached to it, and the browser doesn’t understand how to react and returns the error message. So for this, instead use the “return false;” statement to let the browser not to look for the URL. Try opening the document in any text editor; Locate the “javascript:void(0)” references within the document, Replace the links with the (#) symbol with the syntax “.”, Add the “return false” declaration to the statement that would make the whole link reference to appear as Link. Replace the “callFunction()” with your function name; Save and close the file finally.

Here I am going to share an informative resource of javascript:void(0). You can find more information about how you can avoid javascript:void(0) problem here. More IT Resources: White Papers

Gain pragmatic info about cheap PlayStation 3 – please study the web site. The times have come when proper info is really within one click, use this chance.

Java security

Web Pages

June 6th, 2009

laptops are essential parts of our lives. Do you what it takes to run a laptop. You guessed it- laptop charger. Some of these laptops are so weak when it comes down to there batteries it is a joke. I have always had problems with laptop accessories.

All persons who have created Web pages any time in life, we raised the question of how to choose software and technology and finally where to start. This article aims to at least take the first steps to a good choice. This article aims to at least take the first steps to a good choice.

There are different languages in the world of Web design and programming, but the first and indispensable, is the HTML, (now it is becoming obsolete so from now, we will use the XHTML. Then explain what), another things to consider is language that allows us to interact with the browser in a dynamic and effective by the user’s computer, the language is JavaScript (later explained that it and its use), and finally a proper language for the server to obtain content from BDD (Database), there are different variants of languages by the server can be found among them, ASP, PHP, JSP, ColdFusion, etc … There are different languages in the world of Web design and programming, but the first and indispensable, is the HTML, (now it is becoming obsolete so from now, we will use the XHTML. Then explain what) things to consider another language is that allows us to interact with the browser in a dynamic and effective by the user’s computer, the language is JavaScript (later explained that it and its use), and finally a proper language for the server to obtain content from BDD (Database), there are different variants of languages by the server can be found among them, ASP, PHP, JSP, ColdFusion, etc …

Before we get to program it is necessary to have the necessary software to do this software can range from a plain text editor (I recommend Notepad crimsoneditor www.crimsoneditor.com) to a much more sophisticated (although at the same time more comfortable). Before we get to program it is necessary to have the necessary software to do this software can range from a plain text editor (I recommend Notepad crimsoneditor www.crimsoneditor.com) to a much more sophisticated (although at the same time more comfortable). P robablemente Dreamweaver is the best editor for Web page designers seeking professional results. P robablemente Dreamweaver is the best editor for Web page designers seeking professional results.

At the same time we must make several decisions: Where are we going to host our website as we will call the Web and who is targeted. At the same time we must make several decisions: Where are we going to host our website as we will call the Web and who is targeted.

Defining HTML (XHTML, XML) Defining HTML (XHTML, XML)

The definition is basically a language that indicates where to place each text, each picture or video each and how to take these to be placed on the page. The definition is basically a language that indicates where to place each image, each picture or video each and how to take these to be placed on the page.

HTML was originally created in targeted outreach. HTML was originally created in targeted outreach. Is not thought that the Web will become a leisure area with a multimedia, so the HTML was not responding to all potential uses that it was going to give and all groups of people who used a future. Is not thought that the Web will become a leisure area with a multimedia, so the HTML was not responding to all potential uses that it was going to give and all groups of people who used a future. Currently, knowing his potential, the HTML has fallen into disuse leading to XHTML Extensible Markup Language Hypertext to replace HTML. Currently, knowing his potential, the HTML has fallen into disuse leading to XHTML Extensible Hypertext Markup Language to replace HTML. It is not the intention of this article as a tutorial or course in each language, but if it is known to provide different sites through which to learn and practice walking. It is not the intention of this article as a tutorial or course in each language, but if it is known to provide different sites through which to learn and practice walking.

HTML Tutorial (Remember this outdated) HTML Tutorial www.desarrolloweb.com (Remember this outdated) www.desarrolloweb.com

Http://www.w3schools.com/xhtml/ XHTML Tutorial XHTML Tutorial http://www.w3schools.com/xhtml/

One last thing to consider in the XHTML is that it continues to evolve, it will be implemented in an XML (http://es.wikipedia.org/wiki/XML), One last thing to consider in the XHTML is that it continues to evolve, it will be implemented in an XML (http://es.wikipedia.org/wiki/XML)

CSS CSS

I have not stopped talking about the CSS ascading C S tyle S ite is a relatively young programming language based on XHTML that is used for structure in Web pages. I have not stopped talking about the CSS ascading ite S tyle CS is a relatively young programming language based on XHTML for structure that is used in Web pages.

CSS Tutorial CSS Tutorial http://es.wikipedia.org/wiki/CSS http://es.wikipedia.org/wiki/CSS

Defining JavaScript or languages that interact by the user. Defining JavaScript or languages that interact by the user.

This kind of language makes different functions once the page has been downloaded to the user’s computer, thus avoiding errors in the server put an example in a form created with XHTML, we can verify that an email address, this well-written, or Fill this form completely, while it also can be used to make it attractive interactions such as changing colors, initial greetings, etc … This kind of language makes eleven different functions the page has been downloaded to the user’s computer, thus avoiding errors in the server put an example in a form created with XHTML, we can verify that an email address, this well-written, or Fill this form completely, while it can also be used to make it attractive interactions such as changing colors, initial greetings, etc …

JavaScript Tutorial JavaScript Tutorial http://es.wikipedia.org/wiki/Javascript http://es.wikipedia.org/wiki/Javascript

Definition of the language from the server. Definition of the language from the server.

In this section I can not give you an adjusted definition because each language you do differently but if I can give you an original idea. In this section I can not give you an adjusted definition because each language you do differently but if I can give you an original idea.

This kind of language is capable of moving data from a page with an XHTML form, showing data embedded in the XHTML page in another form, as can be done between Web pages with the code from the server can insert such data in a BDD, (database) such as Access or SQL. This kind of language is capable of moving data from a page with an XHTML form, showing data embedded in the XHTML page in another form, as can be done between Web pages with the code from the server can insert such data in a BDD ( database) such as Access or SQL.

Tutorial languages by http://www.desarrolloweb.com/php/ Server Tutorial Server http://www.desarrolloweb.com/php/ languages by

Finally in this article, although almost the first thing we do is find where we can host our website, such as being called as target audience (ie the principal). Finally in this article, although almost the first thing we do is find where we can host our website, such as being called as target audience (ie the principal).

Lodging: There are both free and paid, the difference is that the servers hosting your Web pages for free, there is always advertising (either dealer, other companies or pornography). Lodging: There are both free and paid, the difference is that the servers hosting your Web pages for free, there is always advertising (either dealer, other companies or pornography). If you use a rental fee (there are very cheap from 7 or 8 Euros), you pound on your Web advertising except for the one you choose and gain continuous support: If you use a rental fee (there are very cheap from 7 or 8 Euros), you pound on your Web advertising except for the one you choose and gain continuous support:

Stay Free: No free http://miarroba.com Accommodation: Accommodation http://www.ivandia.com two types: http://www.xilene.com Stay Free: No free http://miarroba.com Accommodation : Accommodation http://www.ivandia.com two types: http://www.xilene.com

Domain: A domain is how is your website for example www.mipaginaweb.com has an approximate cost of 20 euros, but there are free (www.da.ru) and redirects (www.xilene.com example: www . TuPagina.xilene.com). Domain: A domain is how your website is www.mipaginaweb.com for example has an approximate cost of 20 euros, but there are free (www.da.ru) and redirects (www.xilene.com example: www. TuPagina.xilene . com). With a mastery of payment default if any email account, in the pages and sub domains are not usually free to give any account of mail (except for some companies such as Xylene offers accounts tunickonombre@xilene.com) With a mastery of payment default email account if any, in the pages and sub domains are not usually free to give any account of mail (except for some companies such as Xylene offers accounts tunickonombre@xilene.com)

Target Target

In fact this should be the first point but I would not want to elaborate more, the key to making a web and not the tools you use, if you have not defined the user that you’re going to manage, create web accordingly. In fact this should be the first point but I would not want to elaborate more, the key to making a web and not the tools you use, if you have not defined the user that you’re going to manage, create web accordingly. Example: Do not create a site Red and yellow if your website is a funeral home. Example: Do not create a site Red and yellow if your website is a funeral home.

For the rest is in your hands constantly and have patience, I am the first to lose their nerve when a script is not running as it should or my website is not the same in other browsers. For the rest is in your hands constantly and have patience, I am the first to lose their nerve when a script is not running as it should or my website is not the same in other browsers. Make your own pace and time out with the fruit of your efforts. Make your own pace and time out with the fruit of your efforts. I wish you much luck and I invite you to check all the doubts that you may occur. I wish you much luck and I invite you to check all the doubts that you may occur.

Get expert hints for get cheap playstation 3 – this is your personal tips store.

Java security

Fix for Browser closes by itself

October 22nd, 2007

Browsers both IE and Firefox can start behaving unlikely. Whenever one try to open certain websites especially the computer security or if try to navigate directly to internal pages of certain websites, the browser window would close leaving  no information on what made them close.

That behavior of browsers is due to either a corrupt installation of Java or an outdated version of Java being the sole responsible piece of software on any system causing  browsers to crash. It means whenever download or upgrade any software or application, it should be done through original and reliable source.

There is a small fix of it. Just update your java client through sun microsystems or reinstall the latest version. One can find the download at

http://www.java.com/en/download/index.jsp 

Java security , ,

Understanding java script and cookies

October 16th, 2007

To increase functionality or add design embellishments, web sites often rely on scripts that execute programs within the web browser. This active content can be used to create “splash pages” or options like drop-down menus. Unfortunately, these scripts are often a way for attackers to download or execute malicious code on a user’s computer.

  • JavaScript – JavaScript is just one of many web scripts (other examples are VBScript, ECMAScript, and JScript) and is probably the most recognized. Used on almost every web site now, JavaScript and other scripts are popular because users expect the functionality and “look” that it provides, and it’s easy to incorporate (many common software programs for building web sites have the capability to add JavaScript features with little effort or knowledge required of the user). However, because of these reasons, attackers can manipulate it to their own purposes. A popular type of attack that relies on JavaScript involves redirecting users from a legitimate web site to a malicious one that may download viruses or collect personal information.
  • Java and ActiveX controls – Different from JavaScript, Java and ActiveX controls are actual programs that reside on your computer or can be downloaded over the network into your browser. If executed by attackers, untrustworthy ActiveX controls may be able to do anything on your computer that you can do (such as running spyware and collecting personal information, connecting to other computers, and potentially doing other damage). Java applets usually run in a more restricted environment, but if that environment isn’t secure, then malicious Java applets may create opportunities for attack as well.
  • http://www.us-cert.gov/cas/tips/ST04-012.html

Browsers security, Java security , , ,

Assessing the security of Java applications

October 1st, 2007

Assessing the security of Java applications, and particularly client-server applications, can be a tedious process of modifying the code, compiling, deploying, testing and repeat. This becomes even more difficult when the source code to the application is not available. What we require is an easy means of interacting with the internals of a Java application during execution without recompiling the code. The BeanShell (http://www.beanshell.org) provides an interpreted, scripting environment that can plug in to any Java application or applet and allows users to inspect and manipulate objects dynamically. This paper demonstrates a technique for using the BeanShell to assess the security of a typical Java client-server application.

Java security , , , ,

Access control enforcement in java

July 31st, 2007

The Java runtime keeps track of the sequence of Java calls that are made as a program executes. When access to a protected resource is requested, the entire call stack, by default, is evaluated to determine whether the requested access is permitted.

As mentioned earlier, resources are protected by the SecurityManager. Security-sensitive code in the Java platform and in applications protects access to resources via code like the following:

SecurityManager sm = System.getSecurityManager();
if (sm != null) {
   sm.checkPermission(perm);
}

where perm is the Permission object that corresponds to the requested access. For example, if an attempt is made to read the file /tmp/abc, the permission may be constructed as follows:

Permission perm =
    new java.io.FilePermission("/tmp/abc", "read");

The default implementation of SecurityManager delegates its decision to the java.security.AccessController implementation. The AccessController traverses the call stack, passing to the installed security Policy each code element in the stack, along with the requested permission (for example, the FilePermission in the above example). The Policy determines whether the requested access is granted, based on the permissions configured by the administrator. If access is not granted, the AccessController throws a java.lang.SecurityException.

Figure 4 illustrates access control enforcement. In this particular example, there are initially two elements on the call stack, ClassA and ClassB. ClassA invokes a method in ClassB, which then attempts to access the file /tmp/abc by creating an instance of java.io.FileInputStream. The FileInputStream constructor creates a FilePermission, perm, as shown above, and then passes perm to the SecurityManager’s checkPermission method. In this particular case, only the permissions for ClassA and ClassB need to be checked, because all system code, including FileInputStream, SecurityManager, and AccessController, automatically receives all permissions.

In this example, ClassA and ClassB have different code characteristics?they come from different locations and have different signers. Each may have been granted a different set of permissions. The AccessController only grants access to the requested file if the Policy indicates that both classes have been granted the required FilePermission

Java security, security application development ,

Access control in java

July 31st, 2007

The access control architecture in the Java platform protects access to sensitive resources (for example, local files) or sensitive application code (for example, methods in a class). All access control decisions are mediated by a security manager, represented by the java.lang.SecurityManager class. A SecurityManager must be installed into the Java runtime in order to activate the access control checks.

Java applets and Javaâ„¢ Web Start applications are automatically run with a SecurityManager installed. However, local applications executed via the java command are by default not run with a SecurityManager installed. In order to run local applications with a SecurityManager, either the application itself must programmatically set one via the setSecurityManager method (in the java.lang.System class), or java must be invoked with a -Djava.security.manager argument on the commandline.

Permissions

When Java code is loaded by a class loader into the Java runtime, the class loader automatically associates the following information with that code:

  • Where the code was loaded from
  • Who signed the code (if anyone)
  • Default permissions granted to the code

This information is associated with the code regardless of whether the code is downloaded over an untrusted network (e.g., an applet) or loaded from the filesystem (e.g., a local application). The location from which the code was loaded is represented by a URL, the code signer is represented by the signer’s certificate chain, and default permissions are represented by java.security.Permission objects.

The default permissions automatically granted to downloaded code include the ability to make network connections back to the host from which it originated. The default permissions automatically granted to code loaded from the local filesystem include the ability to read files from the directory it came from, and also from subdirectories of that directory.

Note that the identity of the user executing the code is not available at class loading time. It is the responsibility of application code to authenticate the end user if necessary (for example, as described in Section 6). Once the user has been authenticated, the application can dynamically associate that user with executing code by invoking the doAs method in the javax.security.auth.Subject class.

Java security, security application development ,

Secure communication in java

July 30th, 2007

The data that travels across a network can be accessed by someone who is not the intended recipient. When the data includes private information, such as passwords and credit card numbers, steps must be taken to make the data unintelligible to unauthorized parties. It is also important to ensure that you are sending the data to the appropriate party, and that the data has not been modified, either intentionally or unintentionally, during transport.

Cryptography forms the basis required for secure communication, and that is described in Section 4. The Java platform also provides API support and provider implementations for a number of standard secure communication protocols.

SSL/TLS

The Java platform provides APIs and an implementation of the SSL and TLS protocols that includes functionality for data encryption, message integrity, server authentication, and optional client authentication. Applications can use SSL/TLS to provide for the secure passage of data between two peers over any application protocol, such as HTTP on top of TCP/IP.

The javax.net.ssl.SSLSocket class represents a network socket that encapsulates SSL/TLS support on top of a normal stream socket (java.net.Socket). Some applications might want to use alternate data transport abstractions (e.g., New-I/O); the javax.net.ssl.SSLEngine class is available to produce and consume SSL/TLS packets.

The Java platform also includes APIs that support the notion of pluggable (provider-based) key managers and trust managers. A key manager is encapsulated by the javax.net.ssl.KeyManager class, and manages the keys used to perform authentication. A trust manager is encapsulated by the TrustManager class (in the same package), and makes decisions about who to trust based on certificates in the key store it manages.

SASL

Simple Authentication and Security Layer (SASL) is an Internet standard that specifies a protocol for authentication and optional establishment of a security layer between client and server applications. SASL defines how authentication data is to be exchanged, but does not itself specify the contents of that data. It is a framework into which specific authentication mechanisms that specify the contents and semantics of the authentication data can fit. There are a number of standard SASL mechanisms defined by the Internet community for various security levels and deployment scenarios.

The Java SASL API defines classes and interfaces for applications that use SASL mechanisms. It is defined to be mechanism-neutral; an application that uses the API need not be hardwired into using any particular SASL mechanism. Applications can select the mechanism to use based on desired security features. The API supports both client and server applications. The javax.security.sasl.Sasl class is used to create SaslClient and SaslServer objects.

SASL mechanism implementations are supplied in provider packages. Each provider may support one or more SASL mechanisms and is registered and invoked via the standard provider architecture.

The Java platform includes a built-in provider that implements the following SASL mechanisms:

  • CRAM-MD5, DIGEST-MD5, EXTERNAL, GSSAPI, and PLAIN client mechanisms
  • CRAM-MD5, DIGEST-MD5, and GSSAPI server mechanisms

Java security, security application development , ,

Authentication in java

July 29th, 2007

Authentication is the process of determining the identity of a user. In the context of the Java runtime environment, it is the process of identifying the user of an executing Java program. In certain cases, this process may rely on the services described in the “Cryptography” section (Section 4).

The Java platform provides APIs that enable an application to perform user authentication via pluggable login modules. Applications call into the LoginContext class (in the javax.security.auth.login package), which in turn references a configuration. The configuration specifies which login module (an implementation of the javax.security.auth.spi.LoginModule interface) is to be used to perform the actual authentication.

Since applications solely talk to the standard LoginContext API, they can remain independent from the underlying plug-in modules. New or updated modules can be plugged in for an application without having to modify the application itself. Figure 3 illustrates the independence between applications and underlying login modules:

It is important to note that although login modules are pluggable components that can be configured into the Java platform, they are not plugged in via security Providers. Therefore, they do not follow the Provider searching model described in Section 3. Instead, as is shown in the above diagram, login modules are administered by their own unique configuration.

The Java platform provides the following built-in LoginModules, all in the com.sun.security.auth.module package:

  • Krb5LoginModule for authentication using Kerberos protocols
  • JndiLoginModule for username/password authentication using LDAP or NIS databases
  • KeyStoreLoginModule for logging into any type of key store, including a PKCS#11 token key store

Authentication can also be achieved during the process of establishing a secure communication channel between two peers. The Java platform provides implementations of a number of standard communication protocols, which are discussed in the following section.

Java security , , , , , , , , ,

Key tols in java security

July 28th, 2007

There are two built-in tools for working with keys, certificates, and key stores:

keytool is used to create and manage key stores. It can

  • Create public/private key pairs
  • Display, import, and export X.509 v1, v2, and v3 certificates stored as files
  • Create self-signed certificates
  • Issue certificate (PKCS#10) requests to be sent to CAs
  • Import certificate replies (obtained from the CAs sent certificate requests)
  • Designate public key certificates as trusted

The jarsigner tool is used to sign JAR files, or to verify signatures on signed JAR files. The Java ARchive (JAR) file format enables the bundling of multiple files into a single file. Typically a JAR file contains the class files and auxiliary resources associated with applets and applications. When you want to digitally sign code, you first use keytool to generate or import appropriate keys and certificates into your key store (if they are not there already), then use the jar tool to place the code in a JAR file, and finally use the jarsigner tool to sign the JAR file. The jarsigner tool accesses a key store to find any keys and certificates needed to sign a JAR file or to verify the signature of a signed JAR file. Note: jarsigner can optionally generate signatures that include a timestamp. Systems (such as Java Plug-in) that verify JAR file signatures can check the timestamp and accept a JAR file that was signed while the signing certificate was valid rather than requiring the certificate to be current. (Certificates typically expire annually, and it is not reasonable to expect JAR file creators to re-sign deployed JAR files annually.)

Java security, security application development ,

Java Language Security and Bytecode Verification

July 26th, 2007

The Java language is designed to be type-safe and easy to use. It provides automatic memory management, garbage collection, and range-checking on arrays. This reduces the overall programming burden placed on developers, leading to fewer subtle programming errors and to safer, more robust code.

In addition, the Java language defines different access modifiers that can be assigned to Java classes, methods, and fields, enabling developers to restrict access to their class implementations as appropriate. Specifically, the language defines four distinct access levels: private, protected, public, and, if unspecified, package. The most open access specifier is public access is allowed to anyone. The most restrictive modifier is private access is not allowed outside the particular class in which the private member (a method, for example) is defined. The protected modifier allows access to any subclass, or to other classes within the same package. Package-level access only allows access to classes within the same package.

A compiler translates Java programs into a machine-independent bytecode representation. A bytecode verifier is invoked to ensure that only legitimate bytecodes are executed in the Java runtime. It checks that the bytecodes conform to the Java Language Specification and do not violate Java language rules or namespace restrictions. The verifier also checks for memory management violations, stack underflows or overflows, and illegal data typecasts. Once bytecodes have been verified, the Java runtime prepares them for execution.

http://java.sun.com/javase/6/docs/technotes/guides/security/overview/jsoverview.html

Java security, security application development , ,

Background of java security

July 25th, 2007

The Javaâ„¢ platform was designed with a strong emphasis on security. At its core, the Java language itself is type-safe and provides automatic garbage collection, enhancing the robustness of application code. A secure class loading and verification mechanism ensures that only legitimate Java code is executed.

The initial version of the Java platform created a safe environment for running potentially untrusted code, such as Java applets downloaded from a public network. As the platform has grown and widened its range of deployment, the Java security architecture has correspondingly evolved to support an increasing set of services. Today the architecture includes a large set of application programming interfaces (APIs), tools, and implementations of commonly-used security algorithms, mechanisms, and protocols. This provides the developer a comprehensive security framework for writing applications, and also provides the user or administrator a set of tools to securely manage applications.

The Java security APIs span a wide range of areas. Cryptographic and public key infrastructure (PKI) interfaces provide the underlying basis for developing secure applications. Interfaces for performing authentication and access control enable applications to guard against unauthorized access to protected resources.

The APIs allow for multiple interoperable implementations of algorithms and other security services. Services are implemented in providers, which are plugged into the Java platform via a standard interface that makes it easy for applications to obtain security services without having to know anything about their implementations. This allows developers to focus on how to integrate security into their applications, rather than on how to actually implement complex security mechanisms.

The Java platform includes a number of providers that implement a core set of security services. It also allows for additional custom providers to be installed. This enables developers to extend the platform with new security mechanisms.

This paper gives a broad overview of security in the Java platform, from secure language features to the security APIs, tools, and built-in provider services, highlighting key packages and classes where applicable.

Java security