Posted by: admin at 3 Monday 9th, 2009
FreeBSD is not in the story is a little attention from WEP to test the vulnerability of Linux I tried to backtrack. Aircrack-ng is a high probability that sooner or IKENAKAっwith no increase up to more than one console,欠KEMASU to be smart? When a demonstration in front of the client, "It looks like I can not to anyone." I was cleaning up, so that it fails to raise the security awareness, Spoonwep tried a GUI application. Aircrack-ng to take some time compared to the AP mode switch is good as it is processed in a fully automated search and analysis PAKETTOKYAPUCHA. Regrettably, the process of final analysis (aircrack-ng) results in the option because it is HEX. To convert to a smart, simple perl script arranged to publish it.
hex-asc.pl
#!/usr/bin/perl
## ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
## WEP-KEY BIN Viewer for Spoonwep
## (ASCII to BINARY Changer for Spoonwep / Spoonwep2)
##
## http://freebsd.ai-line.com/ by sio (Japan)
## ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
## How to use. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# 1.Permission change to 0700.
# 2.When Spoonwep is finished, this running.
# 3.Executes this.
# 4.After that, Please give me a mail(sio<at>ai-line.com).
# Girl or Japanese limitation ;-)
## ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
## configure
$output_dir = '/root/Desktop/CrackedWEP';
## Spoonwep default setting
$lastattack_dir = '/usr/local/bin/wifispoonfeeder/spoonwep/lastattack';
$key_file = 'key.txt';
$essid_file = 'wscapture-01.txt';
## wepkey
$readfile = "$lastattack_dir/$key_file";
open(IN, $readfile);
$wepkey = <IN>;
close(IN);
$wepkey =~ s/\[|\]|\ |\:|\n//g; # [ ww:xx:yy:zz ] => wwxxyyzz
$wepkey =~ s/([a-fA-F0-9][a-fA-F0-9])/pack("H2",$1)/eg; # ASCII to BINARY
## essid
$readfile = "$lastattack_dir/$essid_file";
open(IN, $readfile);
@essid = <IN>;
close(IN);
$essid = $essid[2];
@essid = split(/,/, $essid);
$essid = $essid[13];
$essid =~ s/^\s*//;
$essid =~ s/\s*$//;
## Write
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
$year += 1900;
$mon += 1;
$filename = "$year$mon$mday$hour$min$sec";
unless (-d $output_dir) {
mkdir $output_dir;
}
open(FILE, "> $output_dir/$filename");
print FILE "ESSID = $essid\n";
print FILE "WEPKEY = $wepkey";
close (FILE);
Posted by: admin at 1 Monday 30th, 2009
[w] I receive the following message in the press, not updated
You've already written out your changes - if you wish to overwrite them, you'll have to restart sysinstall first.
Changes are already written. If you want to overwrite it, first you need to restart sysinstall. So that, sysinstall restart. LiveFS CD from when you use fixit mode, you must restart the system. Can not unmount
The sysinstall and run the Fdisk Label menu, just create a partition slice DE無KU will automatically mount the mount point. Fixit may receive an error message like: you try to unmount mode.
Fixit# umount /mnt
umount: umount of /mnt failed: Device busy
Please check the following. The current directory, the directory is not trying to unmount? In this case, move to another directory. The directory you are trying to unmount, or do not have another mount?
Fixit# ls /mnt
.snap/ dev/ home/ usr/ var/
In this case, in order to unmount.
Fixit# umount /mnt/var
Fixit# umount /mnt/usr
Fixit# umount /mnt/home
Fixit# umount /mnt/dev
Fixit# umount /mnt
Strange to me
Please try the following steps to be done. - exit sysinstall (LiveFS CD if you boot from a boot fixit mode) and then mount the partition if it is created, and then unmount.
Fixit# ls /mnt
.snap/ dev/ home/ usr/ var/
Fixit# cd /
Fixit# umount /mnt/var
Fixit# umount /mnt/usr
Fixit# umount /mnt/home
Fixit# umount /mnt/dev
Fixit# umount /mnt
- Make sure the swap partition.
Fixit# swapinfo
Device 1K-blocks Used Avail Capacity
/dev/ad0s1b 1048576 0 1048576 0%
If you see the device name, stop it being used by the swap partition.
Fixit# swapoff /dev/ad0s1b
(Underlined part is the device name that appears in swapinfo)
- Start sysinstall (LiveFS CD if you start from a restart).
Posted by: admin at 1 Monday 29th, 2009
FreeBSD 7.1 and reliable backup procedures published in the test. The most important is the following. - To make a backup of the backup must be able to quickly and reliably is necessary to single-user mode, you need to blank short time.
- Cumbersome backup process will not be able to continue.
- To restore OKONAE along the steps, others (including his own after a few months) if you can understand this state must be able to ensure.
I have built a server FreeBSD4.8 period of time the backup was done to a tape device, the recent view that the HDD is a good way to OKONATTA. Backup to tape, it takes time, and reliability of thin media experience greater capacity than what the HDD is a daily backup tapes must be enormous considering the life of the tape media, real There are無KUNARI. Once in the past, RAID5 HDD configuration when two cars crashed at the same time, the backup of a few months ago ... I was getting myself in a situation that IMASHI think the best way to get a daily backup However, now we have settled down in this way. Backup (dump)
Original server and the backup is as follows.
ns# df
Filesystem 1K-blocks Used Avail Capacity Mounted on
/dev/ad0s1a 1012974 153114 778824 16% /
devfs 1 1 0 100% /dev
/dev/ad0s1f 2025860 9122 1854570 0% /home
/dev/ad0s1d 6090094 2420298 3182590 43% /usr
/dev/ad0s1e 1012974 34662 897276 4% /var
Mount the device to store the backup data
Memory in the USB-in SCSI hard drive, the IDE-HDD to the primary-slave繋GIMASHITA. Equipment connected to the device name in dmesg to verify.
ns# dmesg
.....
ad0: 11264MB <VMware Virtual IDE Hard Drive 00000001> at ata0-master UDMA33
ad1: 13312MB <VMware Virtual IDE Hard Drive 00000001> at ata0-slave UDMA33
.....
見RENAI to scroll faster! If that is A, [j] or [↓] to scroll at the bottom, [k] or [↑] to scroll up. [q] to quit the show. (See man more) Initialize and mount a backup destination
It is necessary only if the first device connected. Second time is unnecessary. use sysinstall is a very long time, relying on past memories I, the following error DEMASHITA.
/stand/sysinstall: Command not found.
ns# which sysinstall
/usr/sbin/sysinstall
With the recent FreeBSD it is. Typically, / usr / sbin so should I go to the path, sysinstall is a good reason only. [Configure] and select [Enter] button. [Fdisk] select the [Enter] button. Select the backup destination device [Enter] button. (This is ad1) [c] and press [Enter] button. [165] as the [Enter] button. [w] button. Confirmation dialog will be displayed [Yes] and select [Enter] button. [None] Select the [Enter] button. [q] and press. [Cancel] and select [Enter] button. [Label] and select [Enter] button. [c] and press [Enter] button. [FS] remains have been selected by the [Enter] button. Enter the Mount. (The / backup) Directory is created automatically mount. [w] button. [Yes] and select [Enter] button. [q] menu and press return, [Cancel] button. [Exit] or [Cancel] button. [Exit Install] to select [Enter] button. dump run
Backup of each partition.
Filesystem 1K-blocks Used Avail Capacity Mounted on
/dev/ad0s1a 1012974 153114 778824 16% / <=== /backup/root.dump
devfs 1 1 0 100% /dev <=== バックアップ不要
/dev/ad0s1f 2025860 9122 1854570 0% /home <=== /backup/home.dump
/dev/ad0s1d 6090094 2420298 3182590 43% /usr <=== /backup/usr.dump
/dev/ad0s1e 1012974 34662 897276 4% /var <=== /backup/var.dump
ns# dump -0uaLC 32 -f /backup/root.dump /
Option Description
0 DANPUREBERU 0 (full)
u after a successful dump, / etc / dumpdates database updates.
to detect the end of a media. (Maybe it's no tape.)
L FreeBSD5.0 use the snapshot feature on board.
With this feature, the need to reduce single-user mode.
C 8-32 cache size (unit: MB) by a number between, improving performance dramatically.
However, L is an option if you do not, C is a good option is removed.
(More info)
f you specify a file for backup power.
Likewise, do any of the other three. (High capacity /usr
etc. It takes a little time)
ns# dump -0uaLC 32 -f /backup/var.dump /var
ns# dump -0uaLC 32 -f /backup/usr.dump /usr
ns# dump -0uaLC 32 -f /backup/home.dump /home
This is the complete backup.
ns# ls -al /backup
total 2662822
drwxr-xr-x 3 root wheel 512 Jan 27 17:26 .
drwxr-xr-x 23 root wheel 512 Jan 27 17:02 ..
drwxrwxr-x 2 root operator 512 Jan 27 17:02 .snap
-rw-r--r-- 1 root wheel 9646080 Jan 27 17:26 home.dump
-rw-r--r-- 1 root wheel 155197440 Jan 27 17:16 root.dump
-rw-r--r-- 1 root wheel 2524764160 Jan 27 17:36 usr.dump
-rw-r--r-- 1 root wheel 35655680 Jan 27 17:26 var.dump
If you want more safety, the dump file that was created as a temporary file handling, should I copy to another media. Crunch! For at that moment in the versions of the ftp site to download the livefs.iso LiveFS CD you create.
And "FreeBSD XX emergency boot disk" is written near the server (where glaring) on you.
Restore (restore)
We verify the following configurations.
- New server (the server boot disk OS What matters is not installed)
- Above the primary-slave server with the backup data to connect the IDE-HDD
Start HDD ad0
The backup data is stored HDD ad1
Other needs LiveFS CD
Start in LiveFS CD
First, LiveFS CD into the server to start. (CD does not start if the BIOS is calm Let's review) If you are good at Japanese, [110 Japan]
and select [Enter] button. [PageUp]
7 times, [↓] 4 is quick and times) [Japanese 106 keymap]
because I have been selected, as [Enter] button. HDD startup initialization (create partition slice)
[Configure] and select [Enter] button. [Fdisk] select the [Enter] button. Select the boot device [Enter] button. (Here is ad0) Please do not specify a device that is not backed up data is stored. [c] with the number that appears and press [Enter] button. [165] as the [Enter] button. [q] and press. [Standard] and select [Enter] button. [Cancel] to return to the menu and press. [Label] and select [Enter] button. [c] and then press. Root (/) to specify the amount assigned to a partition. (Here is 1GB) Old server (original backup) may have fewer problems than. dd and the problem is not unlike many minutes. [FS] remains have been selected by the [Enter] button. Enter the Mount (/), [Enter] button. Similarly, [c] to set the swap button. This is the amount of memory that is mounted on the new server is about good times. (Here is 1GB) [Swap] select the [Enter] button. Similarly, [c] by pressing the /var
to specify the amount to allocate. (Here is 1GB) Old server (original backup) may have fewer problems than. dd and the problem is not unlike many minutes. [FS] remains have been selected by the [Enter] button. Enter the Mount (/ /var
button. Similarly, [c] by pressing the /usr
and then assigned to the specified capacity. (Here is 4GB) Old server (original backup) may have fewer problems than. dd and the problem is not unlike many minutes. / home partition and do not create configuration in / usr割RI当TETAI if all the remaining space to the left of the displayed numbers do not specify the amount [Enter] button. [FS] remains have been selected by the [Enter] button. Enter the Mount (/ /usr
button. Similarly, [c] all the space left by pressing the / /home
assigns. Do not change the number that appears [Enter] button. / home partition is not required if this work is unnecessary. [FS] remains have been selected by the [Enter] button. Enter the Mount (/ /home
button. You will like this. I do not like, select the partition [d] can be deleted by pressing the, please re-set. If [w] button. Confirmation dialog will be displayed [Yes] and select [Enter] button. [q] menu and press return, [Cancel] and select [Enter] button. Start Fixt
[Fixit] select the [Enter] button. [CDROM / DVD] to select [Enter] button. Run fixit. Device partition you just created (ad0s1a ~ ad0s1f) Make sure you are registered.
Fixit# ls /dev
Partition you just created the / mnt /mnt
located below.
Fixit# ls /mnt
.snap/ dev/ home/ usr/ var/
Mount the HDD with the backup data
With backup data in order to mount the HDD / mntbk /mntbk
a directory.
Fixit# mkdir /mntbk
Fixit# _
The IDE-HDD is the Master-Slave connection for the "ad1s1" is the device name. ad1s1 c of c for, please see here.
Fixit# mount /dev/ad1s1c /mntbk
Fixit# _
start restore
ルート( / )をrestore
Fixit# cd /mnt
Fixit# restore -rf /mntbk/root.dump
/varをrestore
Fixit# cd /mnt/var
Fixit# restore -rf /mntbk/var.dump
/usrをrestore
Fixit# cd /mnt/usr
Fixit# restore -rf /mntbk/usr.dump
/homeをrestore
Fixit# cd /mnt/home
Fixit# restore -rf /mntbk/home.dump
In many cases, usr and restore a large error in the following.
Fixit# cd /mnt/usr
Fixit# restore -rf /mntbk/usr.dump
/: write failed, filesystem is full
restore: /tmp//rstdir1233044785: cannot write directory database: No space left on device
Try making space in /tmp/, or set environment variable TMPDIR
to an alternate location with more disk space.
Fixit# _
This is, restore occurs because the amount of work required for temporary files. If so, the following method to change the TMP again please restore directory.
Fixit# mkdir /mntbk/tmp
Fixit# TMPDIR=/mntbk/tmp
Fixit# export TMPDIR
/ mntbk the HDD is a matter of data backup. TMP here to create a directory means that you use. After this, the need is some SEMARA / mntbk / tmp if you delete the directory, run the command will prevent almost all. In this case, as follows: Replace the TMP directory.
Fixit# TMPDIR=/tmp
Fixit# export TMPDIR
Rewriting fstab
It is not necessary to rewrite work, let's check. The difference between the order of the partition created, led to a situation that does not start, I caught two days ... Make sure to mount the current situation.
Fixit# df
Filesystem 1K-blocks Used Avail Capacity Mounted on
/dev/md0 4175 2449 1726 59% /
devfs 1 1 0 100% /dev
/dev/ad0s1a 1012974 153114 778524 16% /mnt
devfs 1 1 0 100% /mnt/dev
/mnt/dev/ad0s1f 8122034 9426 7462846 0% /mnt/home
/mnt/dev/ad0s1e 4058062 2434140 1299278 65% /mnt/usr
/mnt/dev/ad0s1d 1012974 34750 897180 4% /mnt/var
/dev/acd0 226150 226150 0 100% /dist
/dev/ad1s1c 13198878 2662822 9480146 22% /mntbk
Then open your fstab.
Fixit# vi /mnt/etc/fstab
# Device Mountpoint FStype Options Dump Pass#
/dev/ad0s1b none swap sw 0 0
/dev/ad0s1a / ufs rw 1 1
/dev/ad0s1f /home ufs rw 2 2
/dev/ad0s1d /usr ufs rw 2 2
/dev/ad0s1e /var ufs rw 2 2
/dev/acd0 /cdrom cd9660 ro,noauto 0 0
I notice the differences underlined. Device name "ad0s1e" and "ad0s1d" have not been mounted in the reverse name. If you like this, "/ mnt / etc / fstab" opens in the editor, please save corrected. That's it! LiveFS CD without a rise to restart. Aftertreatment
When you perform a restore, the current directory of each partition will create a file called restoresymtable. This is what will be required to restore an incremental backup, restore and remove you when you are finished.
ns# ls /
.cshrc boot entropy mnt sys
.profile cdrom etc proc tmp
.snap compat home rescue usr
COPYRIGHT dev lib restoresymtable var
backup disk2 libexec root
bin dist media sbin
ns# rm /var/restoresymtable
ns# rm /usr/restoresymtable
ns# rm /home/restoresymtable
At this
Long stop in the following message when you try to start the restore server.
Configuring syscons: keymap blanktime
"Configuring syscons: keymap blanktime" Please refer to the waiting time out of view. Can not partition out the following message:
Unable to find device node for /dev/ad0s1b in /dev!
The creation of filesystems will be aborted.
Fdisk to create the slices in the [w] Do not press? Fdisk menu [w] is押SAZU, [q] and press only, Label from the end of the set, the last in the Label menu [w] button. fails in sysinstall Fdisk Label
Have experienced many times during the verification. Fdisk Label in sysinstall please refer to fail. Want to backup another remote server that is connected to the network
The old story, "the tape drive to backup & restore" Please help. Posted by: admin at 1 Monday 27th, 2009
Configuring syscons: keymap blanktime
Have shown that the stop time is caused by the sendmail start Then you're waiting for the timeout to not start correctly. DNS, and network around見直SHIMASHOU. If I do, dump & restore of VMware testing encounter this problem while on the go, because he was the wrong network adapter settings ... Posted by: admin at 1 Monday 25th, 2009
a - the root partition (/). This will create a boot disk only. b - is the swap partition. c - the whole disk d - Generic e - General Purpose f - Generic g - General Purpose h - Generic Specifically, if the general繋IDA the IDE primary master hard disk is as follows. ad0s1a - / ad0s1b - Swap ad0s1d - / var ad0s1e - / usr ad0s1f - / home Posted by: admin at 11 Monday 8th, 2008
FreeBSD 5.0 and later versions, by default, inetd is disabled. The following methods will be effective.
/etc/rc.conf
inetd_enable="YES"
If necessary /etc/inetd.conf
and then restart it or change. Posted by: admin at 11 Monday 8th, 2008
FreeBSD sshd is by default to boot.
# which sshd
/usr/sbin/sshd
So, after the /etc/ssh/sshd_config
to AllowUsers USERNAME
only that, BURUTOFOSUATAKKU (brute force attacks) against the DSA should be authenticated. If you look you see the access log, or the humble country crackers or分RIMASEN bots, you should find that traces of the attack. Rewrite of the configuration file
/etc/ssh/sshd_config
Protocol 2
SSH2 protocol used disable root login in Authentication Using DSA
PasswordAuthentication no
PermitEmptyPasswords no
No and no and no password authentication and password
ChallengeResponseAuthentication no
So no to no
the password on it. After rewriting sshd
restart. Or, in earlier versions may also be an error because, if it is in the following way.
# ps aux | grep sshd
# kill -HUP PID
Private key id_dsa
and public key id_dsa.pub
to generate
Log in with ssh to enable users to access. root
other) Enter the following command.
Generating public/private dsa key pair.
Enter file in which to save the key (/home/ USERNAME /.ssh/id_dsa): [Enter]
Created directory '/home/ USERNAME /.ssh'.
Enter passphrase (empty for no passphrase): [PASSWORD] [Enter]
Enter same passphrase again: [Re PASSWORD] [Enter]
Your identification has been saved in /home/ USERNAME /.ssh/id_dsa.
Your public key has been saved in /home/ USERNAME /.ssh/id_dsa.pub.
The key fingerprint is:
xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx USERNAME @ HOST . DOMAIN . NAME
Public key id_dsa.pub
to rename the
$ cd /home/ USERNAME /.ssh
$ mv id_dsa.pub authorized_keys
$ chmod 0600 authorized_keys
Private key id_dsa
to move to a client machine
ssh client to connect to the /home/ USERNAME /.ssh/id_dsa
move. If you are concerned about security, FTP, etc. There is no USB floppy disk is a good memory and do in the process of using the media attention. id_dsa
to save the file, it will depend on the client terminal, please refer to your manual. Personally open source Tera Term is a good idea. Posted by: admin at 11 Monday 8th, 2008
Start and restart Apache server is configured to start automatically.
The server has been previously set as follows.
# cd /usr/local/etc/rc.d
# cp /usr/local/apache2/bin/apachectl /usr/local/etc/rc.d/apache.sh
# chmod 0755 /usr/local/etc/rc.d/apache.sh
It is, apachectl start
to start with it recently is as follows.
/etc/rc.local
# Start Apache
/usr/local/apache2/bin/apachectl start
apachectl
will pass through if you do not know how to install different versions and looks in the following way. Posted by: admin at 11 Monday 5th, 2008
A previous version of Apache
by default AddDefaultCharset
directive "ISO-8859-1 (Latin-European languages, French, German)" is specified.
Apache2.2
later, AddDefaultCharset default setting of this directive is not.
httpd.conf
and fixes. httpd.conf
is usually located below. Or
httpd.conf
AddDefaultCharset off
However, in this case, the following pages all the charset
must be specified.
<META http-equiv=Content-Type content="text/html; charset=Shift_JIS">
All content is the same character coding (charset) in the charset
you can also specify the following.
httpd.conf
AddDefaultCharset EUC-JP
Whenever you finish a fix, Apache to restart.
# /usr/local/apache2/bin/apachectl restart
apachectl
will pass through if you do not know how to install different versions and looks in the following way. Posted by: admin at 11 Monday 5th, 2008
If you enter the directory name to your browser's address field, index.html / index.php / index.cgi
if you index.html / index.php / index.cgi
the subject, how to avoid them and still see the file list.
Google in the index of
If you search, you'll get to what分RI.
httpd.conf
and fixes. httpd.conf
is usually located below. Or
httpd.conf
Options Indexes FollowSymLinks
↓ Indexes
remove Whenever you finish a fix, Apache
restart.
# /usr/local/apache2/bin/apachectl restart
apachectl
will pass through if you do not know how to install different versions and looks in the following way.