#!/bin/bash
from="root@egearge.com"
fromname="Ali Okan Yuksel"
to="aokan@egearge.com"
subject="deneme"
msg="bu bir deneme mailidir"
echo -e "to: ${to}\nsubject: deneme\n\n ${msg}" | ssmtp -f "${from}" -F "${fromname}" ${to}
Thursday, March 31, 2016
wkhtmltopdf: html to pdf converter
"/usr/local/bin/wkhtmltopdf %s %s" % (html_template, pdfout)
"/usr/local/bin/wkhtmltopdf -q -L 0 -R 0 -B 0 -T 0 --disable-smart-shrinking --zoom 0.7821 --encoding UTF-8 %s %s" % (html_template, pdfout))
"/usr/local/bin/wkhtmltopdf -q -L 0 -R 0 -B 0 -T 0 --disable-smart-shrinking --zoom 0.7821 --encoding UTF-8 %s %s" % (html_template, pdfout))
radius performance testing with radperf tool
RADPERF
Authentication, Authorization, and Accounting. Performance, scalability, load testing, and validation.
One of the most critical steps when building a RADIUS system is performance characterisation. This means testing the system to see if both authentication (i.e., read-only) and accounting (i.e., read-write) behavior is acceptable.
In many cases, the performance will be good enough for normal loads. However, high loads are commonly seen when a NAS reboots and many users flood the network at the same time. If the system cannot handle this load, then it will be unsuitable for a production environment.
RadPerf helps you make this determination. It can send both authentication and accounting packets at varying rates. Even better, you do not need to know anything about RADIUS in order to use RadPerf.
Starting with a list of users and passwords in a CSV file, RadPerf can generate both authentication and accounting packets. It can simulate spikes in traffic, long-lived user sessions, and end-to-end user behavior.
Once RadPerf has finished testing, it produces a set of reports that summarize offered load versus accepted load. Total accepted packets per second can quickly be determined. These reports gives you the data that you need to make an informed decision about placing a system into production.
http://networkradius.com/radius-performance-testing/
radperf-u14.04# ./radperf -A1,5 -c 1 -p 100 -s -f test.csv 192.168.5.174:1812 auth mysecretkey
-A1,5 parametresi ile 1 saniye sonra CREATE accounting request 5 SANIYE sonra ise DELETE request gonderilmesini sagliyoruz.
-p paralel 100 gonderim yapildigini anlamina geliyor.
radperf - Performance testing tool for RADIUS systems.
Copyright (C) 2012 Network RADIUS SARL. All rights reserved.
Usage: radperf [options] server[:port] <command> [<secret>]
<command> One of auth, acct, status, coa, or disconnect.
-a type Use authentication method <type> (pap, chap, none)
-A d,l After Access-Accept, send accounting packets.
-c count Send each packet 'count' times.
-d raddb Set dictionary directory.
-D file Print packet statistics to file
-f file Read packets from file, not stdin.
-F Update Framed-IP-Address, too.
-n num Send a maximum of 'num' packets per second
-p num Send a maximum of 'num' packets in parallel.
-q Do not print anything out.
-r retries If timeout, retry sending the packet 'retries' times.
-R realm Realm name to append to the User-Name
-s Print out summary information of auth results.
-S file read secret from file, not command line.
-t timeout Wait 'timeout' seconds before retrying (may be a floating point number).
-T template Use template file with every request
-u number Generate requests for 'number' users.
-v Show program version information.
-x Debugging mode.
-4 Use IPv4 address of server
-6 Use IPv6 address of server.
Authentication, Authorization, and Accounting. Performance, scalability, load testing, and validation.
One of the most critical steps when building a RADIUS system is performance characterisation. This means testing the system to see if both authentication (i.e., read-only) and accounting (i.e., read-write) behavior is acceptable.
In many cases, the performance will be good enough for normal loads. However, high loads are commonly seen when a NAS reboots and many users flood the network at the same time. If the system cannot handle this load, then it will be unsuitable for a production environment.
RadPerf helps you make this determination. It can send both authentication and accounting packets at varying rates. Even better, you do not need to know anything about RADIUS in order to use RadPerf.
Starting with a list of users and passwords in a CSV file, RadPerf can generate both authentication and accounting packets. It can simulate spikes in traffic, long-lived user sessions, and end-to-end user behavior.
Once RadPerf has finished testing, it produces a set of reports that summarize offered load versus accepted load. Total accepted packets per second can quickly be determined. These reports gives you the data that you need to make an informed decision about placing a system into production.
http://networkradius.com/radius-performance-testing/
radperf-u14.04# ./radperf -A1,5 -c 1 -p 100 -s -f test.csv 192.168.5.174:1812 auth mysecretkey
-A1,5 parametresi ile 1 saniye sonra CREATE accounting request 5 SANIYE sonra ise DELETE request gonderilmesini sagliyoruz.
-p paralel 100 gonderim yapildigini anlamina geliyor.
radperf - Performance testing tool for RADIUS systems.
Copyright (C) 2012 Network RADIUS SARL. All rights reserved.
Usage: radperf [options] server[:port] <command> [<secret>]
<command> One of auth, acct, status, coa, or disconnect.
-a type Use authentication method <type> (pap, chap, none)
-A d,l After Access-Accept, send accounting packets.
-c count Send each packet 'count' times.
-d raddb Set dictionary directory.
-D file Print packet statistics to file
-f file Read packets from file, not stdin.
-F Update Framed-IP-Address, too.
-n num Send a maximum of 'num' packets per second
-p num Send a maximum of 'num' packets in parallel.
-q Do not print anything out.
-r retries If timeout, retry sending the packet 'retries' times.
-R realm Realm name to append to the User-Name
-s Print out summary information of auth results.
-S file read secret from file, not command line.
-t timeout Wait 'timeout' seconds before retrying (may be a floating point number).
-T template Use template file with every request
-u number Generate requests for 'number' users.
-v Show program version information.
-x Debugging mode.
-4 Use IPv4 address of server
-6 Use IPv6 address of server.
NTRadPing 1.5 RADIUS Test Utility
| Posted: | 20 Aug 2004 |
| File Size: | 71KB |
| License: | Free |
| Download: | /coolsolutions/tools/downloads/ntradping.zip |
| Publisher: | Arndt Stajta |
NTRadPing is a useful tool for testing installations of your RADIUS servers. Through NTRadPing you can simulate authentication and accounting requests and send them to the RADIUS server making NTRadPing act as a NAS client.
Before you send the request to the server, you need to configure the server IP address, the RADIUS secret key stored in the server clients file, and a username.
All the other parameters are optional.
On accounting requests, the "Acct-Session-Id" attribute is also added automatically if you do not explicitly enter it in the request attribute list.
If you issue an accounting request, then the RADIUS attribute "Acct-Status-Type" is added automatically by NTRadPing depending on the type of accounting request you have chosen (start, stop or update).
In the lower left list box you can add as many RADIUS attributes as you like to your request. The list of available attributes and the relevant values in the two drop down boxes depend on the dictionary file RADDICT.DAT.
By checking the "CHAP" checkbox, you may force NTRadPing to issue authentication requests with a CHAP password instead of a default (PAP) password.
In the right list box you will get results about the RADIUS request, along with a complete dump of all the returned RADIUS attributes.
The parameters entered in the main window are preserved even after closing the application (they are stored in the registry).
Wednesday, March 30, 2016
freeradius installation, configuration and replication notlar
amac tek bir makinaya gelen radius trafigini birden fazla sayida makinaya cogullamak.
kullandigim modul:
mod-enabled/replicate
# Replicate packet(s) to a home server.
#
# This module will open a new socket for each packet, and "clone"
# the incoming packet to the destination realm (i.e. home server).
kurulum:
--
yum install libtalloc-devel openssl-devel gcc
mkdir -p /opt/freeradius
cd freeradius-server-3.0.11
./configure --prefix=/opt/freeradius
make
make install
files:
--
-/etc/raddb/sites-enabled/default bu dosyada authorize, preacct bolumlerine ekleme yaptim, loglarin detayli loglanmasi icin detail ifadelerini ekledim
-/etc/raddb/mods-enabled/detail bu dosyada detail loglarin yazilacagi lokasyonu degistirdim
-/etc/raddb/clients.conf bu dosyaya client ip ve secretkey bilgileri ile alakali duzenleme yaptim
-/etc/raddb/proxy.conf bu dosyaya realm, home server ve home server pool tanimlari ekledim
-/etc/raddb/radiusd.conf bu dosyada ssl guvenlik uyarisini bypass etmek icin duzenleme yaptim
-/etc/raddb/users bu dosyaya manuel valid user ekledim
config:
--
add to authorize, preacct
update control {
&Replicate-To-Realm := server1
&Replicate-To-Realm += server2
&Replicate-To-Realm += server3
}
replicate
add to authorize, preacct /etc/raddb/sites-enabled/default:
update control {
&Replicate-To-Realm := server1
&Replicate-To-Realm += server2
}
replicate
--
add to: /etc/raddb/proxy.conf
client 0.0.0.0/0 {
secret = mysecretkey
require_message_authenticator=no
}
--
add to: /etc/raddb/proxy.conf
home_server remote_server_1 {
ipaddr = 192.168.5.171
port = 1812
type = auth+acct
secret = mysecretkey
}
home_server remote_server_2 {
ipaddr = 192.168.5.172
port = 1812
type = auth+acct
secret = mysecretkey
}
home_server remote_server_3 {
ipaddr = 192.168.5.173
port = 1812
type = auth+acct
secret = mysecretkey
}
home_server_pool remote_pool_1 {
type = fail-over
home_server = remote_server_1
}
home_server_pool remote_pool_2 {
type = fail-over
home_server = remote_server_2
}
home_server_pool remote_pool_3 {
type = fail-over
home_server = remote_server_3
}
realm server1 {
auth_pool = remote_pool_1
acct_pool = remote_pool_1
}
realm server2 {
auth_pool = remote_pool_2
acct_pool = remote_pool_2
}
realm server3 {
auth_pool = remote_pool_2
acct_pool = remote_pool_2
}
kullanici tanimlama:
--
add to: /etc/raddb/users
testuser Cleartext-Password := "password"
test:
$ for i in $(seq 1 100); do radtest testuser password 192.168.5.174 0 mysecretkey; done
kullandigim modul:
mod-enabled/replicate
# Replicate packet(s) to a home server.
#
# This module will open a new socket for each packet, and "clone"
# the incoming packet to the destination realm (i.e. home server).
kurulum:
--
yum install libtalloc-devel openssl-devel gcc
mkdir -p /opt/freeradius
cd freeradius-server-3.0.11
./configure --prefix=/opt/freeradius
make
make install
files:
--
-/etc/raddb/sites-enabled/default bu dosyada authorize, preacct bolumlerine ekleme yaptim, loglarin detayli loglanmasi icin detail ifadelerini ekledim
-/etc/raddb/mods-enabled/detail bu dosyada detail loglarin yazilacagi lokasyonu degistirdim
-/etc/raddb/clients.conf bu dosyaya client ip ve secretkey bilgileri ile alakali duzenleme yaptim
-/etc/raddb/proxy.conf bu dosyaya realm, home server ve home server pool tanimlari ekledim
-/etc/raddb/radiusd.conf bu dosyada ssl guvenlik uyarisini bypass etmek icin duzenleme yaptim
-/etc/raddb/users bu dosyaya manuel valid user ekledim
config:
--
add to authorize, preacct
update control {
&Replicate-To-Realm := server1
&Replicate-To-Realm += server2
&Replicate-To-Realm += server3
}
replicate
add to authorize, preacct /etc/raddb/sites-enabled/default:
update control {
&Replicate-To-Realm := server1
&Replicate-To-Realm += server2
}
replicate
--
add to: /etc/raddb/proxy.conf
client 0.0.0.0/0 {
secret = mysecretkey
require_message_authenticator=no
}
--
add to: /etc/raddb/proxy.conf
home_server remote_server_1 {
ipaddr = 192.168.5.171
port = 1812
type = auth+acct
secret = mysecretkey
}
home_server remote_server_2 {
ipaddr = 192.168.5.172
port = 1812
type = auth+acct
secret = mysecretkey
}
home_server remote_server_3 {
ipaddr = 192.168.5.173
port = 1812
type = auth+acct
secret = mysecretkey
}
home_server_pool remote_pool_1 {
type = fail-over
home_server = remote_server_1
}
home_server_pool remote_pool_2 {
type = fail-over
home_server = remote_server_2
}
home_server_pool remote_pool_3 {
type = fail-over
home_server = remote_server_3
}
realm server1 {
auth_pool = remote_pool_1
acct_pool = remote_pool_1
}
realm server2 {
auth_pool = remote_pool_2
acct_pool = remote_pool_2
}
realm server3 {
auth_pool = remote_pool_2
acct_pool = remote_pool_2
}
kullanici tanimlama:
--
add to: /etc/raddb/users
testuser Cleartext-Password := "password"
test:
$ for i in $(seq 1 100); do radtest testuser password 192.168.5.174 0 mysecretkey; done
Wednesday, March 9, 2016
syslog traffic generation with loggen tool
/opt/syslog-ng/bin/loggen --inet --dgram --size 150 --rate 220000 --interval 60 --active-connections 2 192.168.30.30 514
Tuesday, March 8, 2016
linux: how to detect which application, command or pid deleted files
Sysdig is open source, system-level exploration: capture system state and activity from a running Linux instance, then save, filter and analyze.Sysdig is scriptable in Lua and includes a command line interface and a powerful interactive UI, csysdig, that runs in your terminal. Think of sysdig as strace + tcpdump + htop + iftop + lsof + awesome sauce.
With state of the art container visibility on top.
http://www.sysdig.org/install/
command:
sysdig -p '%12evt.type %12user.name %6proc.pid %12proc.name %12proc.args- %proc.cmdline --- %evt.args' '(evt.type=unlinkat or evt.type=unlink) and evt.args contains /usr/local/app/db'
https://github.com/draios/sysdig/wiki/Sysdig%20Chisel%20API%20Reference%20Manual
http://www.sysdig.org/wiki/sysdig-quick-reference-guide/
Wednesday, March 2, 2016
RASPBERRY PI 3 ON SALE NOW AT $35
https://www.raspberrypi.org/blog/raspberry-pi-3-on-sale/
Raspberry Pi 3 is now on sale for $35 (the same price as the existing Raspberry Pi 2), featuring:
- A 1.2GHz 64-bit quad-core ARM Cortex-A53 CPU (~10x the performance of Raspberry Pi 1)
- Integrated 802.11n wireless LAN and Bluetooth 4.1
- Complete compatibility with Raspberry Pi 1 and 2
Tuesday, March 1, 2016
change sqlite file size after “delete from table” or "drop table tablename"
The VACUUM command cleans the main database by copying its contents to a temporary database file and reloading the original database file from the copy. This eliminates free pages, aligns table data to be contiguous, and otherwise cleans up the database file structure.
The VACUUM command may change the ROWID of entries in tables that do not have an explicit INTEGER PRIMARY KEY. The VACUUM command only works on the main database. It is not possible to VACUUM an attached database file.
The VACUUM command will fail if there is an active transaction. The VACUUM command is a no-op for in-memory databases. As the VACUUM command rebuilds the database file from scratch, VACUUM can also be used to modify many database-specific configuration parameters.
Manual VACUUM
Following is simple syntax to issue a VACUUM command for the whole database from command prompt:
$sqlite3 database_name "VACUUM;"
You can run VACUUM from SQLite prompt as well as follows:
sqlite> VACUUM;
You can also run VACUUM on a particular table as follows:
sqlite> VACUUM table_name;
[root@server data]# du -sh Samsun_data.db
2.3M Samsun_data.db
[root@server data]# sqlite3 Samsun_data.db "delete from data where ts<'$(date --date="2 days ago" "+%s")'"
[root@server data]# sqlite3 Samsun_data.db "VACUUM;"
[root@server data]# du -sh Samsun_data.db
1.2M Samsun_data.db
Auto-VACCUM
SQLite Auto-VACUUM does not do the same as VACUUM rather it only moves free pages to the end of the database thereby reducing the database size. By doing so it can significantly fragment the database while VACUUM ensures defragmentation. So Auto-VACUUM just keeps the database small.
You can enable/disable SQLite auto-vacuuming by the following pragmas running at SQLite prompt:
sqlite> PRAGMA auto_vacuum = NONE; -- 0 means disable auto vacuum sqlite> PRAGMA auto_vacuum = INCREMENTAL; -- 1 means enable incremental vacuum sqlite> PRAGMA auto_vacuum = FULL; -- 2 means enable full auto vacuum
You can run following command from command prompt to check the auto-vacuum setting:
$sqlite3 database_name "PRAGMA auto_vacuum;"
Tuesday, February 23, 2016
Ripe database
RIPE
Download RIPE database from ftp://ftp.ripe.net/ripe/dbase/
TODO:
1) download split databases and extract networks, organisations, persons, roles, maintainers by country
2) import into MySQL database and use of PHP application
RIS
TODO:
1) download RIS database from http://data.ris.ripe.net/rrc00/latest-bview.gz
2) download, compile and make bgpdump https://bitbucket.org/ripencc/bgpdump/
3) import into database
RADb
TODO:
1) download RADb database from ftp://ftp.ra.net/radb/dbase/
2) import into database
APNIC/ARIN/LACNIC/AfriNIC
Download APNIC database by completing Request Form http://www.apnic.net/apnic-info/whois_search/using-whois/bulk-access
Download ARIN database by completing Request Form https://www.arin.net/resources/request/bulkwhois.html
Download LACNIC database by completing Request Form http://lacnic.net/en/politicas/manual8.html
Download AfriNIC database by completing Request Form http://www.afrinic.net/en/library/membership-documents/207-bulk-whois-access-form-
Monday, February 15, 2016
ipmitool: Could not open device at /dev/ipmi0 or /dev/ipmi/0 or /dev/ipmidev/0: No such file or directory
#ipmitool shell
ipmitool> chassis status
Could not open device at /dev/ipmi0 or /dev/ipmi/0 or /dev/ipmidev/0: No such file or directory
Error sending Chassis Status command
ipmitool> chassis status
Could not open device at /dev/ipmi0 or /dev/ipmi/0 or /dev/ipmidev/0: No such file or directory
Error sending Chassis Status command
solution:
# modprobe ipmi_devintf
# modprobe ipmi_si
Thursday, February 11, 2016
mac os x el capitan installation: this copy of the install os x el capitan application cannot be verified
problem zaman senkronizasyonundan kaynaklanıyor.
çözüm:
open utilities -> terminal
ntpdate -u 194.27.222.5
çözüm:
open utilities -> terminal
ntpdate -u 194.27.222.5
Monday, February 8, 2016
Setting the default JDK with the /usr/sbin/alternatives Utility
alternatives creates, removes, maintains and displays information about the symbolic links comprising the alternatives system. The alternatives system is a reim-
plementation of the Debian alternatives system. It was rewritten primarily to remove the dependence on perl; it is intended to be a drop in replacement for
Debian’s update-dependencies script.
plementation of the Debian alternatives system. It was rewritten primarily to remove the dependence on perl; it is intended to be a drop in replacement for
Debian’s update-dependencies script.
- Become the root user.
/usr/sbin/alternativesneeds to be run with root privileges. Use thesucommand or other mechanism to gain these privileges. - Set
java.Input this command:/usr/sbin/alternatives --config javaSetjavac. - Enter this command:
/usr/sbin/alternatives --config javac
Labels:
alternatives,
java,
linux,
openjdk,
redhat
Wednesday, January 27, 2016
huawei quidway s6724 remove port-mirroring
Quidway S6700 Series Ethernet Switches
V100R006C00
Configuration Guide - Device Management
http://enterprise.huawei.com/ilink/enenterprise/download/HW_116588
<huawei>display port-mirroring
Port-mirror:
----------------------------------------------------------------------
Mirror-port Direction Observe-port
----------------------------------------------------------------------
XGigabitEthernet0/0/2 Both XGigabitEthernet0/0/1
XGigabitEthernet0/0/3 Both XGigabitEthernet0/0/1
XGigabitEthernet0/0/23 Both XGigabitEthernet0/0/1
----------------------------------------------------------------------
<huawei>system-view
Enter system view, return user view with Ctrl+Z
[huawei]interface XGigabitEthernet 0/0/2
[huawei-XGigabitEthernet0/0/2]undo port-mirroring both
V100R006C00
Configuration Guide - Device Management
http://enterprise.huawei.com/ilink/enenterprise/download/HW_116588
<huawei>display port-mirroring
Port-mirror:
----------------------------------------------------------------------
Mirror-port Direction Observe-port
----------------------------------------------------------------------
XGigabitEthernet0/0/2 Both XGigabitEthernet0/0/1
XGigabitEthernet0/0/3 Both XGigabitEthernet0/0/1
XGigabitEthernet0/0/23 Both XGigabitEthernet0/0/1
----------------------------------------------------------------------
<huawei>system-view
Enter system view, return user view with Ctrl+Z
[huawei]interface XGigabitEthernet 0/0/2
[huawei-XGigabitEthernet0/0/2]undo port-mirroring both
Understanding DevOps
Understanding DevOps – Part 6: Continuous Deployment vs Continuous Delivery
What is Continuous Deployment?
Companies like flickr have in the past posted on their blog how many ‘deploys’ they had so far that day/week. Looking at the an organization that deploys to production 89 times in a week can be very intimidating. More importantly, it begs to ask – what do you deploy to production 89 times in a week?This is a scenario that may actually keep some people away from adopting DevOps practices as they believe that they have to deploy every change to production. That is certainly not the case. First, you need to understand what is being deployed here and second, more importantly need to understand that this is not applicable, necessary or in some cases even feasible, for every organization.
Devamı:
https://sdarchitect.wordpress.com/2013/10/16/understanding-devops-part-6-continuous-deployment/
Monday, January 25, 2016
nagios nsca: daemon was not compiled with mcrypt library, so decryption is unavailable.
Platform:
Oracle Linux Server release 6.7
/usr/local/nagios/etc/nsca.cfg:
decryption_method=2
command:
/usr/local/nagios/bin/nsca -c /usr/local/nagios/etc/nsca.cfg
/var/log/messages error:
Jan 25 16:15:34 monitoring nsca[12487]: Invalid decryption method (2) in config file '/usr/local/nagios/etc/nsca.cfg' - Line 203
Jan 25 16:15:34 monitoring nsca[12487]: Daemon was not compiled with mcrypt library, so decryption is unavailable.
Solution:
yum install -y libmcrypt-devel libmcrypt
./configure --with-nsca-user=nagios --with-nsca-grp=nagios --with-mcrypt-lib=/usr/lib64/ --with-mcrypt-inc=/usr/include
make clean
make all
cp src/nsca /usr/local/nagios/bin/nsca
Oracle Linux Server release 6.7
/usr/local/nagios/etc/nsca.cfg:
decryption_method=2
command:
/usr/local/nagios/bin/nsca -c /usr/local/nagios/etc/nsca.cfg
/var/log/messages error:
Jan 25 16:15:34 monitoring nsca[12487]: Invalid decryption method (2) in config file '/usr/local/nagios/etc/nsca.cfg' - Line 203
Jan 25 16:15:34 monitoring nsca[12487]: Daemon was not compiled with mcrypt library, so decryption is unavailable.
Solution:
yum install -y libmcrypt-devel libmcrypt
./configure --with-nsca-user=nagios --with-nsca-grp=nagios --with-mcrypt-lib=/usr/lib64/ --with-mcrypt-inc=/usr/include
make clean
make all
cp src/nsca /usr/local/nagios/bin/nsca
HTTPS Bicycle Attack - Obtaining Passwords From TLS Encrypted Browser Requests
A paper detailing a new attack vector on TLS was released on December 30. The attack, known as the HTTPS Bicycle Attack,
is able to determine the length of specific parts of the plain-text
data underneath captured TLS packets using a side-channel attack with
already known information. The attack has a few prerequisites but could
be applied in a real world scenario, and is completely undetectable due
to its passive nature.
Some of the key observations of this attack are as below:
http://blogs.forcepoint.com/security-labs/https-bicycle-attack-obtaining-passwords-tls-encrypted-browser-requests
https://guidovranken.files.wordpress.com/2015/12/https-bicycle-attack.pdf
You can keep up to date with the discussion of HTTPS Bicycle on Reddit at https://www.reddit.com/r/netsec/comments/3zc5qu/https_bicycle_attack/
Executive Summary
The HTTPS Bicycle attack can result in the length of personal and secret data being exposed from a packet capture of a user's HTTPS traffic. For example, the length of passwords and other data (such as GPS co-ordinates) can be determined simply by analysing the lengths of the encrypted traffic.Some of the key observations of this attack are as below:
- Requires a packet capture containing HTTPS (TLS) traffic from a browser to a website
- The TLS traffic must use a stream-based cipher
- Can reveal the lengths of unknown data as long as the length of the rest of the data is known - this includes passwords, GPS data and IP addresses
- Packet captures from several years ago could be vulnerable to this attack, with no mitigation possible
- The real world impact is unknown, as there are several prerequisites that may be hard to fulfill.
http://blogs.forcepoint.com/security-labs/https-bicycle-attack-obtaining-passwords-tls-encrypted-browser-requests
https://guidovranken.files.wordpress.com/2015/12/https-bicycle-attack.pdf
You can keep up to date with the discussion of HTTPS Bicycle on Reddit at https://www.reddit.com/r/netsec/comments/3zc5qu/https_bicycle_attack/
Friday, January 22, 2016
cloudera vm: A Single-Node Hadoop Cluster and Examples for Easy Learning!
Cloudera Enterprise: The world's most popular Apache Hadoop solution
Cloudera offers the highest performance and lowest cost platform for using data to drive better business outcomes. Cloudera Enterprise makes Hadoop fast, easy, and secure, so you can focus on results.
Cloudera QuickStart VMs are for demo purposes only and are not to be used as a starting point for clusters.
The VM uses a package-based install. This allows you to work with or without Cloudera Manager. Parcels do not work with the VM unless you first migrate your CDH installation to use parcels. On your production systems, Cloudera recommends that you use parcels.
http://www.cloudera.com/downloads/quickstart_vms/5-5.html
Cloudera offers the highest performance and lowest cost platform for using data to drive better business outcomes. Cloudera Enterprise makes Hadoop fast, easy, and secure, so you can focus on results.
Cloudera QuickStart VMs are for demo purposes only and are not to be used as a starting point for clusters.
- The VMs run CentOS 6.4 and are available for VMware, VirtualBox, and KVM.
- All require a 64-bit host OS.
The VM uses a package-based install. This allows you to work with or without Cloudera Manager. Parcels do not work with the VM unless you first migrate your CDH installation to use parcels. On your production systems, Cloudera recommends that you use parcels.
http://www.cloudera.com/downloads/quickstart_vms/5-5.html
Tuesday, January 19, 2016
linux: how to activate and test kernel coredump property
[root@istanbul tmp]# sysctl -a | grep pattern
kernel.core_pattern = /tmp/core-%e-%s-%u-%g-%p-%t
test.c code:
#include <stdlib.h>
#include <time.h>
#include <stdio.h>
int main(int argc, char **argv)
{
srand(time(NULL));
int * nullpointer = NULL;
printf("%d\n", *nullpointer);
return 0;
}
# gcc -o testapp test.c
[root@istanbul tmp]# ./testapp
Segmentation fault
[root@istanbul tmp]# ls
no core file found.
[root@istanbul tmp]# ulimit -c
99999999
[root@istanbul tmp]# ls -alt /tmp/core-* | head -1
-rw------- 1 root root 241664 Jan 19 11:31 /tmp/core-testapp-11-0-0-2127-1453195860
If you don't want to use testapp you can do it easily by using sleep command, too.
sleep 10 &
killall -SIGSEGV sleep
kernel.core_pattern = /tmp/core-%e-%s-%u-%g-%p-%t
test.c code:
#include <stdlib.h>
#include <time.h>
#include <stdio.h>
int main(int argc, char **argv)
{
srand(time(NULL));
int * nullpointer = NULL;
printf("%d\n", *nullpointer);
return 0;
}
# gcc -o testapp test.c
[root@istanbul tmp]# ./testapp
Segmentation fault
[root@istanbul tmp]# ls
no core file found.
[root@istanbul tmp]# ulimit -c
99999999
[root@istanbul tmp]# ls -alt /tmp/core-* | head -1
-rw------- 1 root root 241664 Jan 19 11:31 /tmp/core-testapp-11-0-0-2127-1453195860
If you don't want to use testapp you can do it easily by using sleep command, too.
sleep 10 &
killall -SIGSEGV sleep
Friday, January 15, 2016
linux: gettimeofday - VDSO Virtual Dynamic Shared Object
strace -c date
ciktisinda yaptigim incelemede gettimeofday syscall cagrisinin yapilmadigini gozlemledim sonrasinda yaptigim arastirmada VDSO mimarisi ile bir cozum uygulandigini gordum.
detaylar:
detaylar:
Many application workloads (especially databases and financial service applications) perform extremely frequent
gettimeofday or similar time function calls. Optimizing the efficiency of this calls can provide major benefits.
A Virtual Dynamic Shared Object (VDSO), is a shared library that allows application in user space to perform some kernel actions without as much overhead as a system call. The VDSO is often used to provide fast access to the
gettimeofday system call data.
Enabling the VDSO instructs the kernel to use its definition of the symbols in the VDSO, rather than the ones found in any user-space shared libraries, particularly the
glibc. The effects of enabling the VDSO are system-wide - either all processes use it or none do.
When enabled, the VDSO overrides the
glibc definition of gettimeofday with it's own. This removes the overhead of a system call, as the call is made direct to the kernel memory, rather than going through the glibc.Thursday, January 14, 2016
telecom: what is NEBS
NEBS (Network Equipment - Building System) is the most common set of safety, spatial and environmental design guidelines applied to telecommunications equipment in the United States. NEBS is why telephones work after an earthquake or thunderstorm! NEBS requirements are utilized all over the world for a host of commercial, utility and defense applications. Still, the most frequent application of NEBS is to design and test equipment intended for use in Central Offices.
http://telecom-info.telcordia.com/site-cgi/ido/docs2.pl?ID=095698532&page=nebs
Equipment deployed in the network needs to be safe, reliable, and easy to deploy. The NEBS standards in GR-63 and GR-1089 provide
uniform criteria for equipment design intended to reduce the cost of deployment and maintain reliability of the network.
SR-3580 groups the NEBS criteria into three functional levels (I, II, or III). Grouping the criteria into levels helps clarify the
impact of non-conformance and allows the broad range of NEBS requirements to be judiciously applied to equipment, based on the
equipment's application and impact on the operation of the network
http://telecom-info.telcordia.com/site-cgi/ido/docs.cgi?ID=196992314SEARCH&KEYWORDS=&TITLE%20=&DOCUMENT=SR-3580&DATE=&CLASS=&COUNT=1000
What is "NEBS Level 3"?
"NEBS Level 3" is a term from Bellcore special report, SR-3580. This report details 3 distinct functional levels of NEBS compliance based on GR-63-CORE and GR-1089-CORE. The levels allow a wide range of NEBS requirements to be applied to equipment based on application and network impact.
"NEBS Level 1" means that people and equipment hazards and network degradation are minimized. NEBS Level 1 addresses the personnel and equipment safety requirements of GR-63-CORE and GR-1089-CORE. This is useful for getting prototypes into a lab trial. It's also a requirement that is imposed on Competitive Local Exchange Carriers (CLECs) in order for them to deploy equipment into an RBOC's network. This level doesn't address operability, this is addressed in Levels 2 and 3.
"NEBS Level 2" addresses equipment operability, but in a controlled environment. For example, equipment could be used in a data center, however, if the equipment performs non-critical operations it could be used under environmental extremes. Note that this level is very rarely used because it is ambiguous.
"NEBS Level 3" means the equipment is in the network for the long haul. We're talking about Carrier Class with this stringent level. The equipment will operate under the environmental extremes found in a central office. In a nutshell, the equipment meets all of the requirements of GR-63-CORE and GR-1089-CORE.
Telcordia has created a special NEBS page to their SuperStore providing customers with more info on the NEBS documents. Check out Telcordia NEBS Page
NOTES:
http://telecom-info.telcordia.com/site-cgi/ido/docs2.pl?ID=095698532&page=nebs
Equipment deployed in the network needs to be safe, reliable, and easy to deploy. The NEBS standards in GR-63 and GR-1089 provide
uniform criteria for equipment design intended to reduce the cost of deployment and maintain reliability of the network.
SR-3580 groups the NEBS criteria into three functional levels (I, II, or III). Grouping the criteria into levels helps clarify the
impact of non-conformance and allows the broad range of NEBS requirements to be judiciously applied to equipment, based on the
equipment's application and impact on the operation of the network
http://telecom-info.telcordia.com/site-cgi/ido/docs.cgi?ID=196992314SEARCH&KEYWORDS=&TITLE%20=&DOCUMENT=SR-3580&DATE=&CLASS=&COUNT=1000
What is "NEBS Level 3"?
"NEBS Level 3" is a term from Bellcore special report, SR-3580. This report details 3 distinct functional levels of NEBS compliance based on GR-63-CORE and GR-1089-CORE. The levels allow a wide range of NEBS requirements to be applied to equipment based on application and network impact.
"NEBS Level 1" means that people and equipment hazards and network degradation are minimized. NEBS Level 1 addresses the personnel and equipment safety requirements of GR-63-CORE and GR-1089-CORE. This is useful for getting prototypes into a lab trial. It's also a requirement that is imposed on Competitive Local Exchange Carriers (CLECs) in order for them to deploy equipment into an RBOC's network. This level doesn't address operability, this is addressed in Levels 2 and 3.
"NEBS Level 2" addresses equipment operability, but in a controlled environment. For example, equipment could be used in a data center, however, if the equipment performs non-critical operations it could be used under environmental extremes. Note that this level is very rarely used because it is ambiguous.
"NEBS Level 3" means the equipment is in the network for the long haul. We're talking about Carrier Class with this stringent level. The equipment will operate under the environmental extremes found in a central office. In a nutshell, the equipment meets all of the requirements of GR-63-CORE and GR-1089-CORE.
Telcordia has created a special NEBS page to their SuperStore providing customers with more info on the NEBS documents. Check out Telcordia NEBS Page
NOTES:
- Verizon does not follow SR-3580. They use their own NEBS checklist, NEBS Compliance Clarification Document, that details what they believe are important to their network's integrity.
- SBC uses 2 levels as detailed in their NEBS checklist TP76200MP.
- A combined Telecommunications Carrier Group Checklist can be found here TCG Checklist.
Wednesday, January 13, 2016
linux: Inter-Process Communication
- Signals - Sent by other processes or the kernel to a specific process to indicate various conditions.
- Pipes - Unnamed pipes set up by the shell normally with the "|" character to route output from one program to the input of another.
- FIFOS - Named pipes operating on the basis of first data in, first data out.
- Message queues - Message queues are a mechanism set up to allow one or more processes to write messages that can be read by one or more other processes.
- Semaphores - Counters that are used to control access to shared resources. These counters are used as a locking mechanism to prevent more than one process from using the resource at a time.
- Shared memory - The mapping of a memory area to be shared by multiple processes.
Linux Signals
SignalsLinux Signals are:
|
linux: process state codes
The codes used are:
| Code | Meaning |
|---|---|
| D | Uninterruptible sleep (usually IO) |
| R | Running or runnable (on run queue) |
| S | Interruptible sleep (waiting for an event to complete) |
| T | Stopped, either by a job control signal or because it is being traced. |
| W | paging (not valid since the 2.6.xx kernel) |
| X | dead (should never be seen) |
| Z | Defunct (“zombie”) process, terminated but not reaped by its parent. |
For BSD formats and when the stat keyword is used, additional characters may be displayed:
| Code | Meaning |
|---|---|
| < | high-priority (not nice to other users) |
| N | low-priority (nice to other users) |
| L | has pages locked into memory (for real-time and custom IO) |
| s | is a session leader |
| l | is multi-threaded (using CLONE_THREAD, like NPTL pthreads do) |
| + | is in the foreground process group |
D state occurs then the process is in uninterruptible sleep. This state is bad, because you can't do anything with the process in D state.
Subscribe to:
Posts (Atom)