12th August, 2010

Allowing Open, Secure and Anonymous Electronic Voting for your Government! /--evilbitz   

I thought about a neat open-source project that might solve some electronic voting issues and may be used the reflect the opinion of the people that are managed by a certain government.

The Problem

performing a Referendum on a certain subject is a costly procedure that governments may do from time to time to grasp what is the opinion of the people on a certain idea/subject. The internet (along with information security) can make this cheaper and being used on a more frequent basis.

I’m not aware of any project that is being used in practice to solve this issue but I guess this problem was addressed by lot of people/organizations before me. Even if there are Academic definitions on this subject, I haven’t seen anything that provides what I’m about to unveil.

I here by give a design for such an open source project that may be used to solve this problem while keeping in mind that there are lots of problems that are related to information security.

Who should use this?

  • Governments
  • Companies
  • Organizations
  • Etc..

Features and Goals

The system should let millions of users in a group or citizens of a certain state to express their opinion in an anonymous way, the results of such a referendum should be transparent to anyone who wishes to count the voices. The government should have control of the questions asked but it may not alter or forge any vote.

So, to sum everything:

  • Mass – Allowing millions of users to vote
  • Communication – Voting is done electronically via the internet
  • Security – no forgery can be done, not by the government, not by the citizens and not by any external party
  • Anonymity – All votes are counted anonymously –> The government may have access to who voted
  • Transparency  – Also desired as a feature but is also a tool used to enable anonymous voting

Anti-Forgery

  • Votes should be visible to anyone
  • Votes should be carried out anonymously
        by anonymously, I mean that the government knows but the rest of the citizens doesn’t
  • Anyone can count the votes and validate that his own vote was counted
  • The goverment will not be able to alter votes made by citizens
  • The government will not be able to add “sock-puppet” votes to reflect a false opinion of the people
  • Citizens can vote once per question, and may have time to change their opinion

Technical Implementation

Both Client and Server must be open source, the security of this mechanism should always be questioned and further development may be accepted and embraced by everyone. Guess how the development of features will be managed? :)

Entities
  • Government (G) – the organization, controlled by the citizens
  • Citizen (C) – the user, member of a group
  • Validator (V) – An external, trusted server managed by the open-source community
Processes
  1. Citizen is issuing a key pair (see PKC) and send his public key to the government for authorization
    1. Citizen is added to the pool of allowed voters
    2. Citizen may be given a cheap dongle or a piece of hardware to keep his private key safe
    3. Other methods can be incorporated (that’s not the point :) )
  2. Government issues a question/referendum to all the citizens
    1. Citizens can view and vote
    2. Every question has a TTL (Time To Live – 3 days, for instance)
  3. Citizen votes. When the citizen votes
    1. The client asks the citizen to provide a unique passphrase for this particular vote, so later on the citizen would have the ability to check whether his vote was counted.
    2. The client sends the citizen’s vote to the government server which is then being validated using the citizen’s public key
    3. The client updates the Validator (a count server which is managed globally, outside of the control of the governement). The validator keeps track of the number of votes issued per question.
  4. Viewing of a vote’s result
    1. Per each referendum, a list of votes is appeared and near each vote, the unique passphrase. This way, each citizen can validate that his vote was counted.
    2. The Validator keeps track on the number of votes, thus not allowing not legitimates votes to be counted
    3. The Validator should act as a certificate authority

Final Utopia

Such a system may be used by any group members – it is secure, open and anonymous, just the way we like it in the 21st century. It isn’t costly and the maintenance is cheap. Questions may be raised more frequently by head of organizations or governments and it is letting the people decide what is best for them. It is a way of applying a true democracy that is consisting of millions of individuals.

And as always, the finale is something megalomaniac –>The UN may use this kind of system to hear the opinions of ALL people on earth :)



Posted in random | Be The First To Comment!

1st October, 2009

Synchronizing folders between Linux & Windows using unison /--evilbitz   

Hi there,

Here is a common case, you have a linux webserver and you want to update all the files, you probably work locally on the files and want to send th update to the server without the trouble of manually selecting the files and upload them via FTP.

We’ll use unison for this task and we’ll send the files over an ssh connection. Unison works very similar to rsync but is really easier for use. My Linux server runs on Debian.

Setting up the server (Linux)

  1. apt-get install unison
    This will install the latest stable version of unison for debian, you can use yum if you’re using a Red Hat flavour of Linux.
  2. apt-get install ssh
    If it’s not already there ;)  

Setting up the client (Windows)

  1. Install the text version of unison for Windows, make sure you’re getting the same version as you installed on your server – it wouldn’t work otherwise!
    Useful links: Download Page, Unison for windows – Version 2.27
    Copy the unison-text.exe file to c:\windows\unison.exe
  2. Install ssh client, download OpenSSH for windows and install the client.

Performing a sync

Let’s say you want to synchronize C:\www with /home/guy/www, you’ll have to execute the followin command (go to windows cmd):
C:\> unison www ssh://guy@webserver-ip//home/guy/www

This will synchronize all files between both directories, it will ask you for an action, you can include files or ignore them, just type ? and press enter to see all available options. Ok, what if you want to ignore a certain directory, which contains all kinds of sources for graphic files for instance… you can just include the -ignore switch, like this:
C:\> unison -ignore “Path sources” ssh://guy@webserver-ip//home/guy/www

In case you know you are doing a one way sync and you don’t want to be asked for too many questions, you may go with:
C:\> unison -silent -ignore “Path sources” ssh://guy@webserver-ip//home/guy/www

Making a mirror

This is really what fits best to our scenario, the files are on a windows machine will be the source of our mirror and the webserver directory the mirror itself:

C:\> unison c:\www ssh://guy@webserver-ip//home/guy/www -force c:\www -auto

The last command tells unison to force a mirror when c:\www is the source, and the destination address is /home/guy/www

Final word

Well, that’s it… simple, isn’t it? ;)
In case you have questions, you can comment below…

Thanks,
Guy.



Posted in linux | Be The First To Comment!

19th September, 2009

Accidently deleted your partition table? /--evilbitz   

In this post you can get some hints on what to do in case you accidently ruined your partition table, for example, you deleted one of your volumes (drive letters) and you cannot see it.

First of all, I want to start with a warning… doing this stuff to your hard disk may gets you to a point of frustration, losing all your data and getting the middle finger from the kind and beloved mr. samsung/WD/whatever/(made in China). I’m not gonna describe how to backup your hard drive, I assume you know that :)

The number one rule is to never try to edit or change anything from the Windows Disk Management tool, it’s crap. Most chances it is the reason for you ending  up on this page :)

Here are some information about the data structures that are used to manage your boot partitions, I’m not going in-depth here but rather just describing some basic things that are good to know. If you want, you can skip this section. Lets start with the MBR (Master Boot Record). The MBR contains a small piece of code at its begining, your BIOS loads it into memory and then exeute it in real mode. Anyways, the MBR basically just manages the entries in the partition table. Part of the MBR (at offset 0x1BE) is the partition table itself, there you have 4 entries to 4 Primary partitions on your disk, where each one can be defined at Extended and point to a number of Logical partitions (which used to be non-bootable, but today boot loaders handles them fine).

  • Primary – bootable partition
  • Extended – Pointer to a number of logical partitions
  • Logical – data partitions, intended to be non bootable

I would recommend reading more about this right here.

Here are some tools that you want to know:

  • TestDisk – this is a really good tool that can analyze every sector of your hard drive and find lost volumes, then it lets you edit the partition table and write it to disk.
  • Acronis Disk Director – good partition manager with disk editing capabilities, this is good if you want to investigate your sectors closely and see the data structures.

There are tons of other tools, I’m using these ones and they are great! I wouldn’t recommend hiren boot cd which has all these tools and more preinstalled and configured.

Ok, so here is the flow for reconstructing the partition table with TestDisk, and maybe add fixups using Windows bootrec.exe if you are running Vista.

  1. Execute TestDisk and let it analyze your disk, if it didn’t found exactly the partitions you are looking for, perform a deeper search. When you get the results all of the partitions are marked DELETED, you should turn the wanted partitions to Primary and Logical, the partition you used to boot into should be set to Primary Bootable.
  2. When you are ready, the partition table appears in a neat green color, telling you everything is ok. Write the partition table to disk.
  3. Try to boot the hard drive, if it fails, you may want to look at Super Grub and maybe later on, install to disk. Super Grub is a really handy boot loader that you can execute without installing to disk. It lets you boot from any partition. I’m not going to cover how to use Grub, try looking for info if you need this.
  4. If you are a windows user, insert the installation disk of windows vista, or download the neosmart recovery custom Vista disc, when the disc loads go to ‘Recovery’, and open a command prompt. Execute these commands:bootrec /fixmbr
    bootrec /fixboot
    bootrec /rebuildbcd

    See the output and confirm

  5. Load your operating system.

In case you want to hide some partitions, like the recovery partition of your laptop, you can user Acronis boot director.

Well that’s about it… even if this post doesn’t speak to you, just remember, never use the Windows Disk Management console :)

Thanks,
Guy.



Posted in random | Be The First To Comment!

26th September, 2008

The Future Of The Universe /--evilbitz   

This year (In November) I’ll begin my Biotechnological Engineering studies at the Ben-Gurion university at the Negev in Israel. I chose Biotechnology because I’m fascinated by life and because along with biology studies – you also get some math, physics and chemistry :-)

So I began to think and study about life and how it is made, the material that we are composed of, etc. I thought about something some days ago that I think would be interesting to share, I’m first going to outline the most common and widely accepted theories among the scientific community regarding how the universe and life were created, this will give the reader some good background before proceeding. Afterwards I’m going to discuss what I think will happen to the universe in the future, most chances you’ll be surprised by it so keep reading!

Please read every sentence carefully, since it is very summarized.

Some Background

Today, from observations into outer space, we know that galaxies draws away from us, the farther the galaxy is away from us, the bigger its speed it goes away from us (Hubble’s Law). This is true from any point of view that you’ll look at it (principle of relativity, nothing special about earth), far galaxies will draw away faster from your observation point, aka the universe is expanding. This led to the birth of the Big Bang idea, or at least it supports it, the big bang theory suggests that these galaxies must have been closer in the past and at the beginning, the universe was in “singularity” ~13.7 billion years ago (singularity is defined as a point with infinite density and high temperature), when the big bang occurred it expanded and the universe was formed.

So lets say the universe was created somehow and matter was formed somehow (I want to get fast to the point). Matter as far as we know today obeys a certain dynamic, we don’t completely understand the dynamics, but we have built a really nice model of what we think matter is (quarks, protons, neutrons, electrons, etc…), lets hope CERN will push us a step further in the understanding of matter and our universe. “Playing” by these “matter dynamics”, planets, solar systems and galaxies were formed. One of these planets was earth, it was formed ~4.5 billion years ago, and then life is assumed to be created spontaneously later on, some says that life sprung almost immediately after the earth was formed.

Of course that we cannot prove this is true, but if you’ll study “life chemistry”, it will be seem more logical to you that if you apply Darwin’s process of evolution to molecules and atoms, it is imminent that life will be formed, solely by the nature of matter in our universe. A good explanation to that process is found in the book: Richard Dawkins – The Selfish Gene. There are two other points that you’ll have to accept if you follow this logic. 1) Earth is a single planet amongst billions of billions, so life was probably formed elsewhere as well (See the the Hubble Ultra Deep Field image to grasp how big the universe is). 2) On earth, life took a carbon based form, which was the best choice on earth’s environment, but no one said this is the only form of life available and there is a good chance that other forms exists as well.

The groundwork of life contain two things: survival and replication. Survival is done by “finding” the “fittest” form (Natural Selection) and replication is by producing more of the same molecule (DNA), cell or organism (interesting reading – Mitosis).

Another assumption I take is that the development of intelligence would be the next native step to take place after the creation of life, this is also derived from natural selection and the survival of the fittest.

The Future of the Universe

We can say that the creation of life and intelligence were native processes that would take place again and again if the universe was re-created again for any reason. If you’ll look at it in an abstract way you can say that matter aspire to become intelligent. Furthermore, the survival & replication process turns all matter bit by bit to become intelligent so inductively you can conclude that at a certain point all the matter in the universe will become intelligent.

Of course there are some certain limits to this process, but at the other hand, giving enough time (billions of years), and assuming intelligence can take many forms, you may conclude that the whole universe will aspire to become intelligence. Who said that there isn’t any life and intelligence in our sun? maybe it is based on plasma chemistry or whatever…

Maybe the whole universe may become a single organism one day.



Posted in philosophy, random | 2 Comments

4th August, 2008

Debugging ACPI Using WinDBG /--evilbitz   

Hi,

Here are some tips about debugging Windows ACPI DSDT/ASL using windbg.

Installing the checked version of acpi.sys

You need to get the checked version of acpi.sys by downloading the checked version of your service pack, then unpack it locally and expand the acpi._sy file (it is actually a .cab file). The checked version will let you use the amli debugger in order to trace and step through ASL code.

Tracing ACPI ASL Code and Object evaluation

!amli set traceon spewon verboseon – This is a bit slow but produces a nice log file (for real man only).

ASL Debug Print

If you can change the code (dump and disassemble the DSDT and then compile and embed it again), you can add some string outputs to the ASL code, you can do that by two ways, if you connect a debugger then use the simple method of storing a string into the Debug local variable (example below), the other way is to use my asl print function which prints to an io port of your choice, this is not useful if you are not a platform developer or use a virtual machine.

Examples:

Store (“Debug asl print example – 1″, Debug)
\ZDBG (“Debug asl print example – 1″)

Break Points

  • If you want to debug ASL code, you can set breakpoints with !amli bp
  • You can embed a breakpoint by changing the DSDT and put the BreakPoint directive in the ASL code where you want the debugger to break.

After you broke onto the amli debugger, you can trace and step() through the code.



Posted in lowlevel, programming | Be The First To Comment!

Top »
"If you can't join them, beat them!"
Search Evilbitz: