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

Sunday, 26 May 2013

How to Setup Chroot SFTP in Linux (Allow Only SFTP, not SSH)



If you want to setup an account on your system that will be used only to transfer files (and not to ssh to the system), you should setup SFTP Chroot Jail as explained in this article.
In a typical sftp scenario (when chroot sftp is not setup), if you use sftp, you can see root’s file as shown below.
If you want to give sftp access on your system to outside vendors to transfer files, you should not use standard sftp. Instead, you should setup Chroot SFTP Jail as explained below.
Non-Chroot SFTP Environment
In the following example (a typical sftp environment), abc can sftp to the system, and view /etc folder and download the files from there.
# sftp abc@xcessl0gycs.com
abc@xcessl0gycs's password:
sftp> pwd
Remote working directory: /home/abc

Tuesday, 14 May 2013

20+ .htaccess Hacks Every Web Developer Should Know About


Apache's .htaccess(hypertext access) configuration file can be a very powerful tool in a web developer's toolkit if used properly. It can be found in the webroot of your server and can be easily edited using any text editor. In this article I'm going to show you 20 .htaccess hacks and how to use them.
Before I start with this article I'd like to start by saying that abusing the .htaccess file will hurt the performance of your website. The .htaccess file should only be used if you have no other way to achieve certain things.
Make sure to back up your current .htaccess file before applying any of the following hacks.

1. Prevent Hotlinking

Tired of people using your bandwidth by putting the images hosted on your server on their website? Add the following code at the bottom of your .htaccess file to prevent hotlinking.
1Options +FollowSymlinks
2#Protect against hotlinking
3RewriteEngine On
4RewriteCond %{HTTP_REFERER} !^$
5RewriteCond %{HTTP_REFERER} !^http://(www.)?domainname.com/ [nc]
6RewriteRule .*.(gif|jpg|png)$http://domainname.com/img/stop_stealing_bandwidth.gif[nc]
NOTE: The following article explains better methods to "prevent" hotlinking:
Link building secrets by Maurizio Petrone

Monday, 6 May 2013

How to check what we have Installed in Debuian/Ubuntu OS


To check what have install by listing all using dpkg is easy.
dpkg -l
To check whether a package is install also easy.
dpkg -l | grep apache
The command above is some how redundant, because dpkg support wild characters, doing this instead
dpkg -l "apache*"
By doing this, it will also list the package that not install but available in dpkg cache, to install them you can simply apt-get. To indicate the packages installed it shows “ii” and not install shows “un”.

Thursday, 11 April 2013

How to Enable and Disable Root Login in Ubuntu 12.04 TLS

We have recently installed Ubuntu 12.10 Desktop and Ubuntu 12.10 Server, we have nowhere asked to supply root password during installation. Generally in Linux, root user does exist and we need to supply root password during installation. By default root account is disabled in Ubuntu Linux because of security reason and you cannot login as root user directly or su - (Switch User) to become a root. You need to add sudo (superuser do) before actual command if you want to run all administrative commands and you need to supply your password when prompts for password.


Sudo is allowed user to become superuser for temporary to run superuser administrative tasks.
During installation only allow to create new user which has no root ( aka super user) privileges. But same user is allowed to execute sudo commands. Configuring sudo access for users, need to configure /etc/sudoers.
We’ll be covering the usage of SUDO and also we are going to show you tips & tricks to become root user.

Sunday, 13 January 2013

Passive-interface command behavior in RIP, EIGRP & OSPF


Passive-interface command is used in all routing protocols to disable sending updates out from a specific interface. However the command behavior varies from o­ne protocol to another.

In RIP this command will disable sending multicast updates via a specific interface but will allow listening to incoming updates from other RIP speaking neighbors.

This simply means that the router will still be able to receive updates o­n that passive interface and use them in the routing table.

In EIGRP the passive-interface command stops sending outgoing hello packets, hence the router can not form any neighbor relationship via the passive interface. This behavior stops both outgoing and incoming routing updates.

In OSPF the passive-interface has a similar behavior to EIGRP. The command suppresses hello packets and hence neighbor relationships.

Wednesday, 7 November 2012

Explain Intrusion detection system (IDS)?? Types OF IDS...


An intrusion detection system (IDS) is a device or software application that monitors network or system activities for malicious activities or policy violations and produces reports to a Management Station. Some systems may attempt to stop an intrusion attempt but this is neither required nor expected of a monitoring system. Intrusion detection and prevention systems (IDPS) are primarily focused on identifying possible incidents, logging information about them, and reporting attempts. In addition, organizations use IDPSes for other purposes, such as identifying problems with security policies, documenting existing threats and deterring individuals from violating security policies. IDPSes have become a necessary addition to the security infrastructure of nearly every organization.
IDPSes typically record information related to observed events, notify security administrators of important observed events, and produce reports. Many IDPSes can also respond to a detected threat by attempting to prevent it from succeeding. They use several response techniques, which involve the IDPS stopping the attack itself, changing the security environment (e.g. reconfiguring a firewall), or changing the attack's content.

Sunday, 2 September 2012

Syness-The IT Regulatory and Standards Compliance Handbook: How to Survive Information Systems Audit and Assessments | For ISO 27001(BS7979), PCI-DSS, HIPPA, FISCAM, COBIT


The IT Regulatory and Standards Compliance Handbook: How to Survive Information Systems Audit and Assessments

Publisher: Syngress 2008 | 750 Pages | ISBN: 1597492663 | PDF | 11 MB

This book provides comprehensive methodology, enabling the staff charged with an IT security audit to create a sound framework, allowing them to meet the challenges of compliance in a way that aligns with both business and technical needs. This “roadmap” provides a way of interpreting complex, often confusing, compliance requirements within the larger scope of an organization’s overall needs.

Thursday, 19 July 2012

Cisco Router - How to configure SSH

Below shows you how to enable SSH on your router using a username of "cisco" and a password of "network", allowing access from the fa0/0 interface.
Router(config)#ip ssh source-interface fastEthernet 0/0
Router(config)#ip ssh authentication-retries 3
Router(config)#ip ssh version 2

Router(config)#ip domain-name local.net
Router(config)#crypto key generate rsa modulus 768
Router(config)#username cisco password 7 network

Router(config)#line vty 0 15
Router(config-line)# transport input ssh
Router(config-line)# local login

Saturday, 14 July 2012

Configuring the Cisco IDS Router / Switch Modules for Cisco 6500 Switch / 7200 Router

IDSM-2
The IDSM-2 Module is a Cisco IDS blade for the Cisco 6500 switch.
Once you install the module into the switch the module uses following logical ports :
Port 1Used for TCP Resets (In Promiscuous Mode)
Port 2Command and Control
Port 7Sensing Port
Port 8Sensing Port
Below details the steps required for configuring your switch / module for an inline setup. This includes obtaining the module number for the cisco ids running the setup wizard and then assigning the required ports for on the switch for ids sensing within an inline configuration. The clear trunk commands are required as by default the switch assigns the ports as trunk ports to every vlan.

Saturday, 30 June 2012

Types of Firewalls


Firewalls are everywhere today even many home network have firewalls today. But there are several different types of firewalls. You have hardware, software firewalls, stateful, stateless firewalls, proxy, application, desktop, dual-homed, reverse, etc

Some of which are explained below:

Tuesday, 26 June 2012

How to configure a Cisco Layer 3 switch-InterVLAN Routing



Cisco Catalysts switches equipped with the Enhanced Multilayer Image (EMI) can work as Layer 3 devices with full routing capabilities. Example switch models that support layer 3 routing are the 3550, 3750, 3560 etc.

On a Layer3-capable switch, the port interfaces work as Layer 2 access ports by default, but you can also configure them as Routed Ports which act as normal router interfaces. That is, you can assign an IP address directly on the routed port. Moreover, you can configure also a Switch Vlan Interface (SVI) with the “interface vlan” command which acts as a virtual layer 3 interface on the Layer3 switch.

On this post I will describe a scenario with a Layer3 switch acting as “Inter Vlan Routing” device together with two Layer2 switches acting as closet access switches.

Sunday, 24 June 2012

How to Configure a Cisco ASA 5510 Firewall – Basic Configuration Tutorial


This article gets back to the basics regarding Cisco ASA firewalls. I’m offering you here a basic configuration tutorial for the Cisco ASA 5510 security appliance. This device is the second model in the ASA series (ASA 5505, 5510, 5520 etc) and is fairly popular since is intended for small to medium enterprises. Like the smallest ASA 5505 model, the 5510 comes with two license options: The Base license and the Security Plus license. The second one (security plus) provides some performance and hardware enhancements over the base license, such as 130,000 Maximum firewall connections (instead of 50,000), 100 Maximum VLANs (instead of 50), Failover Redundancy, etc. Also, the security plus license enables two of the five firewall network ports to work as 10/100/1000 instead of only 10/100.

Next we will see a simple Internet Access scenario which will help us to understand the basic steps needed to setup an ASA 5510. Assume that we are assigned a static public IP address 100.100.100.1 from our ISP. Also, the internal LAN network belongs to subnet 192.168.10.0/24. Interface Ethernet0/0 will be connected to the outside (towards the ISP), and Ethernet0/1 will be connected to the Inside LAN switch. 

Friday, 22 June 2012

Checkpoint : Mount USB Memory Stick / Pen Drive to Splat

Ever wanted to use an USB stick on OpenServer using SPLAT or an appliance?

Just connect the device to an USB port of your choice.

1. Load the appropriate kernel module for handling the USB device.
* modprobe usb-storage

2. Check which new device was bound, for example "/dev/sda1".
* fdisk -l

3. Create a mount point.
* mkdir /mnt/usbdisk

4. Mount USB device.
* mount /dev/sdb1 /mnt/usbdisk

5. Use the device to transfer data as you like.   "[DATA Transafer]"

6. Unmount USB device.
* umount /mnt/usbdisk


Thursday, 21 June 2012

How Traceroute Command Works ??

                                   Traceroute

What is Traceroute?
It is an application layer implementation to find the hops when a packet traverses to a destination.

What are the Protocols Used in Traceroute?
Traceroute works with combination of both ICMP and UDP. It mainly relies on ICMP Time-to-Live Exceeded (Type 11).

Wednesday, 20 June 2012

DDNS - Dynamic Domain Name System | What is DDNS , DNS

DDNS - Dynamic Domain Name System
We Know All before sending anything to his mail server, he will read the database from the public server for the latest ip address of mail server and put it as destination address.. But twas a small problem, at times after fetching the latest public ip of mail server, ISP DHCP renews the IP lease of mail server, hence the message lost.

Again after some time I started thinking about a vpn connectivity from an office which doesn't have public address, so the idea of DDNS came,

Before explaining DDNS, I hope you all have a good idea about DNS, For those who dont know, DNS is the one to one mapping between name to ip address. But in DNS its will not get updated dynamically and it may take even more than 24 hrs to get updated in the root DNS servers. Here come DDNS.

Tuesday, 19 June 2012

Top Ten Tips for Managing Your CheckPoint Firewall


This article discusses the Top ten tips that you can implement to best manage and fine tune your firewall. The purpose of this article is to get the best performance out of your firewall and increased security to your network.

1. Use the latest version of the OS software available for your particular firewall. Install the latest patches and if possible/applicable, the latest software version available.

2. Use a stealth Rule at the top of the rule base.

What is a stealth rule? A stealth rule is a rule which disallows any communication to the firewall itself from unauthorized networks/hosts. It is a rule to protect the firewall itself from attacks.

Monday, 18 June 2012

Different Types of Firewalls


Companies such as Cisco and other major vendors have introduced a multitude of firewall products that are capable of monitoring traffic using different techniques. Some of today's firewalls can inspect data packets up to Layer 4 (TCP layer). Others can inspect all layers (including the higher layers) and are referred to as deep packet firewalls. This section defines and explains these firewalls. 

The three types of inspection methodologies are as follows:
  • Packet Filtering and Stateless Filtering.
  • Stateful Filtering.
  • Deep Packet Layer Inspection.

Blue Coat ProxySG - CLI Commands


Here is a list of Blue Coat ProxySG CLI commands, that I have compiled from my studies, Blue Coat documents, and places around the web. This is by no means an exhaustive or comprehensive list, but is rather meant to be a command line KB of sorts - mainly for my quick reference. The list is split into standard and privileged mode commands. If the list proves useful to you, please feel free to share the link with others. Also, if you see any typo's with anything, feel free to let me know!

Checkpoint - Log File Corrupted



When log files get corrupted and we get the following error in the SmartView Tracker : "Failed to read record number" …
Note: "To repare the log file we need to know the log file name and then from the CLI on the CLM/CMA or from the Smartcenter "


Then use the following command :

[Expert@mlm]# fw repairlog


******************************************************************************************************
****************************************************************************************************** 

What Is SIC (Secure Internal Communication) in Checkpoint Firewall

SIC - Encryption, Authentication and Secure Channel

The following security measures are taken to ensure the safety of SIC:

Certificates for authentication.

Standards-based SSL for the creation of the secure channel.

3DES for encryption.


******************************************************************************************************
******************************************************************************************************