Thursday, 18 May 2017

Ransomware

How to Protect Yourself Against Ransomware ?
By Nishant Sharma on May 18, 2017

Ransom is the payment/money demanded for the release of something which is not in our control.

Last week, a massive ransomware attack using stolen NSA hacking tools disabled an estimated 200,000 computers in more than 150 countries. The ransomware, known as WannaCry, severely affected organizations around the globe, including FedEx, the British National Health Service, car makers Renault and Nissan, and the Russian Interior Ministry.

Like other ransomware, WannaCry encrypts files on the infected computers, making these files inaccessible, and only releases the code to unencrypt the files when the user pays a $300 bitcoin ransom. 1 Bitcoin equals 1812.06 US Dollar. It’s unknown how many companies have paid or plan to pay the ransom, but with critical data like patient records on the line and production lines shut down, companies have often chosen to pay up rather than lose those records forever.

What is, perhaps, most disappointing with this most recent attack is that it was 100% preventable. All the infected machines were running outdated versions of Windows XP or Vista that are no longer being supported by Microsoft. The risks of continuing to use these versions of Windows were well known (and we warned of the need to stop using XP back in 2014), yet organizations failed to take prudent measures to keep their systems up to date. Now they, and in many cases “we”, as customers and clients, are paying the price.

The good news here, to the extent there is good news, is that protecting ourselves against ransomware like Wanna Cry is not difficult. If you follow these simple steps, you should be safe from ransomware and most other cyber threats likely to come your way.

1. Keep your system up to date
If you are running Windows XP or Vista, you should immediately update your system to Windows 10 or buy a new computer. As we warned back in 2014, Microsoft is no longer supporting these ancient versions of Windows and continuing to use then makes you a prime target for cyber-attacks. And even an entry model $500 computer that will be far more powerful than your current XP one.

For those using Windows 7 and newer, make sure that you have Automatic Updates enabled so new security patches get installed as soon as they are available. These versions of Windows had already been patched by Microsoft to specifically prevent these types of ransomware attacks.

2. Use a reliable antimalware program
While antimalware programs can’t defend against every attack, they can prevent the vast majority of commonly-found malware from infecting your computer. And when new malware is discovered, antimalware providers quickly distribute updates to block it. We recommended Kaspersky in our latest analysis of the best antimalware solutions, though Bitdefender and Norton are also excellent options. And antimalware isn’t just for Windows users. Ransomware has been discovered for Macs, too.

3. Back up your data – no, really back up your data
It’s important to back up your data for a number of reasons; and the threat of ransomware is definitely one of them. But it’s not enough just to back up to an external hard drive, or even to the cloud. Many ransomware programs are specifically designed to search out backup devices, even across your network and cloud storage, encrypting everything in its path. To protect yourself, you either have to make regular backups to an external hard drive, which you then detach from your system after the backup (a pain to manage), or use a cloud service that provides automatic versioning so that if the most recent versions are encrypted, you can still recover from earlier versions. We’ve always been fans of Dropbox, which offers a 1TB storage plan for around $100 per year.

4. Keep your browser and plug-ins up to date
Some malware, including ransomware, can be delivered via “drive-by” infections. Taking advantage of vulnerabilities in common browser plugins, like Flash or Java, simply visiting a compromised site, or even viewing a malicious ad on an otherwise safe site, is all it takes for the malware to take hold. So in addition to keeping your operating system up to date, it’s just as important to keep your browser and its associated plug-ins up to date.

5. Avoid ransomware in the first place
The Wanna Cry ransomware was spread by email through an encrypted zip file attachment. You click on the attachment and unzip the file and all your precious files are now toast. This common social engineering trick has been around for years and, despite repeated warnings not to click on unknown email attachments, it’s still as effective as ever, as evidenced by the immense global success of the latest Wanna Cry attack.

DON’T BE THAT PERSON. 
Don’t click on or open files in email unless you know exactly what they are as of from now. 

Wednesday, 10 May 2017

Oracle 11i v/s 12R

I jotted down few points, you may go ahead with these suitable differences :

1)  11i contains oracle forms basis application but R12 is now Oracle forms with HTML pages.

2)  Database Version in 11i (11.5.9 & 11.5.10) was 9i Rel 2 where as in Release 12 its 10g R2 (10.2.0.2)

3)  HTTP Server or Web Server in R12 is Version 10.1.3 which is built on Apache version 1.3.34. In apps 11i it is Version 1.0.2.2.2 built on Apache Version     1.3.19

4)  Jserv in apps 11i is replaced by OC4J (mod_jserv is replaced by mod_oc4j) in R12

5)  Forms Version 6i in Apps 11i is replaced by Forms 10.1.2.0.2 in R12

6)  Reports Version 6i in Apps 11i is replaced by Reports 10.1.2.0.2 in R12

7)  JDBC version is changed from version 9 in apps 11i to version 10.2.0 in Apps R12

8)  modplsql or mod_pls is removed from Apps R12

9)  Java processes use JDK/JRE version 1.5.0 in R12 against JDK version 1.3.1 or 1.4.2 in Apps 11i

x) New INSTANCE_TOP added within Application tier servers in Release 12 for configuration and log files.




Monday, 3 April 2017

Extended Validation EV - SSL/TLS - Secure Sockets Layer / Transport Layer Security Certificate FAQ

1. What is Extended Validation SSL Certificate?
Extended Validation Secure Sockets Layer (SSL) Certificates are special SSL Certificates that work with high security Web browsers to clearly identify a Web site's organizational identity. Extended Validation (EV) helps you make sure a Web site is genuine and verified.
For example, if you use Microsoft® Internet Explorer 7 to go to a Web site secured with an SSL Certificate that meets the Extended Validation Standard, IE7 will cause the URL address bar to turn green. A display next to the green bar will alternatively (toggle) display the organization name listed in the certificate and the Certificate Authority. 
(VeriSign, for example because it is most widely used for SSL/TLS certificates on IOT).

2. Why Are (EV) SSL Certificates Being Implemented?
Malicious and suspicious online activity, phishing attacks have dramatically increased in recent years, creating a heightened need for improved visibility of security.
Before you share your confidential data online, you require proof of identification from a trusted source. The Extended Validation SSL Standard raises the bar on verification of SSL Certificates and enables visual displays in high security browsers. (EV) SSL Certificates empower you to protect yourself online.

3. What are High Security Browsers?
Users of high-security browsers will see visual cues that are triggered by the presence of an (EV) SSL Certificate. If you're familiar with red-light/green-light intersections, you'll understand the basic concept.
  • Green tells you it's safe and the site is legitimate.
  • Red tells you to stop, usually because the site isn't secure.
The EV SSL certificate supports Microsoft® Internet Explorer (IE) 7* and 8, Firefox 3 and Safari 3.2, Google Chrome and Flock. These versions and above are applicable.
Other browsers are expected to offer Extended Validation visibility in upcoming releases. Older browsers will display Extended Validation SSL Certificates with the same security symbols as existing SSL Certificates.

4. How does EV-SSL work?
  • Extended Validation -SSL, or EV-SSL for short, means that OnlineSBI site has undergone many rigorous checks to confirm its validity, and has been provided with a 'certificate of authenticity' which is recognized by high end browsers.
  • In the majority of cases, this validation is shown in the browser address bar, displaying a 'traffic light' style response of green, or red. This feature gives you the added confidence of knowing the site you're using has been confirmed as genuine.
  • The EV-SSL certificate of authenticity is recognised by most browsers, though there are variations in the way the different browsers display the validation.
  • The majority of users running Internet Explorer versions 7 and 8 (IE7 and IE8), Mozilla Firefox 3, Opera 9.5 and Safari 3.2 will see the following 'traffic light' responses on their address bars:
    • Authenticated websites will display a GREEN address bar plus a padlock symbol, referencing the certificate and the authenticated website provider.
    • Websites identified as fraudulent and a phishing site, or as having a revoked or expired validation certificate, will display a RED address bar.
    • Users running Internet Explorer 6 (IE6), Mozilla Firefox 2 will continue to see the standard address bar along with the padlock symbol. No 'traffic light' notification will be displayed.
  • It is recommended that you upgrade your browser to a version that is compatible with EV-SSL. You can upgrade your browser version from your browser providers' website.

5. Why wouldn't the IE7 browser recognize EV?
A browser identifies an SSL Certificate as authentic by checking if the certificate matches a valid SSL root resident on the client machine. VeriSign signs every EV SSL Certificate with two roots: an EV root and a traditional SSL root. With these two roots, every browser can identify a valid SSL root, even older browsers that do not yet recognize EV.
IE7 is designed to recognize Extended Validation, but may not correctly display in Windows XP because the traditional SSL root is matched rather than the EV root. Windows XP systems do not automatically update the root store.
Developed before the EV standard existed, Windows XP systems do not have the EV root locally resident unless it has been manually updated and, because the browser recognizes the traditional SSL root, it has no trigger to update the root store. VeriSign EV Upgrader technology, built directly into the VeriSign Secured® Seal, will trigger this manual update. Explorer 7 on Vista is designed to automatically update the root store on a weekly basis and should always recognize an EV Certificate and display it appropriately.

Thursday, 15 December 2016

Common Interview questions for Java Developer


Tell me about yourself?
Tell me about your project?

What are the different features of oops?
What is Design Pattern? Describe some design patterns with example.
What is singelton Class? Write a code for it.
What is dynamic polymorphism? Write a code for explanation.
What is reflection mechanism in java?
What is CompiletimeException/CheckException and RuntimeException/UncheckedException?
What is static binding/Early binding and dynamic binding/late binding? Show by code.
What is the difference between ArrayList and LinkedList?
(mainly during insertion, deletion or traverse which is more used)
What are the new features Java7 & Java8?
What are the uses of marker interface? What are the different types avaialable for marker interface ?
What are the different type of cloning u used and when ?
What are the different way to create a thread object? write a code to create it.
What are Association, aggregation and composition in Java?
What are differences available for abstract classes and interface?
What is Deadlock,startvation and inter thread communication in java?
What are differences available for HashMap & HashTable?
What is the difference between synchronized block and synchronized method?
What is fail safe and fail fast?
Have you used any static code analysis tools?
Have static code analysis tools will improve performance? (JLint, Sonar and CheckStyle)
Have you done remote debugging? What is your debugging strategy if a production issue come?
What are the uses of volatile and transient variables in java?
What are the differences between differences ways of creating String object?
What are the different ways for garbage collection?
What are the differences between heap and stack memory?
What is the difference between Comparable and Comparator interface?


How HashMap internally works?
How can you sort the employee object on the basis of thier salary ?
How HashSet internally uses HashMap?
How Map & set being iterated?
How can you handle exception during method overriding?
How can you implement your own LinkedList/HashMap in java?
How can i reverse the one array using same array only?
How can i find the duplicate numbers available in any array ?
How can i sort one array using single iteration?
How can i found the 2nd highest number from an array in single iteration?
How will you manage producer and consumer problems? How can you prevent deadlock in java?
How dead lock is different from race conditions
How do you improve performance of an application?
How conscious you were with security issues while coding?
How a bad program can cause security threat?
How can i throw or catch an exception?
how to find that is there is any consecutive repeating characters within a string?
How and which sort algorithm you would use for sorting a char array?
How bitly shortens the URLs ?
How do you delete a node in Binary Search Tree?
How to write a code that causes deadlock?
How would you implement your own thread pool in java?

Thursday, 8 December 2016

Angular JS Frequently asked questions

What is the difference between ng-show and ng-if ?

what are the different ways to share the data across multiple controllers ?

What are difference between controller and directives ?

What are the best features so we love to use angular apart from other js framework ?

What is difference between filter and service ?

What are the different type of scope you used inside angular ?

What is promise, watch, digest, apply, timeout and $q inside angular ?

What are the use of route & state in angular ?

can i use 2 different module inside same application ?

What Single page application means actually for which i'm using angular js ?

What is the difference between $scope and $rootScope ?

How we can write success & error within $http call to communicate within any methods ?

What is the difference between ng-paginate and ng-repeat ?

What is the difference when using ng-click and anchor href ?

What are the uses of restrict in angular js and how many types of restriction are in use ?

when we use query param to share data between multiple controller ?

Wednesday, 7 December 2016

Important Differences available inside Collection Frameworks











Most Frequently used Java Questions

http://howtodoinjava.com/core-java/interviews-questions/real-java-interview-questions-asked-for-oracle-enterprise-manager-project/

1)  What is abstraction and encapsulation in java ?

2)  What is method overloading rules? Can we overload the super class method in sub class?                     Discussion happened with the example.

3)  What is method overriding rules?

4)  What is widening and narrowing in java? discussion happened with example?

5)  Can I have only try block in code?

6)  Threads : producer and consumer problem?

7)  Why wait(), notify() and notifyAll() are defined in Object class?

8)  Can we override wait() or notify() methods?

9)  Difference between wait(), sleep() and yield()?

10) Explain about join() method in thread class

11) Have you faced out of memory error? If yes how you fixed ? Tell different scenarios why it
      comes?

12) Database connection leakage?

13) To avoid this extra overhead every time, double checked locking principle is used what is that ??

14) What is Java Singleton Pattern ?? how are the different way to create a singleton class either by            thread safe or non thread safe ??
http://www.journaldev.com/1377/java-singleton-design-pattern-best-practices-examples

15) Rules of Exceptions during Method Overriding & Overloading
http://www.javatpoint.com/exception-handling-with-method-overriding

16) How to get data from HashMap & HashSet?

17) I have two arrays which contains integer. Write a program to merge those two arrays and remove       duplicate elements? At the end, I need one array which should have unique elements?

18) Write a program on Singleton?

19) Write a program to sort an array and remove duplicates?

20) Write a program to fetch the data from a table using JDBC and result set?

21) What happens if i write return in try block? Will finally executes? What happens if write                      system.exit(), will finally block executes?

22) Different type of design patterns used before ?
http://www.vogella.com/tutorials/DesignPatterns/article.html
http://www.java67.com/2012/09/top-10-java-design-pattern-interview-question-answer.html

23)  Can you override a private or static method in Java?

24) What will happen if we put a key object in a HashMap which is already there?

25) If a method throws NullPointerException in the superclass, can we override it with a method               which throws RuntimeException?

26) Difference between compareTo and compare in java

27) How do you ensure that N thread can access N resources without deadlock?

28) What is the difference between StringBuffer and StringBuilder in Java?

29) Can you access a non-static variable in the static context?

30) is it possible to load a class by two ClassLoader?

31) is it possible for equals() to return false, even if contents of two Objects are same?

32) How does "has before" apply to volatile work?

33) What happens when an exception is thrown by a Thread?

34) Difference between System.exit() and System.halt() method?

35) difference between BLOB and CLOB

36) Why character array is better than String for Storing password in Java?

37) How to create a thread-safe singleton in Java using double-checked locking?

38) Write Java program to create a deadlock in Java and fix it ?

39) Why is String immutable in Java?

40) Why does Java not support operator overloading ?

41) Why is multiple inheritances not supported in Java ?

42) Why wait and notify is declared in Object class instead of Thread ?

43) What happens if your Serializable class contains a member which is not  serializable? How do              you fix it?

44) Why wait and notify  called from synchronized method in Java?

45) Why does Java not support operator overloading ?

46) Why is multiple inheritances not supported in Java ?

47) Can we overload a static method in Java?

48) Can we override a static method in Java?

49) Can we prevent overriding a method without using the final modifier?

50) Can we override a private method in Java?

51) What is covariant method overriding in Java?

52) Can we change the return type of method to subclass while overriding?

53) Can we change the argument list of an overriding method?

54) Can we override a method which throws runtime exception without throws clause?

55) How do you call superclass version of an overriding method in sub class?

56) Can we override a non-static method as static in Java?

57) Can we override the final method in Java?

58) Can we have a non-abstract method inside interface?

59) What is the default method of Java 8?

60) Can we make a class both final and abstract at the same time?

61) Can we overload or override the main method in Java?

62) What is the difference between Association, Aggregation, and Composition in OOP?

63) What problem is solved by Strategy pattern in Java?

64) Which OOP concept Decorator design Pattern is based upon?

65) What is the difference between Decorator, Proxy and Adapter pattern in Java?

66) Consider the following Java code snippet,

which is initializing two variables and both are not volatile, and two threads T1 and T2 are modifying these values as following, both are not synchronized
int x = 0;
boolean bExit = false;

Thread 1 (not synchronized)
x = 1;
bExit = true;

Thread 2 (not synchronized)
if (bExit == true)
System.out.println("x=" + x);
Now tell us, is it possible for Thread 2 to print “x=0”?

Answer: It's impossible for a list of tricky Java questions to not contain anything from multi-threading. This is the simplest one I can get. Answer of this question is Yes, It's possible that thread T2 may print x=0.Why? because without any instruction to compiler e.g. synchronized or volatile, bExit=true might come before x=1 in compiler reordering. Also, x=1 might not become visible in Thread 2, so Thread 2 will load x=0. Now, how do you fix it?

 When I asked this question to a couple of programmers they answer differently, one suggests to make both threads synchronized on a common mutex, another one said make both variable volatile. Both are correct, as it will prevent reordering and guarantee visibility.

But the best answer is you just need to make bExit as volatile, then Thread 2 can only print “x=1”. x does not need to be volatile because x cannot be reordered to come after bExit=true when bExit is volatile.

JSP interview questions and answers

Q1. What is JSP and why do we need it? JSP stands for JavaServer Pages. JSP is java server side technology to create dynamic web pages. J...