Tuesday, January 31, 2012

Wireshark error when run by normal user

You need to add your normal username to the wireshark group:
sudo gpasswd -a yourusername wireshark

*EDIT*
This next is the WRONG solution.  Really... you guys shouldn't read my blog ;-)
...I am keeping for historical purposes:

Couldn't run /usr/bin/dumpcap in child process: Permission denied

da... what??

-rwxr-xr-- 1 root wireshark 68688 Jan 13 12:36 dumpcap
Oh...
$ sudo chmod +x /usr/bin/dumpcap
$ ll /usr/bin/dumpcap
-rwxr-xr-x 1 root wireshark 68688 Jan 13 12:36 dumpcap

Sunday, January 29, 2012

Huge SCR

Wow. If this thing works, I may have got a pretty smokin' deal on a fatty SCR from the local electronics surplus shop: Apache Reclamation.

I found the datasheet online after a little bit of searching and found out it has these stats:

  • 3000V Reverse voltage
  • 2050A Avg. onstate current
  • 19kA repetitive peak current
  • 29kA surge current
WOW! This is THE SCR for some sort of heavy duty project (TMS machine, coin shrinker, can crusher, disc launcher, rail gun... etc!)

I'm guessing the broken lead is for the trigger ground or something? They don't have any physical diagrams on the datasheet.

Now I just need to find some low ESR capacitors and I'll have the biggest components of a really solid TMS machine.

Saturday, January 28, 2012

dhcpcd being a bastard and how to manually configure with iproute2 suite

Hello, and welcome to the next installation of my adventures with Arch Linux!

I got lucky on installation day and got dhcpcd to work a few times, but today was another story.
I looked at what was going on with wireshark, and it seems like dhcpcd was sending out dhcp requests, the router was replying with dhcp ack, however, dhcpcd would just request again... and again... maybe I'll get around to actually debugging dhcpcd, but until then:
HOW TO CONFIGURE YOUR INTERFACE WITH iproute2!
So, you obviously know that Arch has deprecated the old net-tools (ifconfig, route, etc) and is using iproute2 as the standard network configuration suite.

tl;dr this is how I configured my interface to work with a standard home router:
ip addr add 192.168.1.66/24 dev eth0
this assigns an ip address (192.168.1.66) with a subnet mask (255.255.255.0) to the eth0 interface.
Now, we want to add a default route:
ip route add default via 192.168.1.1
Cool! Now we need a DNS server, and we should be set. Modify the /etc/resolv.conf to contain the nameserver directive of your DNS server of choice:
# Generated by dhcpcd
# /etc/resolv.conf.head can replace this line
nameserver 68.105.28.12
# /etc/resolv.conf.tail can replace this line
That's my entire resolv.conf file, I use a COX dns server (because I have that IP memorized for some reason) but you could use the great OpenDNS:
208.67.222.222
208.67.220.220


*EDIT*
You will want to edit your /etc/rc.conf file for static ip vs. DHCP if you need to.  Seems like lots of people are having issues with the new dhcpd.

Friday, January 27, 2012

Installing Arch

My experience installing Arch Linux.
Today I installed Arch Linux, I was attracted to it by its philosophy of simplicity (leave it up to the user/admin what to install) and it's rolling releases (I love bleeding edge stuff, hipster alert)

Let me sing you the song of my people.

  1. Put in the Arch Linux cd with the "Netinstall Image" burned to it, booted it. And went through the steps.
  2. I ran into an error after going through and selecting a bunch of packages to download -- something like "Ruby depends on yacc, cannot resolve dependency" -- This sucked. "At least I was penning down all my pacakge selections"  I thought and figured I should just install a bare bones system anyway and install everything I want AFTER I got the system up and running.

    I selected these main packages (which installed without error):
    *base
    *xfce4
    *xorg
    *xorg-drivers
    *xorg-apps
    *xorg-fonts
  3. It booted to a login prompt "login:" which I used root/password and could start xfce4 with "startxfce4"
  4. And began install packages and configuring stuff, its best to do each package one at a time so you can alter the configuration files as needed.
Here's the list of packages I've installed so far (using pacman -S package_name):
  • vim
  • firefox
  • pidgin
  • xdg-utils (this fixed an error when clicking links in pidgin)
  • sudo
  • flashplayer
  • gimp
  • audacious
  • gstreamer0.10-plugins(this is a group of 6 packages including the good, bad, ugly)
  • mplayer
  • mirage
  • wireshark
  • nodejs
  • slim(this is the login manager I chose)
and I've removed:
  • vi
  • nano
I've added these lines to /etc/rc.local
#remove pc speaker kernel module
rmmod pcspkr

#command aliases
alias vi='vim'
alias python='python2'
alias ll='ls -l'
alias la='ls -a'
and /etc/rc.conf was kept default from the initial settings besides this line:
DAEMONS=(syslog-ng network crond slim dhcpcd)
We added slim and dhcpcd (networking is a pain during the install, I had to run dhcpcd (got lucky from autocomplete trying to run 'dhclient') in another tty.)

This was error that gave me trouble:
[root@none etc]# pacman -Q node.js
warning: database file for 'community' does not exist
error: package 'node.js' was not found
I fixed it by running: pacman -Syy
which does a Sync and yy refreshes the database files from the server (even if they appear up to date).

That's it for now. Going to restart now to see if that DAEMONS line will work. Godspeed you black emperor!

*EDIT*
I've realized its not really a good idea to add stuff to rc.local ...instead I put that stuff in /etc/bash.bashrc

rc stands for "run command" on start (something like that, there's lots of arguments)

*EDIT2*
My DAEMONS line looks like this now: DAEMONS=(syslog-ng network crond alsa)

Because dhcpd is broken for me (and it seems like some others, I should look into fixing/making a proper bug report now that I'm using arch on a laptop... )

Thursday, January 26, 2012

OOPS! formatted my windows partition (ntfs) with Ubuntu 10.10 (ext3/4)

This happened a while back, and took me a while to realize what I had done.  I've just recently been seduced by Arch Linux and wanting to check it out, I need a place to install it and fiddle. Having that harddrive that I've left unplugged due to some hope of data recovery, I begin the journey of said data recovery.  Here is the song of my people.
nak@none:~/recover$ sudo dd if=/dev/sdb of=./recover.img
I create a directory to work in (recover) and use dd to copy all the bytes from the harddrive to a file, I put a .img extension because I don't know if it would be considered an ISO or what... it's just the raw byte-age of the disc.
I plan to take recover.img and run it through `foremost` -- until then I wait for ~250 billion bytes to be copied from one drive to the other drive.

--after washing dishes and listening to a minimal techno mix--

488397168+0 records in
488397168+0 records out
250059350016 bytes (250 GB) copied, 3058.94 s, 81.7 MB/s
alright! So I downloaded and installed the latest version of foremost:
wget http://foremost.sourceforge.net/pkg/foremost-1.5.7.tar.gz
tar zxvf foremost-1.5.7.tar.gz
cd foremost...etc
make
sudo make install

foremost -t all -v -T -q -i recover.img

Finish: Thu Jan 26 14:45:29 2012

88528 FILES EXTRACTED
   
jpg:= 27888
gif:= 7371
bmp:= 1723
wmv:= 237
mp4:= 28
rif:= 2851
htm:= 718
ole:= 560
zip:= 1225
rar:= 112
exe:= 22253
png:= 23084
mpg:= 2
pdf:= 476
------------------------------------------------------------------

Foremost finished at Thu Jan 26 14:45:29 2012
...and now I've got a bunch of files (and corrupted files) that I may or may not trudge through to see if there's anything that I forgot I needed.

Peace out, hope this helps someone.

Wednesday, January 25, 2012

O anon...

Well according to my studies, everything is a metaphor, or abstraction of a signal that is processed out of the eternal cosmic background radiation. How this occurs is similar to pointing a camera at a television screen displaying what the camera is seeing, the "infinite mirrors" effect. The camera is constantly feeding information off of itself from itself and displaying that information back again. So, in order for the universe to divide and "make sense" out of itself, we climb the ladder of sanity out of the primordial chaos. Each rung that we climb is a step towards abstraction and away from "hard reality". Now, how we go about explaining the mechanism of metaphor is based on what direction we are looking (metaphorically) and where we start in our journey to explain and find cause-effect relationships.

There is no one-hundred percent correct objective answer (one could say) that can be wrapped up in abstractions attempting to describe itself. I'm a republican.

Saturday, January 21, 2012

Node.JS Bitmap Steganography

http://abovesobelow.com:3000 <-- Link if it's still active.


I don't really know what to say, go look at the link, there's a video explaining it.

I was messing up the algo for a while, finally got it down today.  The image on the right is the stego image, the image on the left is the original.  The difference is barely perceptible.

Some stego programs use only the least significant BIT, so the change is even less perceptible, however you're only able to fit 1/4 as much data into a bitmap file, always trade-offs.

Thursday, January 12, 2012

Defending against Reaver

Recently a tool, Reaver, was released which brute forces WPS keys (I haven't looked at the source, but it should also be checking to see if the responses from the router will give out any information on partial key guesses):
An attacker can derive information about the correctness of parts the PIN from the AP ́s responses.
If the attacker receives an EAP-NACK message after sending M4, he knows that the 1 half
of the PIN was incorrect. 
If the attacker receives an EAP-NACK message after sending M6, he knows that the 2 half
of the PIN was incorrect.
[From this PDF]
Anyway, turn of WPS from your router settings to protect from this sort of attack. Here's an example from a Netgear router:
And yep it should :)

Send me more screenshots of your own particular router if you want me to post them. @uberscientist on twitter, or email me uberscientist@gmail.com

Sunday, January 8, 2012

Corpus Errorum Biologicorum

But exactly the distinctive work of science is the modification, the reconstruction, the abandonment of old ideas; the construction of new ones on the basis of observation. This however is a distressing operation, and many refuse to undergo it; even many whose work is the practice of scientific investigation. The old ideas persist along with the new observations; they form the basis - often unconsciously - for many of the conclusions that are drawn.

This is what has occurred in the study of heredity. A burden of concepts and definitions has come down from pre-experimental days; the pouring of the new wine of experimental knowledge into these has resulted in confusion. And this confusion is worse confounded by the strange and strong propensity of workers in heredity to flout and deny and despise the observations of the workers in environmental action; the equally strange and strong propensity of students of environmental effects to flout and deny and despise the work on inheritance. If one accepts the affirmative results of both sets, untroubled by their negations, untroubled by definitions that have come from the past, there results a simple, consistent and useful body of knowledge; though with less pretentious claims than are set forth by either single set.

Our first fallacy springs from the situation just described. It is:

I.     The fallacy of non-experimental judgments, in matters of heredity and development. . . .

Our second general fallacy is one that appears in the interpretation of observational and experimental results; it underlies most of the special fallacies seen in genetic biology. This is the fallacy that Morley in his life of Gladstone asserts to be the greatest affliction of politicians; it is indeed a common plague of humanity. It is:

II.     The fallacy of attributing to one cause what is due to many causes.

III.     The fallacy of concluding that because one factor plays a role, another does not; the fallacy of drawing negative conclusions from positive observations. . . .

IV.    The fallacy that the characteristics of organisms are divisible into two distinct classes; one due to heredity, the other to environment. . . .

VII.     The fallacy of basing conclusions on implied premises that when explicitly stated are rejected. . . .

Many premises influencing reasoning are of this hidden, unconscious type. Such ghostly premises largely affect biological reasoning on the topics here dealt with; they underlie several of the fallacies already stated, and several to come. . . .

VIII.     The fallacy that showing a characteristic to be hereditary proves that it is not alterable by the environment. . . ,

IX.    The fallacy that showing a characteristic to be altered by the environment proves that it is not hereditary. . . .

It appears indeed probable, from the present state of knowledge and the trend of discovery, that the following sweeping statements will ultimately turn out to be justified: -

(1)    All characteristics of organisms may be altered by changing the genes; provided we can learn how to change the proper genes.

(2)  _ All characteristics may be altered by changing the environmental conditions under which the organism develops; provided that we learn what conditions to change and how to change them.

(3)    Any kind of change of characteristics that can be induced by altering genes, can likewise be induced (if we know how) by altering conditions. (This statement is open to more doubt than the other two; but it is likely eventually to be found correct.) . . .

X.    The fallacy that since all human characteristics are hereditary, heredity is all-important in human affairs, environment therefore unimportant. . . .

XI.    The fallacy that since all important human characteristics are environmental, therefore environment is all-important, heredity unimportant, in human affairs. (247)                                             H. S. Jennings