NEW TO JAVA: TROJAN, KEYLOGGER, VIRUS etc..

Hello,
Just a question about JAVA.
Can the JAVA language be used to create trojan, keylogger, virus etc..?

Trojan: (i.e. something you trick an end user into running)
Java would not be the best choice for a trojan, as it requires the JVM installed, which many machines don't have. You could target MacOS X machines.
Keylogger: Not without JNI. At which point why bother writing a GUI in Java?
Virus: (i.e. something that spreads on its own) No, a Virus would rely on a OS native feature for self propergation. (such as a error in Outlook, or sending junk to a certain port).
You might think that Java Applets are a good target envorement for Viruses/trojans. Java Applets run in a very tightly controlled sandbox.

Similar Messages

  • New Trojan Horse Virus

    First, I am aware that the Mac has never had a virus and is not readily suceptible to them due to the quantity of Macs in service and the complexity of the Unix format. However, I also realize that the word "never" is relative and no one knows what the future holds.
    In light of the "apparent" new Trojan Horse Virus that has just surfaced, could someone answer the following questions for information only.
    There is a question as to whether this is a Trojan Horse or a Virus. Has that been cleared up?
    I have followed the discussions concerning the various virus programs for the Mac. There seems to be problems with all of them such that many are saying the problems do not justify installing these, in light of the low probability of a virus or trojan horse. There is also the question that is raised as to why some of these programs work great for some and poorly for others. One of these programs seem to surface more than others. It is CLAMX AV.
    My questions concerning CLAMX AV is:
    Does this program simply identify a virus or can it be configured to quarantine, or delete the virus completely?
    If it will delete the virus, can this be done automatically in the background or is there some interaction that has to be done on the part of the user?
    What primary issues concerning my Mac must be considered before installing the program?
    Thanks
    Herschel

    There is a good guide to Leap-A at http://www.macworld.com/news/2006/02/16/leapafaq/index.php
    If you want to see how easy or hard it is to catch have a look at http://www.macworld.com/news/2006/02/17/leapafollow/index.php
    Prerequisites (even before you get to the point where you have to help it along its way by actually deliberately opening the offending file) involve using iChat over a Bonjour (not just internet) network under OSX10.4 while connected to someone infected with it.
    THis is clearly not really going to be a significant issue in itself, though others may try to emulate its operations with "nastier" enhancements.
    (Just by the way, Macs have had viruses etc in the past under earlier OS's. The last one I actually saw was on a machine running OS7.5 in the mid 1990's. It had arrived on the victim's machine on a floppy disc containing pirated software from an educational institution. Prior to the mid 1990's I saw three other incidences of virus infection on Macs - all on machines used in the education sector)
    Cheers
    Rod

  • Safeset way to transfer i tunes library from old laptop to newer Sony Vaio??  I'm concerned about transfering viruses etc...i have an external drive available.

    Hiya. I want to transfer my I tunes library from an old laptop I've not used for a couple of years. I've got a sony vaio now, so I guess my options are either Windows migration or use my new external hard drive. I'm worried about any viruses etc being passed across, so what is the safest option??

    There should never be a need to turn off anti-virus protection to effect a data transfer.  The key to successfully transferring an iTunes library from one computer to another is to have the library (database and media) in a "well formed" layout that facilitates the process.  In practical terms, this means that all your media (songs, audiobooks, TV shows, ...) is contained within the iTunes Media folder within the iTunes folder that's located by default in one of the following locations:
    Windows XP: C:\Documents and Settings\username\My Documents\My Music\iTunes
    Windows Vista: C:\Users\username\Music\iTunes
    Windows 7 and Windows 8: C:\Users\username\My Music\iTunes (in theses "My Music" is one of Windows' virtual libraries and the same path as used in Vista is normally equally valid)
    This folder and its subfolders should look like this:
    If this is the case, then you can:
    Exit iTunes, and copy this iTunes folder, in its entirety, to an external HDD connected to your old machine
    In your case, I'd then suggest running a complete virus / malware scan on the external HDD.  It would be unusual to find viruses or malware embedded in iTunes' media files or other data, but doing this step would at least confirm that the data you're moving is infection-free.
    Then, copy this iTunes folder to the corresponding location on your new laptop (where iTunes should not be running at this time).  If you've already installed iTunes and haven't added any new content to the library on the new machine you can just overwrite the files/folders that you find there.
    Just to make sure that iTunes is picking up the correct library database, i.e., the one you just transferred, hold down the Shift key as you start iTunes, and when you see this prompt:
    click on Choose Library... navigate to the location of the folder you just copied (assuming Windows 7 or 8, C:\Users\username\Music\iTunes), select the iTunes Library.itl file you see there, and click Open.
    Your library will now be available to you on the new laptop.
    Two caveats:
    If your iTunes media on the old machine is not in the well formed structure described above (which may be the case if you've added existing MP3 or other formats without having configured iTunes as follows (in Edit > Preferences > Advanced):
    see Turingtest2's notes on Make a split library portable on the steps needed to reorganize your library into a more standard layout.  This may be a little tricky for you if the old machine is virus-infected to the extent that you can't run iTunes, but hopefully that won't be the case.
    If you've already added anything to the library on your new machine prior to transferring data from the old one you'll need an extra step in the procedure described above, before step 3:
    on the new machine (with iTunes not running) rename the C:\Users\username\Music\iTunes to something like "iTunesTemp"
    copy the library files and folders as described above, so you have a C:\Users\username\Music\iTunes folder again
    copy the contents of the C:\Users\username\iTunesTemp\iTunes Media folder (which will still contain any songs, etc, added on the new machine - you can just select any/all folders you find in that location except "Automatically Add to iTunes" and "Downloads") to C:\Users\username\Music\iTunes\iTunes Media\Automatically Add to iTunes

  • I recently installed your new version of firefox but i still cannot see the security settingsfirefox is experiancing a problem will have to close down or how to control viruses etc and as your answer

    all i want to know is how can i check for viruses etc using firefox and where can i find the security settings or are you doing that automatically,it has also crashed when i opened a vcl player

    To downgrade to Firefox 3.6 first uninstall Firefox 4, but do not select the option to "Remove my Firefox personal data". If you select that option it will delete your bookmarks, passwords and other user data.
    You can then install the latest version of Firefox 3.6 available from http://www.mozilla.com/en-US/firefox/all-older.html - it will automatically use your current bookmarks, passwords etc.
    To avoid possible problems with downgrading, I recommend going to your profile folder and deleting the following files if they exist - extensions.cache, extensions.rdf, extensions.ini, extensions.sqlite and localstore.rdf. Deleting these files will force Firefox to rebuild the list of installed extensions, checking their compatibility, and reset toolbar customizations.
    For details of how to find your profile folder see https://support.mozilla.com/kb/Profiles

  • New to Java, new to array(compacting ,removing etc..)

    hey everybody,
    bear with me im new to JAVA, currently taking my first course in Programming, and one of the assignments is on arrays. my question is i need to compact the array so if an element is removed then i would have to shift each one down so it doesnt waste memory and also have the array packed which means i have to keep all valid elements in the beginning and nulls at the end any suggestions or examples?. i didnt write any part of the code yet so im not sure if my description helps...
    BTW any suggestions as to where i can get practice in Java Programming? my hws sorta help but its not enough practice, and this is all new to me so any suggestions either websites or books?

    thanks for the replies and the link, i think i sorta got an idea how to shift
    well the thing with the array is that if the user inputs a number that is the same as an element in the array i need to remove it, well i guess you can say i have a problem starting the code does any one have a simple example on arrays? and im still confused about creating temps also, can anyone explain in what situation do we have to create temp variables? from my understanding is it only when you wanna change the size of the array? thanks in advance

  • Inbuilt protection from viruses, etc.

    I'm going to refer to a discussion that appeared in Apple Support Communities > Desktop Computers > iMac (Intel) > Discussions entitled "slow start up on my macbook pro (gray screen)" (https://discussions.apple.com/message/19137371#19137371), in which the following was posted as a reply by Linc Davis:
    Mac OS X versions 10.6.7 and later have built-in detection of known Mac malware in downloaded files. The recognition database is automatically updated once a day; however, you shouldn't rely on it, because the attackers are always at least a day ahead of the defenders. In most cases, there’s no benefit from any other automated protection against malware.
    The most effective defense against malware is your own intelligence. All known malware on the Internet that affects a fully-updated installation of Mac OS X 10.6 or later takes the form of trojans, which can only work if the victim is duped into running them. If you're smarter than the malware attacker thinks you are, you won't be duped. That means, primarily, that you never install software from an untrustworthy source. How do you know a source is untrustworthy?
    Any website that prompts you to install a “codec,” “plug-in,” or “certificate” thatcomes from that same site, or an unknown site, merely in order to use the site, is untrustworthy.
    A web operator who tells you that you have a “virus,” or that anything else is wrong with your computer, or that you have won a prize in a contest you never entered, istrying to commit a crime with you as the victim.
    “Cracked” versions of commercial software downloaded from a bittorrent are likely to be infected.
    Software with a corporate brand, such as Adobe Flash Player, must be downloaded directly from the developer’s website. No intermediary is acceptable.
    Disable Java (not JavaScript) in your web browser(s). Few websites have Java content nowadays, so you won’t be missing much. This setting is mandatory in Mac OS X 10.5.8 or earlier, because Java in those versions has bugs that make it unsafe to use on the Internet. Those bugs will probably never be fixed, because those older operating systems are no longer being maintained by Apple. Migrate to a newer version of the Mac OS as soon as you can.
    Follow these guidelines, and you’ll be as safe from malware as you can reasonably be.
    Never install any commercial "anti-virus" products for the Mac, as they all do more harm than good. If you need to be able to detect Windows malware in your files, use ClamXav — nothing else.
    Could Linc, should he come across this, or anyone else, clarify his statements?
    In particular, he seems to be saying that OS X comes with inbuilt protection from viruses, etc., and that the central protection database is updated daily - if this is correct, how do the updates get downloaded to individual installations?
    Also, in his list of untrustworthiness, the first (1.) refers to merely in order to use the site - what does this mean? And the third (3.) refers to “Cracked” versions of commercial software - what are "Cracked" versions?

    By cracked versions of software, he means basically anything from torrent, or other file sharing sites.
    For instance, you may find Photoshop CS6 that runs without a serial number. Someone has altered the binary files to make the app continue working, even though it's supposed to time out after 30 days (the trial period). Couple of problems with that.
    1) The apps rarely run well, and often cause a lot of crashing. The app knows it isn't registered and continually tries to quit. The hack tells it to keep running. That's the minor issue compared to the next.
    2) The number one way crooks are getting malware onto Macs is just this way. Hacked commercial software. That software isn't just hacked, they almost all also contain code that isn't part of the original app at all. Like key loggers, back doors, and other malware you most definitely don't want on your computer. When you enter your admin password to install the illegal software you downloaded, the extra stuff you don't know about get installed with it. These people are so persistent, there were even torrent downloads of Mavericks online almost as soon as Apple released it. Really! Who would be dumb enough to download Mavericks from a file sharing site when you can already obtain a genuine copy for free from Apple?
    No matter what it costs, if you need any particular software package, buy it! The people who spends months or years writing such software don't work for free any more than you do. What's their incentive to stay in business if everyone just steals their work?

  • Does an mac air need any internet/security protection from viruses etc. ?

    I was wondering does the mac need any interent security such as kaspersky or norton installed for protection? or is there already protection from viruses etc on the software installed? Thanks

    1. This is a comment on what you should—and should not—do to protect yourself from malicious software ("malware") that circulates on the Internet and gets onto a computer as an unintended consequence of the user's actions. It does not apply to software, such as keystroke loggers, that may be installed deliberately by an intruder who has hands-on access to the computer, or who has been able to log in to it remotely. That threat is in a different category, and there's no easy way to defend against it.
    If you find this comment too long or too technical, read only sections 5, 6, and 10.
    OS X now implements three layers of built-in protection specifically against malware, not counting runtime protections such as execute disable, sandboxing, system library randomization, and address space layout randomization that may also guard against other kinds of exploits.
    2. All versions of OS X since 10.6.7 have been able to detect known Mac malware in downloaded files, and to block insecure web plugins. This feature is transparent to the user. Internally Apple calls it "XProtect."
    The malware recognition database used by XProtect is automatically updated; however, you shouldn't rely on it, because the attackers are always at least a day ahead of the defenders.
    The following caveats apply to XProtect:
    It can be bypassed by some third-party networking software, such as BitTorrent clients and Java applets.
    It only applies to software downloaded from the network. Software installed from a CD or other media is not checked.
    As new versions of OS X are released, it's not clear whether Apple will indefinitely continue to maintain the XProtect database of older versions such as 10.6. The security of obsolete system versions may eventually be degraded. Security updates to the code of obsolete systems will stop being released at some point, and that may leave them open to other kinds of attack besides malware.  3. Starting with OS X 10.7.5, there has been a second layer of built-in malware protection, designated "Gatekeeper" by Apple. By default, applications and Installer packages downloaded from the network will only run if they're digitally signed by a developer with a certificate issued by Apple. Software certified in this way hasn't necessarily been tested by Apple, but you can be reasonably sure that it hasn't been modified by anyone other than the developer. His identity is known to Apple, so he could be held legally responsible if he distributed malware. That may not mean much if the developer lives in a country with a weak legal system (see below.)    Gatekeeper doesn't depend on a database of known malware. It has, however, the same limitations as XProtect, and in addition the following:
    It can easily be disabled or overridden by the user.
    A malware attacker could get control of a code-signing certificate under false pretenses, or could simply ignore the consequences of distributing codesigned malware.
    An App Store developer could find a way to bypass Apple's oversight, or the oversight could fail due to human error.
    4. Starting with OS X 10.8.3, a third layer of protection has been added: a "Malware Removal Tool" (MRT). MRT runs automatically in the background when you update the OS. It checks for, and removes, malware that may have evaded the other protections via a Java exploit (see below.) MRT also runs when you install or update the Apple-supplied Java runtime (but not the Oracle runtime.) Like XProtect, MRT is effective against known threats, but not against unknown ones. It notifies you if it finds malware, but otherwise there's no user interface to MRT.
    5. The built-in security features of OS X reduce the risk of malware attack, but they are not, and never will be, complete protection. Malware is a problem of human behavior, and a technological fix is not going to solve it. Trusting software to protect you will only make you more vulnerable.  The best defense is always going to be your own intelligence. With the possible exception of Java exploits, all known malware circulating on the Internet that affects a fully-updated installation of OS X 10.6 or later takes the form of so-called "Trojan horses," which can only have an effect if the victim is duped into running them. The threat therefore amounts to a battle of wits between you and the scam artists. If you're smarter than they think you are, you'll win. That means, in practice, that you always stay within a safe harbor of computing practices. How do you know when you're leaving the safe harbor? Below are some warning signs of danger.
    Software from an untrustworthy source
    Software of any kind is distributed via BitTorrent. or Usenet, or on a website that also distributes pirated music or movies.
    Software with a corporate brand, such as Adobe Flash Player, doesn't come directly from the developer’s website. Do not trust an alert from any website to update Flash, your browser, or anything else.
    Rogue websites such as Softonic and CNET Download distribute free applications that have been packaged in a superfluous "installer."
    The software is advertised by means of spam or intrusive web ads. Any ad, on any site, that includes a direct link to a download should be ignored.
    Software that is plainly illegal or does something illegal
    High-priced commercial software such as Photoshop is "cracked" or "free."
    An application helps you to infringe copyright, for instance by circumventing the copy protection on commercial software, or saving streamed media for reuse without permission.
    Conditional or unsolicited offers from strangers
    A telephone caller or a web page tells you that you have a “virus” and offers to help you remove it. (Some reputable websites did legitimately warn visitors who were infected with the "DNSChanger" malware. That exception to this rule no longer applies.)
    A web site offers free content such as video or music, but to use it you must install a “codec,” “plug-in,” "player," "downloader," "extractor," or “certificate” that comes from that same site, or an unknown one.
    You win a prize in a contest you never entered.
    Someone on a message board such as this one is eager to help you, but only if you download an application of his choosing.
    A "FREE WI-FI !!!" network advertises itself in a public place such as an airport, but is not provided by the management.
    Anything online that you would expect to pay for is "free."
    Unexpected events
    You open what you think is a document and get an alert that it's "an application downloaded from the Internet." Click Cancel and delete the file. Even if you don't get the alert, you should still delete any file that isn't what you expected it to be.
    An application does something you don't expect, such as asking for permission to access your contacts, your location, or the Internet for no obvious reason.
    Software is attached to email that you didn't request, even if it comes (or seems to come) from someone you trust.
    Fortunately, client-side Java on the Web is obsolete and mostly extinct. Only a few outmoded sites still use it. Try to hasten the process of extinction by avoiding those sites, if you have a choice. Forget about playing games or other non-essential uses of Java.
    Java is not included in OS X 10.7 and later. Discrete Java installers are distributed by Apple and by Oracle (the developer of Java.) Don't use either one unless you need it. Most people don't. If Java is installed, disable it—not JavaScript—in your browsers.
    Regardless of version, experience has shown that Java on the Web can't be trusted. If you must use a Java applet for a task on a specific site, enable Java only for that site in Safari. Never enable Java for a public website that carries third-party advertising. Use it only on well-known, login-protected, secure websites without ads. In Safari 6 or later, you'll see a lock icon in the address bar with the abbreviation "https" when visiting a secure site.
    Stay within the safe harbor, and you’ll be as safe from malware as you can practically be. The rest of this comment concerns what you should not do to protect yourself.
    7. Never install any commercial "anti-virus" (AV) or "Internet security" products for the Mac, as they are all worse than useless. If you need to be able to detect Windows malware in your files, use one of the free security apps in the Mac App Store—nothing else.
    Why shouldn't you use commercial AV products?
    To recognize malware, the software depends on a database of known threats, which is always at least a day out of date. This technique is a proven failure, as a major AV software vendor has admitted. Most attacks are "zero-day"—that is, previously unknown. Recognition-based AV does not defend against such attacks, and the enterprise IT industry is coming to the realization that traditional AV software is worthless.
    Its design is predicated on the nonexistent threat that malware may be injected at any time, anywhere in the file system. Malware is downloaded from the network; it doesn't materialize from nowhere. In order to meet that nonexistent threat, commercial AV software modifies or duplicates low-level functions of the operating system, which is a waste of resources and a common cause of instability, bugs, and poor performance.
    By modifying the operating system, the software may also create weaknesses that could be exploited by malware attackers.
    Most importantly, a false sense of security is dangerous.
    8. An AV product from the App Store, such as "ClamXav," has the same drawback as the commercial suites of being always out of date, but it does not inject low-level code into the operating system. That doesn't mean it's entirely harmless. It may report email messages that have "phishing" links in the body, or Windows malware in attachments, as infected files, and offer to delete or move them. Doing so will corrupt the Mail database. The messages should be deleted from within the Mail application.
    An AV app is not needed, and cannot be relied upon, for protection against OS X malware. It's useful, if at all, only for detecting Windows malware, and even for that use it's not really effective, because new Windows malware is emerging much faster than OS X malware.
    Windows malware can't harm you directly (unless, of course, you use Windows.) Just don't pass it on to anyone else. A malicious attachment in email is usually easy to recognize by the name alone. An actual example:
    London Terror Moovie.avi [124 spaces] Checked By Norton Antivirus.exe
    You don't need software to tell you that's a Windows trojan. Software may be able to tell you which trojan it is, but who cares? In practice, there's no reason to use recognition software unless an institutional policy requires it. Windows malware is so widespread that you should assume it's in every email attachment until proven otherwise. Nevertheless, ClamXav or a similar product from the App Store may serve a purpose if it satisfies an ill-informed network administrator who says you must run some kind of AV application. It's free and it won't handicap the system.
    The ClamXav developer won't try to "upsell" you to a paid version of the product. Other developers may do that. Don't be upsold. For one thing, you should not pay to protect Windows users from the consequences of their choice of computing platform. For another, a paid upgrade from a free app will probably have all the disadvantages mentioned in section 7.
    9. It seems to be a common belief that the built-in Application Firewall acts as a barrier to infection, or prevents malware from functioning. It does neither. It blocks inbound connections to certain network services you're running, such as file sharing. It's disabled by default and you should leave it that way if you're behind a router on a private home or office network. Activate it only when you're on an untrusted network, for instance a public Wi-Fi hotspot, where you don't want to provide services. Disable any services you don't use in the Sharing preference pane. All are disabled by default.
    10. As a Mac user, you don't have to live in fear that your computer may be infected every time you install software, read email, or visit a web page. But neither can you assume that you will always be safe from exploitation, no matter what you do. Navigating the Internet is like walking the streets of a big city. It's as safe or as dangerous as you choose to make it. The greatest harm done by security software is precisely its selling point: it makes people feel safe. They may then feel safe enough to take risks from which the software doesn't protect them. Nothing can lessen the need for safe computing practices.

  • I think I have a keylogger virus of some sort

    Hi
    I recently bought somthing from ASOS with my credit card and then the next day that credit card was used for things which I did not authorise, luckily american express sorted it out. I think I have some sort of keylogger virus or osmething becasue ASOS is a trusted website (right???) so I don't think anything went wrong there.
    Any ideas on how to scan for it or get rid of it???
    Cheers.

    Malware should not be your first thought here. There's almost certainly some other explanation. However, if you want to set your mind at ease, get Sophos and do a scan with that. And take a look at my Mac Malware Guide.
    As to what the problem is, most likely the card number was stolen some time previously, and the fact that it was used the day after a particular purchase is likely to be nothing more than coincidence. There are many opportunities for credit card numbers to be stolen, and at this point it may be impossible for you to ever learn how it was stolen. Just cancel the card and have a new one issued.

  • Very New To Java

    Hi, I'm very new to java - 2nd day. Trying to move from Visual FoxPro.
    In testing statements to learn java, I can't seem to get java.util.Scanner.nextInt or nextDouble ... etc. to wait for a keyborad input. Is there something I have to configure before utilizing ...Scanner.nextWhatever?
    I'm using the latest java (just downloaded 2 day ago) and TextPad as my editor.
    Thanks you.

    Hi Petes1234:
    Thanks for you quick response!!!!
    The following is the code very simple ... still my "Hello World!" phase of learning.
    import java.util.Scanner;
    public class ScannerApp
         static Scanner sc = new Scanner(System.in);
         public static void main(String[] args)
              System.out.print("Enter an integer: ");
              int x = sc.nextInt();
              System.out.println("You entered " + x + ".");
    }The above code complies fine. But when I try to run it, it errors out with the following error:
    Enter an integer: Exception in thread "main" java.util.NoSuchElementException
         at java.util.Scanner.throwFor(Scanner.java:838)
         at java.util.Scanner.next(Scanner.java:1461)
         at java.util.Scanner.nextInt(Scanner.java:2091)
         at java.util.Scanner.nextInt(Scanner.java:2050)
         at ScannerApp.main(ScannerApp.java:11)
    See anyting I'm doing wrong here?

  • Change A String Sentence -- Brand new to Java!

    Hello --
    I am brand new to Java, so please excuse my ignorance ...
    i'm working on a very simple project at school, so i dont need any high tech ways of doing this.. lol ... the program prompts the user to enter a sentence .... the program takes this sentence and outputs the first word of the sentence and moves it to the last word of the sentence .... for example:
    user enters: hello how are you today
    the program outputs it: how are you today hello
    this is a practice exercise, but im having trouble .... new student here!! help! lol
    thanks,
    cindy :)

    ok,
    assuming you have the reading the input part and stuff. the most straight forward and explainative way is :
    1. break the sentence into an array of words
    2. print the last word
    3. etc.
    use the java.util.StringTokenizer class. A sentence is a series of words delimited by <space>. String Tokenizer is used like java.util.Enumeration.
    In this case we are going to read the tokens/words in to an array, then you can print them in what ever order.
    like this
    import java.io.*;
    import java.util.*;
    public class wordswitch {
    public static void main(String[] args) {
    String sentence = new String();
    // get the sentence
    System.out.println("enter a sentence : ");
    try {
    BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
    sentence = reader.readLine();
    reader.close();
    } catch( Exception e ) {
    System.out.println("Exception : "+e.getMessage());
    // convert the Sentence in to an array of words
    StringTokenizer strTok = new StringTokenizer(sentence, " ");
    int numWords = strTok.countTokens();
    String [] words = new String[numWords];
    int i=0;
    while( strTok.hasMoreTokens() )
    words[i++] = new String(strTok.nextToken());
    // display the new sentence
    if( numWords < 2 ) // if there is 1 or 0 words just echo back the original sentence
    System.out.println(sentence);
    else {
    // print the words in the new order
    System.out.print( words[numWords-1]+" " ); // last word first
    for( i=1; i<numWords-1; i++ ) // the second word the the second from last word
    System.out.print( words[i]+" " );
    System.out.println(words[0]); // the first word last

  • New to java crypto

    Hi!
    I'm new to Java cryptography, and I have a problem with DES keys, here is sample app:
            String testString = "01234567";
            byte[] keyBytes = "chaslo00".getBytes("UTF-8");
            KeySpec keySpec = new DESKeySpec(keyBytes);
            SecretKeyFactory keyFactory = SecretKeyFactory.getInstance("DES");
            SecretKey secretKey = keyFactory.generateSecret(keySpec);
            // Make bytes from DES key
            DESKeySpec spec = (DESKeySpec) keyFactory.getKeySpec(secretKey, DESKeySpec.class);
            System.out.println("key: " + new String(spec.getKey()));
            Cipher encipher = Cipher.getInstance("DES/CBC/NoPadding");
            encipher.init(Cipher.ENCRYPT_MODE, secretKey);
            byte[] raw = encipher.doFinal(testString.getBytes());
            System.out.println("encoded as base64:");
            System.out.println(new BASE64Encoder().encode(raw));
            Cipher decipher = Cipher.getInstance("DES/CBC/NoPadding");
            decipher.init(Cipher.DECRYPT_MODE,secretKey);
            byte[] decoded = decipher.doFinal(raw);
            System.out.println(new String(decoded));  I tought that I will have 01234567 as an output but, exception:
    Exception in thread "main" java.security.InvalidKeyException: Parameters missing
         at com.sun.crypto.provider.SunJCE_h.a(DashoA6275)
         at com.sun.crypto.provider.DESCipher.engineInit(DashoA6275)
         at javax.crypto.Cipher.init(DashoA6275)is thrown, what parameters are missing? I want to provide key manualy (not from random etc), how to do this? or maybe someone knows a good tutorial about this., oh one more thing - after spec.hetKey() - original key and taken from this is not the same :D any tips?
    tia Andrew

    CBC requires an IV (initialization vector). You don't have one.
    You need something like
    IvParameterSpec iv = new IvParameterSpec(ivBytes);
    with
    encipher.init(javax.crypto.Cipher.ENCRYPT_MODE, key, iv);

  • My NB505-N500BL with windows 7 got a Trojan Horse Virus..

    Hello all,
    OK.. I bought this NB505-N500BL, Serial # a couple years ago, it has Windows 7 Operation system.   I loaned it out to a friend who promptly got a Trojan Horse Virus then sent it back to me.  I cannot find the original CD that came with this computer and I didn't make a recovery disc for it when I bought it.. (silly me)..
    Question:   How do I fix this problem? IS it worth fixing?  can I do it by buying a recovery disc from Toshiba OR do I need to buy new hardware?     
    Thanks..   Frank

    mini notebook NB505-N500BL
    Your support page is here - http://support.toshiba.com/support/modelHome?freeText=2871355
    From your user guide located here - http://support.toshiba.com/support/staticContentDetail?contentId=2865070&isFromTOCLink=false
    Before you start recovery plug in power supply for the entire process:
    You can recover the original factory image (returning the computer
    to its out-of-box state) using the utilities stored on your computer’s
    internal storage drive or using recovery DVDs/media, if you have
    created such media. To recover using the first method, follow the
    procedure below. To recover using the second method, see
    “Restoring from recovery DVDs/media” on page 60.
    To recover the original factory image using the utilities on your
    computer’s internal storage drive:
    1 Make sure the computer is turned off.
    2 Press and hold the 0 (zero) key on your keyboard while
    powering on the computer.
    Getting Started 51
    Recovering the Internal Storage Drive
    3 If your system offers a choice of Windows® 7 32-bit or 64-bit
    operating system, select one at this time. If not, skip to step 4.
    4 A warning screen appears, stating that when the recovery is
    executed all data will be deleted and rewritten. Click Yes to
    continue.
    (Sample Image) Warning screen
    5 When the Toshiba Recovery Wizard opens and the Selecting a
    process screen displays, select Recovery of Factory Default
    Software and then click Next.
    (Sample Image) Selecting a Process screen
    52 Getting Started
    Recovering the Internal Storage Drive
    6 The Recovery of Factory Default Software screen appears.
    Select Recover to out-of-box state.
    (Sample Image) Recovery of Factory Default Software screen
    7 Click Next.
    A confirmation message displays reminding you that all data
    will be lost during the recovery process. Be sure to save your
    work to external media before proceeding (see “Backing up
    your work” on page 93).
    8 Click Next to begin the recovery.
    When the process is complete, a message displays indicating
    that the internal storage drive has been recovered.
    9 Press any key on the keyboard to restart the computer.
    S70-ABT2N22 Windows 7 Pro & 8.1Pro, C55-A5180 Windows 8.1****Click on White “Kudos” STAR to say thanks!****

  • New Release: Java ES 5 Update 1 - **Correction**

    In my entry on Sep 5, 2007 7:34 AM with the topic of "New Release: Java ES 5 Update 1", I incorrectly stated that Sun Application Server 9.1 was certified with Java ES 5 Update 1. It is not. The fully certified and supported web containers are listed in the Java ES 5 Update 1 Release Notes. For now, it is not supported by Java ES 5 Update 1 component products, but future releases of Sun middleware products will, so hang tight. I do apologize for any inconvenience. The official documentation at docs.sun.com should always be considered the source for what is supported and what is not.
    Here is a corrected entry...
    In case you haven't noticed there is a new version of the Java Enterprise System that was posted to the Sun Download site on Friday September 1, 2007. The new release is Java ES 5 Update 1. Here is the main Java ES download page.
    Here are the versions of the individual products that are in Java ES 5 Update 1:
    * Directory Server 6.2 EE
    * Directory Proxy Server 6.2
    * Application Server 8.2 Patch 2
    * Service Registry 3.1 Update 1
    * Access Manager 7.1
    * Portal Server 7.1 Update 2
    * Message Queue 3.7 Update 2
    * Web Server 7.0 Update 1
    * Web Proxy Server 4.0.5
    This release is mainly a maintenance release, with lots of bug fixes. But there are a few new and interesting features included also.
    One interesting feature is the inclusion of Service Tags. Service Tags are digital identifiers that can be embedded in software or firmware and that holds a small amount of product information. The Sun Connection Registration Manager discovers service tags and registers the products and allows you to view and manage your registered products online. You can check out Sun Connection Inventory Channel here. Not all of the Sun Java System components are Service Tag-enabled just yet, but a lot of them are. Here is the list of the components that are Service Tag-enabled:
    * Directory Server 6.2 EE
    * Application Server 8.2 Patch 2
    * Access Manager 7.1
    * Portal Server 7.1 Update 2
    * Web Server 7.0 Update 1
    * Monitoring/JMX framework

    To install Sun Java Stutio 5 update 1 under SuSE
    LInux (tested with SuSE 9.0 Professional, but should
    work with other versions) simply create a text file
    in /etc named suse-release with the follwoing
    content: Sun Java Desktop System 2003
    Now you will be able to install Sun One Stutio 5
    update 1 under SuSE.Did not work - still got (-is:log log.txt):
    Executing launch script command: "/usr/lib/java/bin/java" -cp "/tmp/isjtPgeKd/Verify.jar" "Verify" java.vendor java.version in working directory /root/install/.
    Output from the launch script execution
    StdOut:
    1739021872
    Sun Microsystems Inc.
    1.4.2_04
    ErrOut:
    Found matching JVM at /usr/lib/java/
    Matching JVM home is /usr/lib/java/
    Matching JVM file is /tmp/isjGbTC86
    Executing launch script command: "/usr/lib/java//bin/java" -cp "/tmp/isjPpa0A0/s1s5u1se-linux-en.jar" -Dtemp.dir="/tmp" -Dis.jvm.home="/usr/lib/java/" -Dis.jvm.temp="0" -Dis.media.home="/tmp/isjPpa0A0/s1s5u1se-linux-en.jar" -Dis.launcher.file="/root/install/./s1s5u1se-linux-en.bin" -Dis.jvm.file="/tmp/isjGbTC86" -Dis.external.home="/root/install/." run in working directory /root/install/.
    Output from the launch script execution
    StdOut:
    ErrOut:
    The wizard cannot continue because of the following error: could not load wizard specified in /wizard.inf (104)
    Any help would be greatly appreciated, thnx

  • How to protect yourself against the latest Mac OSX Trojan/worm/"virus"

    Does anyone know if this is true? I saw it on goole news
    How to protect yourself against the latest Mac OSX Trojan/worm/"virus"
    Thanks
    Jason
    [ Edited by Apple Discussions Moderator; href URL ]

    Hi YoungBrando,
    Welcome to the Apple Discussion Pages
    IS there something out there ?
    Apparently so.
    Are people getting lot of there Buddies computers trying to sned them the file ?
    It does not look like it.
    Does this Qualify as a virus ?
    No. It does not pass itself on without some intervention by the users involved.
    Does it qualify as a a Trojan ?
    Yes.
    What to do.
    Don't except files from anyone with the file name mentioned.
    Read this response as well
    Be aware before Unstuffing any unknown files.
    Change the IChat > Preferences > Message section option to Confirm before sending any Files to ON This may not stop the code from getting your computer to send the file without you seeing but it may help based on the way the code is described as being put together generally.
    Symantic's reponse
    In this article Sophos claim it to be the First Virus for OS X
    It also highlights that the main Anti-Virus software houses have already put out an update.
    7:51 PM Friday; February 17, 2006

  • New to Java EE 5

    hi everyone,
    i'm totally new to Java EE...i had used J2SE before to develop desktop applications (and with Swing for GUI too)...and i also used J2SE along with Tomcat to develop some simple web development...
    now i'm going to get into a bigger Java web development project...and i would like to know more about Java EE and other technologies surrounding it...it'd be great if some of you can help =)
    1) do i need Java EE instead of Java SE for web development? i ask because before i did some simple JSP/Servlet stuff with only J2SE SDK and Tomcat...
    2) what is the purpose of Glassfish? i read that it is an application server...what is an application server for? what is the purpose of Glassfish over Java EE SDK/JRE?
    3) for web development in Java, which IDE should i use? Eclipse or NetBeans? what are their pros and cons?
    4) i know in these years, there are several popular java frameworks for web development such as Struts, Spring, etc...now for Java EE 5, what would be a good framework to use? Would JSF be the right direction to go as it is a framework from Sun?
    hmm...i still have a lot more questions....but i'll limit the number of questions in this post...
    thank you for your time and information!! =)

    1) do i need Java EE instead of Java SE for web
    development? i ask because before i did somesimple
    JSP/Servlet stuff with only J2SE SDK and Tomcat...You need Java EE with Java SE, not instead. you mean i need both of them installed? what is the procedure? like if i go to the following link for the SDK of Java EE 5...i still need to go to download SE and install it?
    http://java.sun.com/javaee/downloads/index.jsp
    >
    Tomcat is a web container and it has the
    implementation of the servletjsp classes which are
    available in EE.
    2) what is the purpose of Glassfish? i read thatit
    is an application server...what is an application
    server for? what is the purpose of Glassfish over
    Java EE SDK/JRE?Glassfish is an application server which is used for
    web applications (web container) as well as
    enterprise components like EJB.so Glassfish is a counterpart of Tomcat? like i can use Glassfish instead of Tomcat? how about Apache? i have been using Apache as the web server whilte Tomcat being the app server...how does Glassfish integrate with Apache? or what web server should i use with Glassfish?
    >
    3) for web development in Java, which IDE should i
    use? Eclipse or NetBeans? what are their pros and
    cons?If you are going to use Glassfish, Netbeans would be
    a better choice because it integrates well. For all
    other application servers, I prefer Eclipse because I
    don't know how to configure Netbeans and I have been
    using Eclipse for a long time. The choice of IDE is
    more of personal ease of use rather than actual
    feature comparison.i don't know whether i should use Glassfish...it seems to me that it is expanding...and as i only had very little experience with Tomcat...switching to Glassfish would not be a waste of extra time for me...should i go with Glassfish then? or Tomcat is still considered more stable/reliable/compatible?
    also...if Eclipse is good in other stuff...is it a good idea to find out more about Eclipse's support to Glassfish instead of going for NetBeans?
    >
    4) i know in these years, there are severalpopular
    java frameworks for web development such asStruts,
    Spring, etc...now for Java EE 5, what would be agood
    framework to use? Would JSF be the right directionto
    go as it is a framework from Sun?I haven't ever used JSF to comment on that but I
    would suggest that you use Spring for good and clean
    development.i understand this...as JSF is still quite new and developers have been using Struts and Spring forever...

Maybe you are looking for

  • "No Disk" Error (premiere elements 11)

    I have successfully installed Adobe Premiere Elements 11 on my PC:      Dell XPS 8300       Intel Core i7-2600 Quad Core (3.4 GHz, 8MB Cache)      • 1GB Radeon HD 6450 Graphics      • 16GB DDR3 1333 RAM      • 1TB 7,200RPM Hard Drive (2 x 500GB RAID

  • .gif to .tiff-bug in Mail

    I had the following issue yesterday: when trying to redirect a mail with an animated "gif"-attachment, "Mail" turned the picture into an "unreadable" ".tiff"-file. After dragging the original attachment to my desktop, it revealed as a "normal" ".gif"

  • ECM Records Created with $0.00

    We are setting up Enterprise Compensation Management in ECC 5.0 with MSS.  During the Compensation Planning phase in MSS, where you create adjustments for employees (i.e. merit increases, bonuses, etc.), any employees who are eligible but not granted

  • How to use Unicode_More precisions

    This is my problem i want to code de text into between two "" in a given file.i use Stringtokenizer to select the tokens requered. after gettting the tokens, i have to code them, i.e replace each caracter by its corresponding unicode, something likes

  • MOTU HDX-SDI?

    Hello, All- I'm looking to purchase some new capture hardware (my old Blackmagic Multibridge is getting flaky), and am torn between the HDX-SDI and a Decklink HD Extreme 3D.  I love the potential of the MOTU box, but want to know if anyone here as an