Friday, February 19, 2010

What icefaces??

where open source Ajax developers can learn, share, and contribute information and ideas to a growing community of enterprise Ajax JSF developers. ICEfaces.org provides a wide range of development and support resources to benefit all Java developers looking to build rich J2EE Ajax applications. Source code and pre-bundled IDE tool integrations are available for download. Numerous tutorials, on-line support, user forums and sample code are all easily accessible to help get you up and developing open source Ajax applications that much quicker.

To get more explain about this new technology. refer to icefaces website :

We need to use some tools :
1. Eclipse IDE for Java EE Developers v3.5 (Galileo)
This bundle includes required Eclipse WTP v3.1 (Web Tool Platform). It can be downloaded from
http://www.eclipse.org/downloads/packages/eclipse-ide-java-ee-developers/galileor
2. ICEfaces- 1.8–Eclipse- 3.5.0-plugins- v3.6.1.zip
This is core package of ICEfaces Eclipse Integration. It can be downloaded from
http://www.icefaces.org/main/downloads/os-downloads.iface.


JSF is using for building server-side user interfaces that will make web application development even easier.


I will explain how to start the JSF..
  1. You must locate the latest stable version of Tomcat from website. To minimize installation complexities, choose the "zip" file.
  2. You need to save the zip file (named something like gina-tomcat-5.5.7.zip) to your computer.
  3. Then unzip the file into a directory of your choice (such as /usr/local or c:\). The program is contained in a subdirectory named something like jakarta-tomcat-5.5.7.
  4. Then download the latest version of the JSF Reference Implementation from http://java.sun.com/j2ee/javaserverfaces/download.html
  5. Save the zip file (named something like jsf-1_1_01.zip) to your computer.
  6. Unzip the file into a directory of your choice (such as /usr/local or c:\). The program is contained in a subdirectory named something like jsf-1_1_01.
    NOTE: For your own sanity,
    do not unzip into a directory containing spaces (such as Program Files or My Documents).
  7. Copy all JAR files files from the lib subdirectory of your JSF installation (such as c:\jsf-1_1_01\lib) to the common/lib subdirectory of Tomcat
  8. Copy the following two JAR files from the webapps/jsp-examples/WEB-INF/lib subdirectory of your Tomcat installation.
    • jstl.jar
    • standard.jar
  9. to get a detail and more explaination, refer this website http://www.horstmann.com/

the facade

The Facade design pattern simplifies complex APIs by providing a simplified interface to a complex subsystem.


Below is example of using the facade in application :

package MyProjectAPI;

import java.util.Vector;

public class MyFacade
{
ProjectAPI api;
public MyFacade()
{
api = new ProjectAPI();
}
public void addUserLogin(Project_Bean bean)
{
api.addUserLogin(bean);
}
public Vector getUserLogin()
{
return api.getUserLogin();
}
}

File name : MyProjectAPI.java

package MyProjectAPI;

public class CreateTable
{
//table tbl_login
static final String _tbl_login = "create table tbl_login (username varchar(12), password varchar(6), access_level(1), status varchar(5), logTime varchar(20))";
/**
* return tbl_login
*/
static String tbl_login()
{
return _tbl_login;
}
//table tbl_staff
static final String _tbl_staff = "create table tbl_staff(_staffName varchar(30),_staffIc varchar (12),_staffPhone varchar (10),_staffId varchar(15), _staffPassword varchar(6),_accessLevel varchar(5),_status(5))";
/*
* return tbl_staff
*/
static String tbl_staff()
{
return _tbl_staff;
}
//tbl_pakej
static final String _tbl_pakej = "create table tbl_pakej(_pakejId varchar (10),_jenisPakej varchar(1), _namaPakej varchar(30),_tempoh varchar(20)," +
"_tarikhBertolak varchar (30),_tarikhTiba varchar (30),_harga varchar(10), _gambarHotel varchar(60),_jenisBilik varchar(15),_status varchar(15)," +
"_jenisPenerbangan varchar (25))";

/*
* return tbl_pakej
*/
static String tbl_pakej()
{
return _tbl_pakej;
}
//tbl_user
static final String _tbl_user = "create table tbl_user(_namaPertama varchar(30),_namaKedua varchar(30),_ic varchar(12)," +
",_umur varchar(3),_jantina varchar(1),_email varchar(30),_handphone varchar(10),_gambarPassport varchar(50),"+
"_telRumah varchar(9),_warganegara varchar(1),_alamat varchar(50),_accessLevel(5),_status(5),_noPassport varchar (20)," +
"_jenisPassport varchar(20),_tarikhMula varchar (15),tarikhTamat varchar(15), _pilihanPenerbangan varchar (20)," +
"_noAkaun varchar int (20),_jenisBank varchar(30),_jumlahBayaran varchar (10),_jenisPenyakit varchar(40), _ubat varchar(35),_orangKecemasan1 varchar(100)," +
"_orangKecemasan2 varchar(100),_orangKecemasan3 varchar(100))";

static String tbl_user()
{
return _tbl_user;
}
static final String _tbl_registration = "create table tbl_registration(_idRegister int (10),_tarikh varchar(20),"+
"_statusBayaran varchar(15),_keluargaTerlibat1 varchar(100),_keluargaTerlibat2 varchar(100),_keluargaTerlibat3 varchar(100)," +
"_keluargaTerlibat4 varchar(100),_keluargaTerlibat5 varchar(100))";
static String _tbl_report = "create table tbl_report(_idReport int(6),_status varchar(30),_tarikh date," +
"_idPakej varchar(30),_jenisKeterangan varchar(100))";
}





A code can be divided into a few package/ folder called bean, api, database Connection, function,report, search..


  1. bean - for set the attribute get and set
  2. api - for engine code and application that will we called to apply in project
  3. database connection - so create a database connection and set the location of database
  4. function - to do a code for function or module
  5. report - i develop all the code into this folder
Example code: staff.java

package MyProjectAPI.bean;

public class staff
{
private String _staffId;
private String _staffPassword;
private String _accessLevel;
private String _status;
private String _staffName;
private String _staffIc;
private String _staffPhone;
private String _staffEmail;
public String get_staffId() {
return _staffId;
}
public void set_staffId(String id) {
_staffId = id;
}
public String get_staffPassword() {
return _staffPassword;
}
public void set_staffPassword(String password) {
_staffPassword = password;
}
public String get_accessLevel() {
return _accessLevel;
}
public void set_accessLevel(String level) {
_accessLevel = level;
}
public String get_status() {
return _status;
}
public void set_status(String _status) {
this._status = _status;
}
public String get_staffName() {
return _staffName;
}
public void set_staffName(String name) {
_staffName = name;
}
public String get_staffIc() {
return _staffIc;
}
public void set_staffIc(String ic) {
_staffIc = ic;
}
public String get_staffPhone() {
return _staffPhone;
}
public void set_staffPhone(String phone) {
_staffPhone = phone;
}
public String get_staffEmail() {
return _staffEmail;
}
public void set_staffEmail(String email) {
_staffEmail = email;
}
}

This is example to connect the database with application by using Microsoft Access, javaDB,MySQL.
Example : ConnectDB.java

package MyProjectAPI.datasource;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public class ConnectDB
{

//driver for JavaDB
private static String _driver ="org.apache.derby.jdbc.EmbeddedDriver";
private static String dbName="MyDB";
private static String connectionURL = "jdbc:derby:" + ConnectDB.dbName + ";create = true";
//function for connect to JavaDB
public static Connection connectDbase() throws ClassNotFoundException, SQLException
{
Class.forName(ConnectDB._driver);
return DriverManager.getConnection(ConnectDB.connectionURL);
}
//function for connect to Ms. Access
/*public static Connection connectDbase() throws ClassNotFoundException, SQLException
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
String dbPath = "C:\\Program Files\\Apache Software Foundation\\Tomcat 6.0\\webapps\\FTMKIS\\DB\\FTMKIS.mdb";

//String dbPath = "C:\\DB\\FTMKIS.mdb";
String myDB = "jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};DBQ="+dbPath;
return DriverManager.getConnection(myDB,"","");
}*/
//driver for MySQL
/*private static final String JDBC_DRIVER = "com.mysql.jdbc.Driver";
private static String mysql_host = "localhost";
private static String mysql_user = "root";
private static String mysql_password = "1234";
private static String mysql_db = "ftmkis";
private static final String DATABASE_URL = "jdbc:mysql://localhost/ftmkis";

function for connect to MySQL
public static Connection connectDbase() throws ClassNotFoundException, SQLException
{
Class.forName(ConnectDB.JDBC_DRIVER);
return DriverManager.getConnection(ConnectDB.DATABASE_URL,ConnectDB.mysql_user,ConnectDB.mysql_password);
}*/
}


This is example the engine of code use to create, update, view,delete, list,checkpassword, checkId.
Example : StaffDB.java

package MyProjectAPI.function;

import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.Vector;

import MyProjectAPI.bean.staff;
import MyProjectAPI.datasource.ConnectDB;

public class staffDB
{
public int checkId(String condition) throws ClassNotFoundException, SQLException
{
Connection conn = ConnectDB.connectDbase();

int updateStatus = 0;
PreparedStatement prep = conn.prepareStatement("SELECT COUNT(_staffId)FROM tbl_staff WHERE _staffId= ?");
prep.setString(1, condition);
ResultSet resultset = prep.executeQuery();
while(resultset.next())
{
updateStatus = resultset.getInt(1);
}
if(conn != null)
conn.close();
return updateStatus;
}
public int checkPassword(String _userId, String _password) throws ClassNotFoundException, SQLException
{
int updateStatus = 0;
String pass = String.valueOf(_password.hashCode());
Connection conn = ConnectDB.connectDbase();
PreparedStatement prep = conn.prepareStatement("SELECT COUNT(_staffId) FROM tbl_staff WHERE _staffId=? AND _staffPassword = ?");
prep.setString(1, _userId);
prep.setString(2, pass);
ResultSet resultset = prep.executeQuery();
while(resultset.next())
{
updateStatus = resultset.getInt(1);
}
if(conn != null)
conn.close();
return updateStatus;
}
public int addStaff(staff Staff)throws SQLException, ClassNotFoundException
{
int updateStatus;
Connection conn = ConnectDB.connectDbase();
PreparedStatement prep = conn.prepareStatement("INSERT INTO tbl_staff(_staffId,_staffPassword,_accessLevel," +
"_status,_staffName,_staffIc,_staffPhone,_staffEmail) VALUES(?,?,?,?,?,?,?,?)");
prep.setString(1, Staff.get_staffId());
prep.setString(2, Staff.get_staffPassword());
prep.setString(3, Staff.get_accessLevel());
prep.setString(4, Staff.get_status());
prep.setString(5, Staff.get_staffName());
prep.setString(6, Staff.get_staffIc());
prep.setString(7, Staff.get_staffPhone());
prep.setString(8, Staff.get_staffEmail());
updateStatus = prep.executeUpdate();
if(conn != null)
conn.close();
return updateStatus;
}
public int updateStaff(staff Staff) throws SQLException, ClassNotFoundException
{
int updateStatus;
Connection conn = ConnectDB.connectDbase();
String state = "UPDATE tbl_staff SET";
state += " _staffPassword = ?,_accessLevel=?,_status=?,_staffName=?,_staffIc=?,_staffPhone=?," +
"_staffEmail=? WHERE _staffId = ?";
PreparedStatement prep = conn.prepareStatement(state);
prep.setString(1, Staff.get_staffId());
prep.setString(2, Staff.get_staffPassword());
prep.setString(3, Staff.get_accessLevel());
prep.setString(4, Staff.get_status());
prep.setString(5, Staff.get_staffName());
prep.setString(6, Staff.get_staffIc());
prep.setString(7, Staff.get_staffPhone());
prep.setString(8, Staff.get_staffEmail());
updateStatus = prep.executeUpdate();
if(conn!=null)
conn.close();
return updateStatus;
}
public int updateAdminStatus(String status, String statusvalue, String Staff) throws SQLException, ClassNotFoundException
{
int updateStatus;
Connection conn = ConnectDB.connectDbase();
String state = "UPDATE tbl_staff SET "+status+" = ? WHERE _staffId = ?";
PreparedStatement prep = conn.prepareStatement(state);
prep.setString(1, statusvalue);
prep.setString(2, Staff);
updateStatus = prep.executeUpdate();
if(conn!=null)
conn.close();
return updateStatus;
}
public int deleteStaff(String Staff) throws ClassNotFoundException, SQLException
{
int updateStatus;
Connection conn = ConnectDB.connectDbase();
PreparedStatement prep = conn.prepareStatement("DELETE FROM tbl_staff WHERE _staffId = ?");
prep.setString(1, Staff);
updateStatus = prep.executeUpdate();
if(conn!=null)
conn.close();
return updateStatus;
}
public int resetPassword(String staffId) throws ClassNotFoundException, SQLException
{
int updateStatus;
String pass = String.valueOf("PaS$w0rd1357".hashCode());
Connection conn = ConnectDB.connectDbase();
PreparedStatement prep = conn.prepareStatement("UPDATE tbl_staff SET _staffPassword = ? WHERE _staffId = ?");
prep.setString(1, pass);
prep.setString(2, staffId);
updateStatus = prep.executeUpdate();
if(conn!=null)
conn.close();
return updateStatus;
}
public int changePassword(String staffId, String password) throws ClassNotFoundException, SQLException
{
int updateStatus;
String pass = String.valueOf(password.hashCode());
Connection conn = ConnectDB.connectDbase();
PreparedStatement prep = conn.prepareStatement("UPDATE tbl_staff SET _staffPassword = ? WHERE _staffId = ?");
prep.setString(1, pass);
prep.setString(2, staffId);
updateStatus = prep.executeUpdate();
if(conn!=null)
conn.close();
return updateStatus;
}
public Vector getStaffList(String condition) throws ClassNotFoundException, SQLException
{
Vector vecStaff = new Vector ();
Connection conn = ConnectDB.connectDbase();
Statement prep = conn.createStatement();
String state = "SELECT * FROM tbl_staff";
if(!condition.equals(null))
state = "SELECT * FROM tbl_staff "+condition;
ResultSet rs = prep.executeQuery(state);
while(rs.next())
{
staff Staff = new staff();
Staff.set_staffId(rs.getString("_staffId"));
Staff.set_staffPassword(rs.getString("_staffPassword"));
Staff.set_accessLevel(rs.getString("_accessLevel"));
Staff.set_status(rs.getString("_status"));
Staff.set_staffName(rs.getString("_staffName"));
Staff.set_staffPhone(rs.getString("_staffPhone"));
Staff.set_staffPhone(rs.getString("_staffPhone"));
Staff.set_staffEmail(rs.getString("_staffEmail"));
vecStaff.add(Staff);
}
if(conn!=null)
conn.close();
return vecStaff;
}
}




Requirement when starting this programming :

Berikut ialah apa yg I guna, it's depend on individual what to use..

a) Perisian pelayan web Apache Tomcat 6.0

Apache Tomcat 6.0 digunakan sebagai pelayan web untuk menghubungkan antara fail-fail JSP (antaramuka kepada user) dan juga dengan engine( yang bertindak untuk membuat sebarang tindakan dan berinteraksi dengan pangkalan data). Pelayan ini juga mampu menyokong Operating Systems yang digunakan dalam komputer peribadi iaitu Windows.

b) Perisian bahasa pengaturcaraan Java

Perisian Java ini digunakan untuk membuat antara muka (Front –End ) bagi pengguna. Selain itu, perisian ini juga digunakan untuk membenarkan pelayan web untuk memproses data dan maklumat menggunakan pengaturcaraan Java. Bahasa pengaturcaraan ini lebih mudah digunakan dan ia lebih popular daripada PHP dan juga ASP.

c) Perisian aplikasi pangkalan data Java DB

Perisian ini akan bertindak sebagai perantaraan untuk menghubungkan perantaraan dengan pangkalan data bagi sistem yang akan dibangunkan ini. Segala data dan maklumat yang diproses oleh JSP akan disimpan didalam pangkalan data ini. Perisian ini dipilih kerana ia amat serasi dengan bahasa pengaturcaraan JSP. Ini kerana pengaturcaraan web JSP tidak boleh terus berhubung dengan pangkalan data tanpa melalui back-end.

d) Perkakasan pembangunan laman web Macromedia Dreamweaver 8

Macromedia Dreamweaver 8 merupakan sebuah perisian pembangunan laman web yang mesra pengguna di samping mudah digunakan. Ia dapat membantu kedua-dua pengaturcara mahupun perekabentuk sistem untuk membuat antaramuka yang akan dipaparkan dalam sistem dengan cara yang mudah tetapi amat berkesan. Pengguna perisian juga bebas untuk merekabentuk halaman antaramuka sistem mengikut kesesuaian di samping turut menyediakan beberapa kemudahan kepada pengguna sepertilibrary dan template yang dapat mengurangkan beban pereka sistem. Perisian ini dipilih kerana ia dapat memudahkan penghasilan fail JSP menggunakan komponen yang terdapat didalam perisian tersebut.

e) Perisian Adobe Photoshop CS3

Selain itu, Adobe Photoshop CS3 pula digunakan untuk membuat rekabentuk antaramuka bagi sesebuah sistem. Ini kerana, rekabentuk antaramuka adalah suatu elemen yang penting bagi penghasilan yang boleh menarik perhatian pengguna. Selain itu, bleh guna kan perisian lain utk design interface.

Saturday, October 24, 2009

For me, IP Sec means a security protocol from the IETF that provides authentication and encryption over the Internet. IPsec is supported by IPv6 and since IPsec was designed for the IP protocol, it has wide industry support and is expected to become the standard for virtual private networks (VPNs) on the Internet.

Here I will explain how to Capturing File Transfer Protocol (FTP) Username and
password:
1.Start VM containing winserv03_server and winserv03_client.
2.Login as Administrator
3. Set the IP address of your winserv03_server and winserv03_client
4. Check that your winserv03_server is already installed with FTP server and Wireshark. If FTP server installed than start the FTP service using [Start] | [Administrative tools] | [Internet
Information Services (IIS)] otherwise you need a Windows Server 2003 CD to installed Internet Information Services (IIS) with FTP.
5. if wireshark is not install then it can be downloaded for free from http://www.wireshark.org.
6.open Wireshark on winserv03_server.[Start] | [Program] | [Wireshark].
7.Click on [Capture] | [Interfaces] to choose the network interfaces you wanted to monitor

IPsec, Different to SSL which that provides services at layer 4 and secures two applications, IPsec works at layer 3 and secures everything in the network and which is typically built into the Web browser, IPsec requires a client installation.
The benefit is IPsec can access both Web and non-Web applications, whereas SSL requires workarounds for non-Web access such as file sharing and backup.

IPSec protocol:
• Authentication Header- use for provide connectionless integrity and data origin authentication for IP datagrams and for protection against replay attacks.
• Internet key exchange (IKE and IKEv2) - to set up a security association by handling negotiation of protocols and algorithms and to generate the encryption and authentication keys to be used by IPsec.
• Encapsulating Security Payload (ESP) - to provide confidentiality, data origin authentication, connectionless integrity, an anti-replay service.

Thursday, October 15, 2009

Hacking wireless can be done by any attacker or person which usually want to detect password and username of other people wireless connection. For security, Access Point should be topologically located outside the perimeter firewalls.I learned how to hacking wireless. This activities can be done by using software named as Backtrack. We can use gui or command to start hack the wireless connection.For start the GUI, type 'startx' to start the gui. To check the network connection, type 'ipconfig'.For checking the wireless type 'iwconfig'. Then type 's' to sort the network. The most important thing is need to remember the MAC address.Here is example :

--> To get network that connect
airodump -ng --ivs -w capture --channel 1 ahndhbo(name of device wireless)

--> To get a reply from network
aireplay -ng-o-e dlink -a 00:1E:FB:57:ED -h 00:22:4C:1E:FB

Monday, October 5, 2009

Wireless help us easy to connect to internet without using any external devices such as cable ,
switch, hub and so on.
Wireless is help us reduce the space. For connect to wireless, we only need access
point(AP) and wireless station(Eg: desktop, laptop,PDA)
In 1997, IEEE produce a Wi-Fi(802.11). Two type of wireless mode use in wireless connection:
1. Ad-Hoc Mode - connect without using access point, it is easy and called as peer-to-peer.
2. Infrastructure - at least need one access point.There are two type
a) Basic Service Set (BSS) - one Access Point
b) Extended Servce Set (ESS) - more than one BSS.

Wireless LAN (WLAN) is service of 802.11 which use Layer 1(Physical Layer) and Layer 2
(Data Link Physical). There are 3 basic security service in WLAN environment. First is authentication
which provide a security to identify an identity in communication. Second is an integrity to check
that the message from sender to receiver is secure without get attack or modify by hacker.Because
an attack also can manipulate message through access point.Third is confidentially, is to ensure that
there is secret between network and privacy all the detail.

In wireless connection, Wired Equivalence Privacy(WEP) is use for shared key between PC/laptop with access
point and provide the extended service set(for ensure access point have same shared key).

WPA is Wi-Fi Protected Access which use in 802.11a, 802.11b and 802.11g. This use to solve the
problem with Wired Equivalence Privacy because it used on small amd handled device for connectivity.

Wireless Transport Layer Security(WTLS) use to make sure the data is privacy before it being broadcast.

Email use to transmit data or information into other receiver. It’s operated by divide each email by two part (header and body). It uses MIME protocol. Email can easily expose to threats same as threats can easily exposed by email. The most theats that enabled by email is spamming, it dissipate memory and bandwidth of our computer.

PGP is Pretty Good Privacy, glamour as plug-in emails clients and also used as stand-alone software. It will sign a detached and stored separately.

Web security techniques that popular use by people in network. I think everybody is familiar with SSL, SSH, https, and SET.

1. SSL which provides two layers architecture can help to secure the used of web browser and servers. It popular use in electronic banking.

2. tSSH used to provide a security in application layer which built on TCP in transport layer.

3. SET specially designed to secure communication link and to protect credit card but it need confidentially pament and information, card holder authentication and merchant authentication.

4. Https used to secure communication between computers and www.

Nowadays, biometric technology is exposed in fingerprint(example shape is arch, loop and whorl), eye, face, hand geometry, signature and voice. It also had been found in body odour, palm print, earshape and DNA. Biometric is an identifier of person through physiological or behavioral. How biometric function is if there is unique, acceptability, stability and universality. It function with using storage, data collection, signal processing, matching, and transmission. Examples of device that apply all the function are Optical fingerprint sensor, electro-optical sensor, e-field sensor, thermal sensor, and capacitive sensor. But we must alert with threats that usually attack biometric sensor, example is replay attack of eavesdropped biometric data and manipulation of stored biometric reference data. Because over than 50% of email is now spam. Other protocol that is used is S/MIME that allows a good client security through signature also encryption.

Monday, September 28, 2009

When we talk about the security in networks, we actually need to know what network definition to make we more deeply understand. Network for me is something can make multiple user connect in same time to each other. Connection happend when there are seven layer in network connect each other and each layer do their task. Seven layer is Application, Presentation, Session, Transport, Network, Data Link and Physical. (click to get a detail about the layer).

Network Security problem area discuss on authentication, secrecy, non-repudiation and integrity control.Example of authentication is commonly done through the use of passwords when user login. So knowledge of the password important to assumed to guarantee that the user is authentic. While non-repudiation problem is exchange something on network without a trusted third party. For me, integrity control means certificate of access control which can be solved by employing one way hash functions.

The bigger problem in securing the network is to prevent our network from the hacker or attacker. Hacker is a bad people which try to attack our computer, resources or files.
Hacking can be divided into 5 :

  1. Reconnaisance - by initial planning study detecting enemy before attack example by using googling or dumpster diving
  2. Scanning - Attacker learn network using structure traceroute or ping.
  3. Gaining Access - issuing the access to the enemy resources
  4. Maintaining Access - such as troubleshoot identity and access solutions
  5. Covering Track - contruction phase or cover the data

Tuesday, August 25, 2009

Database Security makes me undertand the most important of security issue especially in database systems and the problems related to information protection. Beside that we investigate thepotential implementation of security mechanism in the database management system and operating system. I learned that how to create the new database and make sure the user can read their own account and a certain person which have priority can access the data to see, write and edit data. The task that we do is create a new records, read all fields and update data and so on.

To set the access right to any person , we need to set the acess control which enables us an authority to access data or resource. This is a one part of physical security and second layer in computer security achitecture. So the application will call the access control functions to set who can access specific resources provided by that application. When we create a access control, we must consider the decision is suitable for the problem. Such as make sure does the operating system respect the data or record. We must consider all of the factor and the pros and cons of our design decision.

Some people do not care on their user privileged. As a good in securing database, we must have policy and defines the privileges various user on organizational network, specify a group of users and so on. The policy is use to create a access and control the user and data.

Database Security is the most important especially when we use a server. It is to secure the database from unathorized users because we usually store the important data such as clients information, financial details, human resource details and all the data that need to be secure and secretly. The benefit of apply the database security is to monitor activity or proces , improved security database, ensures all the resourse is secure and most important is for integrity and availability to user. So the hacker do not have an authority to attack the data.

Concept of database divide by three (Database, Database Administrator(DBA), Database Management System (DBMS)). There is a few way to make sure that the database is under a good database such as there are good in

Tuesday, August 18, 2009

In this lab, i learned about the flaw of web application and how it is exploited. Beside that, we learn exploit web application vulnerabilities and prevention method that can be taken to overcome web
application vulnerabilities. Vulnerabilities is intersection of three elements.That is a system susceptibility or flaw, attacker access to the flaw, and attacker capability to exploit the flaw.

Many application employ a tiered architecture and a failure to different tiers properly often leaves an application vulnerable. So it enable the attacker who has found a defect in one component to quickly compromises the entire. When threats arises in shared hosting environment, defects and malicious code in one application can sometimes be exploited to compromise the environment itself and other applications running within it.

Sometimes this vulnerabilities always target the web server that running. This vulnerabilities in web server are broadly composed of defects in their configuration and security flaws within the web server software.

A few reason why vulnerabilities occured is complex systems so the probability of flaws increase, peopele like using common, well-known code, software, operating systems, and/or hardware increases the probability an attacker has or can find the knowledge and tools to exploit the flaw
, more physical connections, privileges, ports, protocols, and services and time each of those are accessible increase vulnerability, weak password, the fundamental operating system design flaws, internet Website Browsing, Software bugs, Unchecked user input and so on. (wikipedia website)

This lab had been covered with this topic :
• Explain What is Symmetric and Asymmetric Cryptography
• Implementing Caesar Cipher for Symmetric Cryptography.
• Implementing Vigeneré Cipher for Symmetric Cryptography.
• Implementing RSA algorithm for Asymmetric Cryptography




For me, Symmetric crptography is the both paties involved in the communication use same key but secretly between them. That why we can called is as shared secret system or private key systems. The operation of this symmetric separated into strem ciphers and block ciphers. But the huge problem of this cyptography is key exchange. Different to assymmetric, means public key cyprography. This asymmetric works when people that has private key will keep it secretly then anyone is told the public key will enable them to unlock the private key and read the data that had been sent.



The comparison between symmetric and assymetric is symmetric key usually faster to use in electronically than asymmetric. But assymetric usually more computationally. Both of this key is related to each other and especially in mathematically related.There are a few example of symmetric ciphers such as Data Encyption Standard (DES), RSA and AES. While the popular example of assymetric is PGP(Pretty Good Privacy).



Caesar ciphers is the action of replace each plaintext letter with one a fixed number of places down the alphabet.






(Source from: http://www.wikipedia.com/)

Example of SHIFT 3 in Caesar Cipher :
Plain: ABCDEFGHIJKLMNOPQRSTUVWXYZ
Cipher: DEFGHIJKLMNOPQRSTUVWXYZABC

Example how to solve the problem :
Plaintext: the quick brown fox jumps over the lazy dog
Ciphertext: WKH TXLFN EURZQ IRA MXPSV RYHU WKH ODCB GRJ

Vigenere ciphers is polyalphabetic cipher based on using successively shifted aphabets, means a different shifted alphabetic and the step is based on the tableau and use the keyword. It use a series of different caesar cipher. This cipher is well known because we easy to understand and use it.

Here is the simple step of implementing RSA algorithm for Asymmetric Cryptography :

1. value for p, q had been given
2. n = p x q
3.φ(n) = (p – 1) (q – 1).
4.d= e -1 mod φ(n)

Sunday, August 16, 2009

A few propose of this operating system security such as multiprogramming had been introduced for the protection need..Some of purpose is for memory protection, means that prevents from corrupting the memory of another process running on the same computer and same time but we must allert with the method protection of memory.
There are seven of method :

  • Fence
  • Relocation
  • Paging
  • Segmentation
  • Base/bound register
  • tagged architecture
  • paging combined with segmentation

Besides that, we must protecting general object by using file protection, group protection, access control limitation,permission, authentication and so on. Below is general object protection :

  1. Memory
  2. File/Data set on an auxiliary storage device
  3. Program Executing in memory
  4. A directory file
  5. Hardware device

Monday, August 10, 2009

Security??Something that support our life and make our life easy to handle. So some organization provide program security for us because of attack such as brute force attack, replay attack, man in the midle attack and fault in cryptosystem. Program security is important part that teach us how the malicious proram will effect our computer and how to manage it.Malicious program is something that corrupt our computer from running as usually.

We can detect it is virus if we don't see raw data, it can do harm and can also be confidential. There are a few type of viruses such as parasitic virus, memory-resident virus, boot sector virus, stealth virus,macro virus, directory virus,false virus, FAT virus and polymorphic virus. Resident is new for me, it means type of virus that hides permanently in RAM memory and it can control and intercept all of the operations carried out by the system. It can corrupt our file and program we opened, closed, copied, renamed and so on. Virus phase can be divided into 4phase.1st, Dormant Phase.2nd,Propagation Phase.3rd, triggering phase and 4th is execution phase.There are a few type of malicious attack such as :

  1. Logic bomb - activates on an event
  2. Trap door - undocumented/piece of code for debugging and we do not delete when write a code
  3. Virus
  4. Bacteria/rabbit
  5. Trojen Horse
  6. Worm
  7. Spyware
  8. Macro
  9. Overwrite


Tuesday, July 28, 2009

I'll explain how to install PGP and the function of that particular software in network security...PGP is from a word Pretty Good Privacy, it is a public key enryption program originally written by Phil Zimmermann in 1991.Why PGP?For me, it is to secure email on internet because email is personal and it's private, beside that we don't want our private email or confidential documents read by anyone else. The advantages of PGP are language support and is available for many different platforms including Windows, Unix, MS DOS, OS/2, Macintosh and so on. After I do a research, the latest version of international freeware versions of PGP os 6.5.1i for Windows 95/98/NT and MacOS only while 5.0i for other platform.PGP works by combines some of the best features of both conventional and public key cryptography.PGP will compresses the plaintext that had been encrypt by user and creates a session key(secret key). Then after data is encrypted, the session key is then encrypted to the recipient's public key and transmitted along with the ciphertext to the recipient.














We can download PGP installer from
www.pgpi.org,version 6.5.8.
Step 1 : Unzipped installer
Step 2 : Double click to start install. At Welcome window.Click [Next].
Step 3 : Click [Yes] at 'Software License Agreement' after finish read all terms of agreement.
Step 4 : Enter full name and company then click [Next]
Step 5 : Files will be installed in:C:\Program Files\PGP.Click [Next].
Step 6 :Choose the PGP components you wish to install.
Step 7 : Click [Next]
Step 8 : The next window asks whether you have existing keyrings you wish to use. Click [No].
Step 9 : Restart computer and Click [Finish]
* Crptography is science that using mathematics to encrypt and decrypt data. It enalbe us to store private data and transmit across insecure networks.

Monday, July 27, 2009

There are two type of crptography -> substitution and transportation. Substitution is use by use one letter to refer to another letter. This substitution divided by two type, monoalphabetic(use same letter for the whole message) and polyalphabetic(use different letter in whole message).While transportation is use by change the arragement of text and letter. This method can be divided by key and unkeyed..

example what i learn in class is:
1 2 3 4 5 6 7 8 9 10
1 T H E R E I S N O S
2 E C U R I T Y O N T
3 H I S E A R T H T H
4 E R E I S O N L Y O
5 P P O R T U N I T Y
Conclusion: for unkeyed single transportation can be develop into a matrix of 10(vertical) by 5(horizontal). This step can be try on keyed single transportation just by using matrix 10 but do not in sorting.

this is some terms that need to memorize such as :

  1. Vigenere Ciphers - we must know the manual polyalphabetic cipher to perform encryption
  2. Simple substitution ciphers (random) - is use for random aphabet tp improve caesar ciphers.

Other thing that i learn today is about MAC, Message Authentication Codes is key-dependent one way hash function.It accepts as input a secret key and an arbitrary-length message to be authenticated, and outputs.MAC protects both a message's data integrity as well as its authenticity.While digital signiture is use for message from particular sender and cryptography value that depends on message and sender.A digital guarantee that information has not been modified, as if it were protected by a proof seal that is broken if the content were altered.

RSA is the algorithm was publicly described in 1978 by Ron Rivest, Adi Shamir, and Leonard Adleman at MIT.The letters RSA are the initials of their surnames, listed in the same order as on the paperis an algorithm for public-key cryptography. It is the first algorithm known to be suitable for signing as well as encryption, and one of the first great advances in public key cryptography (taken from wikipedia website).


;;