Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in running windows7-sp1.json #1701

Open
Prateek-SecurityAnalyst opened this issue Sep 5, 2023 · 6 comments
Open

Error in running windows7-sp1.json #1701

Prateek-SecurityAnalyst opened this issue Sep 5, 2023 · 6 comments

Comments

@Prateek-SecurityAnalyst
Copy link

Prateek-SecurityAnalyst commented Sep 5, 2023

root@wijungle:~/drakvuf# ./build/drakvuf -r windows7-sp1.json -d 21
1693902073.002871 DRAKVUF v1.1-6c3e56e Copyright (C) 2014-2023 Tamas K Lengyel
Failed to set HVM_PARAM_ALTP2M, RC: -1
VMI_ERROR: xc_altp2m_switch_to_view returned rc: -1
Failed to switch on default view
Failed to initialize DRAKVUF: drakvuf_init() failed

when i try To simply trace the execution of the system. I am facing the above error. Sir @tklengyel Please help me to solve this issue.
Thanks & Regards

@tklengyel
Copy link
Owner

Doesn't look like you have altp2m enabled in Xen.

@Prateek-SecurityAnalyst
Copy link
Author

Prateek-SecurityAnalyst commented Sep 7, 2023

Doesn't look like you have altp2m enabled in Xen.

Thankyou for replying Sir,
Please help me to enable altp2m in Xen. Tell me the steps to enable altp2m in Xen.
I shall be very thankful to you.

@Prateek-SecurityAnalyst
Copy link
Author

Prateek-SecurityAnalyst commented Sep 7, 2023

This is my /etc/xen/win7.cfg file. please review it if there is any problem in this file.

arch = 'x86_64'
name = "windows7-sp1"
maxmem = 3000
memory = 3000
vcpus = 1
maxcpus = 1
builder = "hvm"
boot = "d"
hap = 1
acpi = 1
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "destroy"
vnc=1
vnclisten="0.0.0.0"
usb = 1
usbdevice = "tablet"
altp2m = 1
vif = ['type=qemu,model=e1000,bridge=xenbr0,mac=00:0e:09:88:6d:bb']
disk = [ 'phy:/dev/vg/windows7-sp1,sda,w',
'file:/mnt/windows7.iso,hdc:cdrom,r' ]
boot="d"
sdl=0
vncconsole=1
vncpasswd=''
serial='pty'

Thanks & Regards

@Prateek-SecurityAnalyst
Copy link
Author

And this is my /etc/default/grub file:

If you change this file, run 'update-grub' afterwards to update

/boot/grub/grub.cfg.

For full documentation of the options in this file, see:

info -f grub -n 'Simple configuration'

GRUB_DEFAULT=0
GRUB_TIMEOUT_STYLE=hidden
GRUB_TIMEOUT=0
GRUB_DISTRIBUTOR=lsb_release -i -s 2> /dev/null || echo Debian
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""

Uncomment to enable BadRAM filtering, modify to suit your needs

This works with Linux (no patch required) and with any kernel that obtains

the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)

#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"

Uncomment to disable graphical terminal (grub-pc only)

#GRUB_TERMINAL=console

The resolution used on graphical terminal

note that you can use only modes which your graphic card supports via VBE

you can see them in real GRUB with the command `vbeinfo'

#GRUB_GFXMODE=640x480

Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux

#GRUB_DISABLE_LINUX_UUID=true

Uncomment to disable generation of recovery mode menu entries

#GRUB_DISABLE_RECOVERY="true"

Uncomment to get a beep at grub start

#GRUB_INIT_TUNE="480 440 1"
GRUB_CMDLINE_XEN_DEFAULT="dom0_mem=4096M,max:4096M dom0_max_vcpus=4 dom0_vcpus_pin=1 force-ept=1 ept=ad=0 hap_1gb=0 hap_2mb=0 altp2m=1 hpet=legacy-replacement smt=0"

@tklengyel
Copy link
Owner

If you booted Xen with that command line and altp2m is not enabled that means your CPU doesn't support EPT. Try a different system.

@Prateek-SecurityAnalyst
Copy link
Author

Prateek-SecurityAnalyst commented Sep 8, 2023

If you booted Xen with that command line and altp2m is not enabled that means your CPU doesn't support EPT. Try a different system.

Also sir the commands mentioned on drakvuf.com is not working with the system only having SSD. when i upgrade the grub using command update-grub and reboot the system for booting it in xen hypervisor then my system not booted up. I tried it many times then i tried it with the laptop having HDD it worked, same commands i followed.

Thanks & Regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants