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

Cannot find cmnd size Ubuntu 16 / GLIB 2.23 #9

Open
ghost opened this issue May 6, 2021 · 3 comments
Open

Cannot find cmnd size Ubuntu 16 / GLIB 2.23 #9

ghost opened this issue May 6, 2021 · 3 comments

Comments

@ghost
Copy link

ghost commented May 6, 2021

Hi @worawit

i make python3 version of exploit_userspec.py via Python2 to 3 Conventer and try use it.
i get error "Cannot find cmnd size".
does this mean that this configuration is not usable or needs some work?

Traceback (most recent call last):
  File "exploit_userspec3.py", line 737, in <module>
    main()
  File "exploit_userspec3.py", line 653, in main
    cmnd_size = find_cmnd_size()
  File "exploit_userspec3.py", line 174, in find_cmnd_size
    assert found, "Cannot find cmnd size"
AssertionError: Cannot find cmnd size

$ sudo --version
Sudo version 1.8.16
Sudoers policy plugin version 1.8.16
Sudoers file grammar version 45
Sudoers I/O plugin version 1.8.16

$ uname -r
4.4.0-amd64

$ ldd --version
ldd (Ubuntu GLIBC 2.23-0ubuntu10) 2.23
Copyright (C) 2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper.

@worawit
Copy link
Owner

worawit commented May 12, 2021

It might be

  • my exploit does not work with this configuration. I never found this case in my test VMs.
  • the target is patched.

Note: my exploit should work with python2 and python3 without converting

@ghost
Copy link
Author

ghost commented May 12, 2021

Oh oke, what about work on old kernels 2.6.x ?! I get same error on any old kernels configurations.

@worawit
Copy link
Owner

worawit commented May 12, 2021

Kernel 2.6.x should not have any effect on exploitation. I can exploit on CentOS 6, sudo version 1.8.6.

Normally, my exploit might because because of difference in sudo and glibc version/configuration.

Also most Linux with kernel 2.6.x were released with sudo version 1.7.x or very old 1.8.x which my exploit does not support.
Don't forget checking an exploit requirements from head of a file.

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

1 participant