21st July, 2008

An implementation of ACPI ASL print function for Xen /--evilbitz   

Hi All,

This post is more intended for Xen developers but you might be able to understand a thing or two.

ASL code exists in the DSDT and SSDT tables of ACPI. This code is provided by the system manufacturer and is intenteded to provide an abstract interface for configuring and accessing the hardware, especially those integrated parts such as the embedded controller, etc… The operating system has an interpreter which execute ASL in its context, this is how you write hardware specific code that can be executed on any ACPI compliant OS.

Part of my work now involves merging ACPI ASL bits in order to support PCI/PCIe pass-through capabilities. In order to debug ASL code, I’ve made a debug function which gets a string as an argument and then write each byte of the string to the IO port 0xE9, this port is being used by Xen for HVM debugging, so basically if you have your UART connected, all the strings will appear there.

Here is the code:

|     /* Debug ACPI using io-port 0xE9 */
|    OperationRegion (DBGP, SystemIO, 0xE9, 0×01)
|    Field (DBGP, ByteAcc, NoLock, Preserve)
|    {
|       /* HVM debug char */
|       HDBG, 8
|    }
|
|    Method (ZDBG, 1, NotSerialized)
|    {
|       /* Local0 – length of the debug string */
|       Store (SizeOf (Arg0), Local0)
|       Increment (Local0)
|       /* Init STR buffer from Arg0 */
|       Name (STR, Buffer (Local0) {})
|       Store (Arg0, STR)
|
|       /* Append prefix “ACPI-DBG: ” */
|       Name (PRFX, Buffer () {
|          0×41, 0×43, 0×50, 0×49, 0x2d,
|          0×44, 0×42, 0×47, 0x3a, 0×20
|       })
|
|       /* INPR -> Concatenated string with prefix */
|       Add (Local0, 0x0a, Local0)
|       Name (INPR, Buffer (Local0) {})
|       Concatenate (PRFX, STR, INPR)
|
|       /* Output string to ioport HDBG */
|       Store (Zero, Local1)
|       Decrement (Local0)
|       While (LLess (Local1, Local0))
|       {
|          Store (DerefOf (Index (INPR, Local1)), HDBG)
|          Increment (Local1)
|       }
|       /* End with a newline */
|       Store (0x0a, HDBG)
|    }

Thanks!



Posted in lowlevel, programming | 1 Comment

4th November, 2007

An approach to revision control your documents using Mercurial /--evilbitz   

This post describes how to control documents revisions under Windows. Warning – it involves the use of command line. I take it for granted that the average Linux guy will manage on his own.
I want to share something that I just recently did, I find it really useful – I put all the “My Documents” directory under local revision control. What it gives you? basically, an easy way to track changes inside documents. If you have, like me, thousands of documents that are continually evolving (I’m talking about the annoying Document History section…) and many different versions of each document, instead of renaming them and creating local copies I’m now using mercurial in order to put them under a revision control.

Mercurial is a “a fast, lightweight Source Control Management system designed for efficient handling of very large distributed projects”, according to the website. It means that there is no central server and each user working on the project has a local copy of the whole repository on disk. The most important word in that sentence is “lightweight”.

So, after you downloaded Mercurial from the link above, create a directory under “My Documents” and name it whatever you would like to. Now, from the command line, cd into that directory and execute hg init, this will create a repository in that directory, every change could be tracked by executing hg status when you have a finalized version of the document that you want to take a snapshot of, execute hg commit -m “[Revision description goes here...]“

That’s pretty much it, if you want to see the document history of each commit, execute hg log and see the details of each revision along with the comments you supplied.

But really, Mercurial is a powerful tool, you can read all about it here.



Posted in random | 2 Comments

22nd October, 2007

An approach to overcome a keylogger /--evilbitz   

Well… this is not 100% fool-proof but if you care about your passwords and there is a chance that a keylogger is installed on the PC you are using (of course you must use it! and not a safer one), try the following method to type your passwords, it is simple but yet will overcome a decent amount of keyloggers out there:

If, for example, your password is ghostbuster:

  1. Type random parts of your password correctly: ghostbuster (type just htbu).
  2. In another window, type a lot of gibberish , like that: “;jklehf;3jmxmpojgedrjqhnm,bBNVuytewpirk,vmb” (-:
  3. Copy & Paste parts of your password and start assemble it in the password textbox ghostbuster
  4. Use random order when copy & pasting
  5. Delete parts of it by selecting parts of the password text and by pressing any key, do not use the backspace
  6. If you place spaces in the password text then select the text by pressing Ctrl+Arrow
  7. Assemble the password using all the above tips with random order

Thanks,
Guy.



Posted in hacking, security, stega | 5 Comments

13th June, 2007

Working on Hardware Virtualization /--evilbitz   

Hi,

I’m working in an Israeli start-up company called Neocleus, we’re working in stealth-mode. But never the less, some of the technologies we use have open-source implementations, as a result we are working open-source as well!

You can check out our website:
http://www.neocleus.com

Just recently, we revealed some of our intentions, such as that we want to develop a platform that is based on Hardware-Virtualization, mainly for the Windows opertating system. Since not long ago (2006), Intel & AMD CPUs have hardware assistance for managing & lauching virtual machines. Since it is supported by the CPU itself, the performace is better than old emulation (CPUs emulated in software), or limited implementations such as para-virtualization, which requires one to modify the VM OS kernel to be para-virtualized “enabled”.

Anyways, I just wanted to say that I’m gonna write a bit about virtualization and some cool stuff that I encounter. This blog is not going to turn into a virtualization blog, it will still be techincal and amusing (as you like it), and that’s better than empty! (look at last month’s posts!) ;-)

Yours,
Brain (Pinky’s friend).



Posted in xen | 1 Comment

2nd January, 2007

How to find a brand name /--evilbitz   

Need to think about a brand name for your product or company?

A name generator might do the job, NameGen is a python script developed by Erez Shinan and is hosted at Algorithm.co.il. NameGen is being fed with a list of names (in our case, brand names) and generates names that sounds the same or built in the same way.

My highly mathematical solution is to use the sophisticated Google CAPTCHA word generator. Just go to Gmail, enter a worng user name and password and click “Sign in” some several of times until the CAPTCH word generator appears. Continue to press that button until you get your desired brand name!

Google knows how much people hate CAPTCHA so they made their word generator not totally random, the words generated by it will sound like regular words that people are used to type.



Posted in hacking, random | Be The First To Comment!

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